Where does the bug appear (feature/product)?
Cursor CLI
Describe the Bug
MCP error -32000: Connection closed shows immediately when I run cursor-agent, although on the Cursor IDE MCP servers work fine.
Steps to Reproduce
Run the cursor CLI agent:
cursor-agent
My mcp.json with cat ~/.cursor/mcp.json
{
"mcpServers": {
"context7": {
"command": "npx",
"args": ["-y", "@upstash/context7-mcp@latest"]
},
"github": {
"command": "npx",
"args": ["@modelcontextprotocol/server-github"],
"env": {
"GITHUB_PERSONAL_ACCESS_TOKEN": "..."
}
},
"o3": {
"type": "stdio",
"command": "npx",
"args": ["o3-search-mcp"],
"env": {
"OPENAI_API_KEY": "...",
"SEARCH_CONTEXT_SIZE": "medium",
"REASONING_EFFORT": "medium"
}
},
"o3-low": {
"type": "stdio",
"command": "npx",
"args": ["o3-search-mcp"],
"env": {
"OPENAI_API_KEY": "...",
"SEARCH_CONTEXT_SIZE": "low",
"REASONING_EFFORT": "low"
}
},
"o3-high": {
"type": "stdio",
"command": "npx",
"args": ["o3-search-mcp"],
"env": {
"OPENAI_API_KEY": "...",
"SEARCH_CONTEXT_SIZE": "high",
"REASONING_EFFORT": "high"
}
},
"gemini-cli": {
"type": "stdio",
"command": "npx",
"args": ["-y", "gemini-mcp-tool"],
"env": {
"GEMINI_API_KEY": "..."
}
},
"serena": {
"type": "stdio",
"command": "uvx",
"args": [
"--from",
"git+https://github.com/oraios/serena",
"serena-mcp-server",
"--context",
"ide-assistant"
],
"env": {}
},
"cloud-run": {
"command": "npx",
"args": ["-y", "https://github.com/GoogleCloudPlatform/cloud-run-mcp"]
},
"cloud-sql-postgres": {
"command": "...",
"args": ["--prebuilt", "cloud-sql-postgres", "--stdio"],
"env": {
"CLOUD_SQL_POSTGRES_PROJECT": "...",
"CLOUD_SQL_POSTGRES_REGION": "...",
"CLOUD_SQL_POSTGRES_INSTANCE": "...",
"CLOUD_SQL_POSTGRES_DATABASE": "...",
"CLOUD_SQL_POSTGRES_USER": "...",
"CLOUD_SQL_POSTGRES_PASSWORD": "..."
}
},
"RadonAi": {
"url": "http://127.0.0.1:63266/mcp",
"type": "http",
"headers": {
"nonce": "..."
}
},
"codex": {
"type": "stdio",
"command": "codex",
"args": ["mcp"]
}
}
}
Expected Behavior
Load the whole MCP server without the error.
Operating System
MacOS
Current Cursor Version (Menu → About Cursor → Copy)
cursor-agent --version 2025.10.02-bd871ac
Does this stop you from using Cursor
Sometimes - I can sometimes use Cursor