Where does the bug appear (feature/product)?
Cursor CLI
Describe the Bug
I’m seeing inconsistent MCP behavior in Cursor CLI.
My MCP servers are configured correctly and they work fine in the Cursor desktop app. The CLI management commands also see them normally:
agent mcp listshows both servers as readyagent mcp list-tools dbhubreturns 2 toolsagent mcp list-tools idea_mcpreturns 66 toolsagent mcp enable dbhubsays it is already enabled and approved
But inside actual Agent sessions, the MCP tools are not available.
In interactive agent mode, /mcp shows both MCP servers as error with 0 tools, and says the MCP server is not connected.
In agent -p mode, the Agent also says the dbhub MCP namespace / execute_sql tool is not available in the current session.
So the strange part is:
- Cursor Desktop can use these MCP servers
agent mcp list/agent mcp list-toolscan also see them- but real Agent sessions in Cursor CLI cannot use them
This affects both of my MCP servers:
dbhub(stdio MCP)idea_mcp(HTTP MCP)
So it does not look like a problem with only one server or one transport type.
Steps to Reproduce
- Configure MCP servers in project
.cursor/mcp.json.
{
"mcpServers": {
"idea_mcp": {
"type": "http",
"url": "http://127.0.0.1:65453/stream",
"headers": {}
},
"dbhub": {
"command": "npx",
"args": [
"-y",
"@bytebase/dbhub@latest",
"--transport",
"stdio",
"--config",
"<project dir>/dbhub.toml"
]
}
}
}
-
Run:
agent mcp list
Both MCP servers are shown as ready.
-
Run:
agent mcp list-tools dbhub
It returns 2 tools.
-
Run:
agent mcp list-tools idea_mcp
It returns 66 tools.
-
Run:
agent mcp enable dbhub
It says the server is already enabled and approved.
-
Start an interactive session:
agent
-
Open:
/mcp
-
Both
dbhubandidea_mcpshow:- Status: error
- 0 tools
- Error loading MCP, unable to list tools
- MCP ‘’ is not connected
-
Exit and test headless mode:
agent -p “You must use dbhub’s execute_sql tool to execute SELECT 1. Do not use shell.”
-
The Agent responds that the current session does not have the
dbhubMCP namespace or theexecute_sqltool.
Expected Behavior
If agent mcp list shows an MCP server as ready, and agent mcp list-tools can successfully list its tools, then those same MCP tools should also be available inside real Agent sessions.
In other words, I expect the behavior to be consistent between:
- Cursor Desktop
agent mcp list/agent mcp list-tools- interactive
agent agent -p
Screenshots / Screen Recordings
Operating System
Windows 10/11
Version Information
CLI Version: 2026.09.10-fd3934a
Additional Information
I also ran the CLI in debug mode.
The logs show that both MCP configurations are discovered, and both MCP providers are initialized, including:
idea_mcpwithhttp://127.0.0.1:65453/streamdbhub
The logs also show:
mcp_deferred=truemcp_init_ms=-1
So from what I can tell, Cursor CLI is discovering the MCP configuration, but the actual Agent session is not exposing those MCP tools.
This seems more like a CLI Agent runtime issue than an MCP server configuration issue, especially because:
- the same MCP servers work in Cursor Desktop
agent mcp listworksagent mcp list-toolsworks- this affects both a stdio MCP server and an HTTP MCP server
It may be related to deferred/lazy MCP initialization in recent CLI versions.
Does this stop you from using Cursor
Sometimes - I can sometimes use Cursor



