- 
                Notifications
    You must be signed in to change notification settings 
- Fork 2.7k
Open
Labels
P1Significant bug affecting many users, highly requested featureSignificant bug affecting many users, highly requested featurebugSomething isn't workingSomething isn't workingready for workEnough information for someone to start working onEnough information for someone to start working on
Milestone
Description
Describe the bug
When running Fast MCP Server with the current configuration, the server initializes twice in quick succession (within ~1 second). This can be observed in the logs where the "Initializing server..." message appears twice, followed by two successful connections and identical initialize method calls.
To Reproduce
- Configure Fast MCP Server with the following settings:
"git": {
  "command": "uv",
  "args": [
    "run",
    "--with",
    "mcp[cli]",
    "mcp",
    "run",
    "fastmcp_git_servers.py"
  ]
}- Start the Claude Desktop app
- Observe the duplicate initialization messages
Observation
The server initializes twice as shown in the logs below. Note the timestamps showing two initialization sequences less than 1 second apart:
2025-03-16T13:52:00.467Z [Git] [info] Initializing server...
2025-03-16T13:52:00.491Z [Git] [info] Server started and connected successfully
2025-03-16T13:52:00.495Z [Git] [info] Message from client: {"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"claude-ai","version":"0.1.0"}},"jsonrpc":"2.0","id":0}
2025-03-16T13:52:01.398Z [Git] [info] Initializing server...
2025-03-16T13:52:01.707Z [Git] [info] Server started and connected successfully
2025-03-16T13:52:01.708Z [Git] [info] Message from client: {"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"claude-ai","version":"0.1.0"}},"jsonrpc":"2.0","id":0}
Expected behavior
The server should initialize only once per execution.
Desktop (please complete the following information):
- OS: macOS Sonoma 14.2.1
- Claude Desktop: 0.8.1
- Python SDK: 1.4.0
Additional context
The non-fast MCP server implementation doesn't have this problem. The key difference appears to be in how the server is launched:
"git": {
  "command": "uv",
  "args": [
    "--directory",
    "src/non-fast-mcp-server",
    "run",
    "git"
  ]
}omidsrezai and phernandez
Metadata
Metadata
Assignees
Labels
P1Significant bug affecting many users, highly requested featureSignificant bug affecting many users, highly requested featurebugSomething isn't workingSomething isn't workingready for workEnough information for someone to start working onEnough information for someone to start working on