Describe the Bug
Hello Cursor Team,
I’m experiencing a persistent issue where a locally running MCP service fails to connect within Cursor, even though it’s fully operational and accessible from the operating system. After extensive debugging, we’ve concluded the issue lies within the Cursor application itself.
My Environment:
- OS: macOS [Please fill in your macOS version here, e.g., Sonoma 14.5]
- Cursor Version: 1.1.6
- MCP Service: Serena (
oraios/serena
)
Key Findings:
- The Serena MCP service runs perfectly when started manually in a terminal. Its own web dashboard confirms it’s active and all tools are loaded.
- A
curl -v http://127.0.0.1:24282
command successfully connects to the service, proving it’s healthy and accessible at the OS network layer. - My
mcp.json
is configured to the simplest possible state, using a direct URL:{"mcpServers": {"serena": {"url": "http://127.0.0.1:24282"}}}
. - My macOS firewall settings have been verified to allow incoming connections for
Cursor Helper (Plugin).app
.
Conclusion:
All evidence suggests this is not a user configuration error. The problem seems to stem from Cursor’s sandboxed environment, which appears to be preventing it from making a network request to 127.0.0.1
, even when the service is demonstrably available. This could be due to internal security policies like Mixed-Content Blocking or other network restrictions.
Steps to Reproduce
-
Set up the MCP environment:
- Create a dedicated Python virtual environment (e.g., using
uv venv
). - Activate the environment.
- Install the Serena MCP server:
uv pip install "serena[default]@git+https://github.com/oraios/serena"
.
- Create a dedicated Python virtual environment (e.g., using
-
Run the MCP service manually:
- In a terminal with the environment activated, run the server, pointing it to any local project folder:
serena-mcp-server --project /path/to/any/local/project
- Keep this terminal window open. The server should be logging that it is active.
-
Verify service accessibility:
- Open a new terminal window.
- Run
curl -v http://127.0.0.1:24282
. - Expected
curl
result: A successful connection (* Connected to localhost...
) followed by an HTTP response (e.g., 404 Not Found). This proves the service is running and reachable.
-
Configure Cursor:
- Set the content of your
mcp.json
file to the following:{ "mcpServers": { "serena": { "url": "http://127.0.0.1:24282" } } }
- Set the content of your
-
Observe the bug:
- Completely restart the Cursor application.
- Go to the
AI...
>MCP Tools
settings page. - Result: The
serena
service will show a red warning dot, indicating a failed connection, despite the service running correctly and being accessible viacurl
.
Operating System
MacOS
Current Cursor Version (Menu → About Cursor → Copy)
版本: 1.1.6 (Universal)
提交: 1.96.2
日期: 5b19bac7a947f54e4caa3eb7e4c5fbf832389850
Electron: 2025-06-25T02:16:57.571Z
ElectronBuildId: 34.5.1
Chromium: undefined
Node.js: 132.0.6834.210
V8: 20.19.0
OS: 13.2.152.41-electron.0