Connect Cursor
Step-by-step: add PicX as an MCP server in Cursor via .cursor/mcp.json.
Cursor reads MCP server configuration from a JSON file — either project-scoped or global.
Steps
-
Create or open
.cursor/mcp.jsonin your project root (or~/.cursor/mcp.jsonfor a global config that applies to every project). -
Add a
picxentry:{ "mcpServers": { "picx": { "url": "https://mcp.picxstudio.com/", "headers": { "Authorization": "Bearer pxsk_YOUR_KEY" } } } } -
Replace
pxsk_YOUR_KEYwith a real key from API Keys. Or omit theheadersblock entirely and connect over OAuth — Cursor opens a browser sign-in on first connect, no key in the file. -
Save the file. Cursor picks up MCP config changes automatically — reopen the MCP panel (or restart Cursor) to confirm PicX's 19 tools appear.
Ask Cursor's agent to "generate an image of a red apple on a white background" to verify end-to-end. A successful call charges real credits, so this is a real (if small) spend, not a dry run.
Common mistakes
The URL must be the bare root —
https://mcp.picxstudio.com/— not.../mcpor.../sse. Those paths don't exist on the server.
If
.cursor/mcp.jsonalready has othermcpServersentries, merge thepicxkey into the existing object rather than replacing the file — overwriting it removes every other MCP server you've configured.
Project-scoped vs. global config
| Location | Applies to |
|---|---|
<project>/.cursor/mcp.json |
Only that project |
~/.cursor/mcp.json |
Every project opened in Cursor |
Use the project-scoped file if different projects need different PicX API keys (e.g. separate dev/prod accounts); use the global file if one key covers all your work.
FAQ
Does Cursor need to restart to pick up config changes?
Usually not — Cursor watches mcp.json and reconnects automatically. If tools don't appear after a save, reopen the MCP panel or restart as a fallback.
Can I use environment variable substitution for the API key instead of a literal string?
Not in the mcp.json file itself — Cursor's MCP config doesn't support ${VAR} substitution for header values. Store the literal key in the file and keep the file out of version control (add .cursor/mcp.json to .gitignore if it contains a real key).