It is described in Cursor Agent document that MCP configuration is shared between IDE and CLI, how ever, MCP tool is never trigger properly in CLI while IDE works fine with same prompt.
Steps to Reproduce
Configure MCP json for WSL and make sure it works fine under IDE
Enter cursor-agent, type the same prompt
It is hard to find the correct MCP tool, sometimes it generates python code to implement something, sometimes it finds the MCP but cannot make proper call to finish the task.
Expected Behavior
MCP tool can be invoked properly like IDE
Operating System
Windows 10/11
Current Cursor Version (Menu → About Cursor → Copy)
hi @xianglai1.li this may have to do with the terminals access to paths, can you use the same command from mcp.json to manually start the MCP in same terminal where you run cursor-agent?
The command in ~/.cursor/mcp.json works totally fine. I copy mcp.json to my working directory, use explicit prompt like “Use MCP tool xxxx to do something“ and it can also trigger MCP tool call. The problem I see is:
Cursor-agent CLI doesn’t search ~/.cursor/mcp.json for MCP tool call like IDE does.
Even though I copy mcp.json to working directory under Cursor-agent CLI , it is not as smart as IDE with the same prompt. It needs explicit instruction for mcp usage and goes with a lot of redundancy execution steps
@mazy-n once you configure it in projects folder .cursor/mcp.json it will work. You can check it also in Cursor IDE.
@xianglai1.li i’m using regularly Cursor CLI, but I do not have to mention the word MCP, the name of MCP server or so. If i know the name of the tool i can mention it, though I do not care about spelling or underscores, otherwise i mention what agent should do and it calls the MCP tool.
I ran into the same issue. My ~/.cursor/mcp.json was already configured correctly, and the MCP service could run normally inside Cursor IDE. However, running cursor-agent mcp list kept showing the error:
No MCP servers configured (expected in .cursor/mcp.json or ~/.cursor/mcp.json)
The correct solution is: after configuring the MCP service in ~/.cursor/mcp.json, run the cursor-agent command, and in the pop-up dialog ( Workspace Trust Required), choose Trust this workspace. At this point, running cursor-agent mcp list will work as expected.
Additionally, if you check the /Users/admin/.cursor/projects directory, you’ll notice a new Users-admin folder created, which contains the mcp-approvals.json file.
Of course, since Cursor Agent is still in beta testing, the overall experience should improve in the future.