Cursor Agent CLI is not able to detect global or project mcp settings.
I have settings under ~/.cursor/mcp.json yet running agent mcp list returns No MCP servers configured (expected in .cursor/mcp.json or ~/.cursor/mcp.json).
These same settings work from the Cursor IDE but the CLI does not seem to detect them.
Worth mentioning, I also attempted to copy the same settings under the project directory .cursor/mcp.json and the CLI was also not able to detect them.
Additionally a fresh reinstall of Cursor and Cursor CLI did not help.
Steps to Reproduce
Add mcp settings to ~/.cursor/mcp.json
Run agent mcp list
Expected Behavior
A list of available MCP should be shown and CLI agent should have access to such MCP tools.
Screenshots / Screen Recordings
Operating System
MacOS
Current Cursor Version (Menu β About Cursor β Copy)
Hey, thanks for the report. I see the screenshot with the agent mcp list output, and yeah, it really isnβt finding the config.
A few questions to help debug:
Can you share the contents of your ~/.cursor/mcp.json? Please redact any sensitive data if needed.
Please check that the file exists and is readable:
ls -la ~/.cursor/mcp.json
cat ~/.cursor/mcp.json
Do the same MCP servers work in Cursor IDE on this same machine?
Try setting the path explicitly via an environment variable:
CURSOR_CONFIG_DIR=~/.cursor cursor-agent mcp list
This might be related to a known issue with environment variables in the CLI, or file permission problems with the config. Once I have the info above, I can help more accurately.
I managed to figure out the issue while writing the reply to your requests, it seems like there was an issue with one of the MCP servers I had in the configuration file.
Just wanted to leave it here for the record, as in the Cursor IDE the rest of the MCP servers work even if one of them is failing, but in the Cursor CLI it just returns No MCP servers configured instead of displaying any potential errors.
Thank you for your help, after all it was a very simple mistake, but I can confirm that after removing context7 or fixing the error the CLI is able to see the MCP servers without any problem.