DefDex in Cursor
Add DefDex to mcp.json, globally or per project.
1. Add DefDex
Open Cursor Settings → MCP → Add new MCP server, or edit the file directly. Use
~/.cursor/mcp.json for every project, or .cursor/mcp.json for one:
~/.cursor/mcp.json
Cursor fills ${env:DEFDEX_API_KEY} from the environment it was started in. Export the
variable in your shell profile, then quit and reopen Cursor (on macOS, launching it from a
terminal with cursor . guarantees it sees the variable).
2. Verify
In Cursor Settings → MCP, defdex shows a green dot and its tools.
3. Try it
Troubleshooting
- 401 Unauthorized. Cursor sent the text
${env:DEFDEX_API_KEY}instead of the key, usually because it didn’t see the variable at launch. Restart Cursor from a terminal where the variable is set. If it still fails, put the key in place of${env:DEFDEX_API_KEY}in your global~/.cursor/mcp.jsononly, never in a project file you commit. - Server shows red. Check the JSON is valid and the URL is exactly
https://app.defdex.io/mcp.
