Where does the bug appear (feature/product)?
Cursor CLI
Describe the Bug
When running cursor-agent -p (headless agent mode), server-specific MCP tools (e.g. my_search_records, my_create_item) are never injected into the agent’s callable tool set — even though the MCP server is fully connected, authenticated, and cursor-agent mcp list-tools lists all tools correctly.
The agent reports these tools as unavailable and falls back to generic proxy tools only (mcp_task, list_mcp_resources, fetch_mcp_resource).
Steps to Reproduce
- Configure MCP server in
~/.cursor/mcp.jsonusing stdio/supergateway bridge:
{
"mcpServers": {
"my-mcp-server": {
"command": "npx",
"args": ["-y", "supergateway", "--sse", "http://localhost:PORT/sse"]
}
}
}
- Verify MCP is connected and tools are listed:
cursor-agent mcp list
# Output: my-mcp-server: ready
cursor-agent mcp list-tools my-mcp-server
# Output: many tools listed (my_search_records, my_create_item, my_execute_action, etc.)
- Run agent in
-pmode asking for custom tools:
cursor-agent -p --force --trust \
--workspace /path/to/project \
--model composer-1.5 \
"List all tools available to you whose names start with 'my_'. Output them as a newline-separated list. If no my_ tools are available, say NONE."
-
Agent responds:
NONE -
Ask agent to list ALL available tools — only generic tools present:
codebase_search, run_terminal_cmd, grep, delete_file, web_search,
mcp_task, list_mcp_resources, fetch_mcp_resource
No custom tools appear despite many being listed by cursor-agent mcp list-tools.
Expected Behavior
Server-specific MCP tools listed by cursor-agent mcp list-tools should be injected into the agent’s callable tool set in -p mode — consistent with how Cursor IDE (non-headless Composer) behaves.
In Cursor IDE Composer, the identical MCP configuration correctly exposes all custom server tools as first-class callable tools. The -p CLI agent should behave the same way.
Operating System
MacOS
Version Information
CLI Version: 2026.03.18-f6873f7
OS: darwin (arm64)
Node.js: v25.7.0
For AI issues: which model did you use?
composer-1.5
Does this stop you from using Cursor
Sometimes - I can sometimes use Cursor