MongoDB MCP server is giving an error on startup

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Cannot Reproduce
    • Priority: Major - P3
    • No Version
    • Affects Version/s: None
    • Component/s: None
    • None
    • Not Needed
    • Developer Tools

      IHAC that is in the process of rolling out the MongoDB MCP server to his non-production environment. He's having trouble getting mongodb-mcp-server running in cursor. 

      We initially saw these logs:

      "method":"notifications/message","params":{"level":"debug","data":"[telemetry]: Attempting to send 1 events (0 cached)"},"jsonrpc":"2.0"}
      {"method":"notifications/message","params":{"level":"debug","data":"[telemetry]: Sent 1 events successfully: [\n  {\n    \"timestamp\": \"2025-07-22T14:11:10.771Z\",\n    \"source\": \"mdbmcp\",\n    \"properties\": {\n      \"result\": \"failure\",\n      \"duration_ms\": 0,\n      \"component\": \"server\",\n      \"category\": \"other\",\n      \"command\": \"stop\",\n      \"runtime_duration_ms\": 42050,\n      \"reason\": \"Unexpected token 'c', \\\"curl https\\\"... is not valid JSON\"\n    }\n  }\n]"},"jsonrpc":"2.0"}
      
      {"method":"notifications/message","params":{"level":"debug","data":"[telemetry]: Attempting to send 1 events (0 cached)"},"jsonrpc":"2.0"}
      {"method":"notifications/message","params":{"level":"debug","data":"[telemetry]: Sent 1 events successfully: [\n  {\n    \"timestamp\": \"2025-07-22T14:11:11.416Z\",\n    \"source\": \"mdbmcp\",\n    \"properties\": {\n      \"result\": \"failure\",\n      \"duration_ms\": 0,\n      \"component\": \"server\",\n      \"category\": \"other\",\n      \"command\": \"stop\",\n      \"runtime_duration_ms\": 42692,\n      \"reason\": \"Unexpected end of JSON input\"\n    }\n  }\n]"},"jsonrpc":"2.0"} 

      The above suggests the model is not responding properly with JSON. The logs detail what occurs when this fails, the MCP server sent a request successfully the model returned with invalid JSON. They're configuring it through Netskope IP (potentially could also be a routing issue).

      The connection works when using the connection string, but fails when switching to the Atlas API. These are the errors observed in the MCP logs:

      {\t\$date\2025-07-28T10:10:16.868Z\,\s\I\c\MONGODB-MCP\id\1000002,\ctx\server\msg\Server started with transport StdioServerTransport and agent runner cursor-vscode\{\t\$date\2025-07-28T10:10:16.957Z\,\s\F\c\MONGODB-MCP\id\1000001,\ctx\server\msg\Fatal error running server: Error: Failed to connect to MongoDB Atlas instance using the credentials from the config\ 
      1. Do you have any insights into what might be causing this? The customer is also asking which port is used, so they can coordinate with their networking team and determine if traffic is being dropped.
      2. They are also configuring this with Netskope IP and are wondering if SSL inspection is required. I assume it is not needed, but would appreciate confirmation.

      Would appreciate any insights or more ways to troubleshoot this. I also attached screenshots we can see that we have the "31 tools enabled" which I think indicate that the MCP configuration works but fails after we sent a prompt which looks like the connections somewhere on the way. 

            Assignee:
            Nikola Irinchev
            Reporter:
            Tal Abarbanel
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: