Skip to content

[Bug]: Issue with the MCP configuration in Cursor #201

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
1 of 11 tasks
shashank-yelluri opened this issue May 5, 2025 · 3 comments
Closed
1 of 11 tasks

[Bug]: Issue with the MCP configuration in Cursor #201

shashank-yelluri opened this issue May 5, 2025 · 3 comments

Comments

@shashank-yelluri
Copy link

shashank-yelluri commented May 5, 2025

App

  • Cursor
  • Windsurf
  • VSCode
  • VSCode Insiders
  • Claude Desktop
  • Other

Affected Models (if applicable)

  • Claude 3.5 Sonnet
  • Claude 3.7 Sonnet
  • GPT-4a
  • o4-mini
  • Other

Bug Description

Hello Team,

"MongoDB": {
      "command": "npx",
      "args": [
        "-y",
        "mongodb-mcp-server",
        "--connectionString",
        "mongodb://<username>:<password>@localhost:27017/<db-name>?directConnection=true"
      ],
      "env": {
        "PATH": "/opt/homebrew/bin/npx"
      }
    }

Tried to configure the MCP server w / wo env. In both the cases, we are not being able to get the connection up & running. It says, "Client Closed" and these are the errors from the "Output > Cursor MCP",

2025-05-05 23:59:19.996 [info] goDB: Handling CreateClient action
2025-05-05 23:59:19.997 [info] goDB: Starting new stdio process with command: npx -y mongodb-mcp-server --connectionString mongodb://shashank:Greesh#123@localhost:27017/xcrosit-db?directConnection=true
2025-05-05 23:59:20.516 [info] goDB: Client closed for command
2025-05-05 23:59:20.516 [error] goDB: Error in MCP: Client closed
2025-05-05 23:59:20.516 [info] -mcp: Handling ListOfferings action
2025-05-05 23:59:20.516 [info] -mcp: Listing offerings
2025-05-05 23:59:20.516 [info] -mcp: Connected to stdio server, fetching offerings
2025-05-05 23:59:20.517 [error] user-clickup-mcp: [05/05/25 23:59:20] INFO     Processing request of type            server.py:534
                             ListToolsRequest                                   

2025-05-05 23:59:20.518 [info] listOfferings: Found 3 tools
2025-05-05 23:59:20.518 [info] -mcp: Found 3 tools, 0 resources, and 0 resource templates
2025-05-05 23:59:20.521 [info] -mcp: Handling ListOfferings action
2025-05-05 23:59:20.521 [info] -mcp: Listing offerings
2025-05-05 23:59:20.521 [info] -mcp: Connected to stdio server, fetching offerings
2025-05-05 23:59:20.522 [info] listOfferings: Found 3 tools
2025-05-05 23:59:20.522 [info] -mcp: Found 3 tools, 0 resources, and 0 resource templates
2025-05-05 23:59:20.523 [info] ext7: Handling ListOfferings action
2025-05-05 23:59:20.523 [info] ext7: Listing offerings
2025-05-05 23:59:20.523 [info] ext7: Connected to stdio server, fetching offerings
2025-05-05 23:59:20.523 [info] listOfferings: Found 2 tools
2025-05-05 23:59:20.523 [info] ext7: Found 2 tools, 0 resources, and 0 resource templates
2025-05-05 23:59:20.524 [info] goDB: Handling ListOfferings action
2025-05-05 23:59:20.524 [error] goDB: No server info found

Note: We have tunnel to a different server and opened the port of 27017 to make a connection. We are making sure that port is open and tried verifying by establishing a connection through simple code. Assuming that nothing would impact due to this.

Please help us understand what exactly is going wrong here ? Also, if anyone is able to configure the MCP server in Cursor, please do help me.

Thank You!!

@shashank-yelluri shashank-yelluri changed the title [Bug]: [Bug]: Issue with MCP config in Cursor May 5, 2025
@shashank-yelluri shashank-yelluri changed the title [Bug]: Issue with MCP config in Cursor [Bug]: Issue with the MCP configuration in Cursor May 5, 2025
@shashank-yelluri
Copy link
Author

JFYI - Took down a step and tried with the local DB (no tunnelin), still the error remains the same.

@nirinchev
Copy link
Collaborator

Hey, can you try running the npx command directly in your terminal (as opposed to going through Cursor)? That should give us the details of the connection issue.

@shashank-yelluri
Copy link
Author

@nirinchev - Thank You. But things worked just now, by removing the username & password. Not sure on the reason 😬

"MongoDB": {
      "command": "npx",
      "args": [
        "-y",
        "mongodb-mcp-server",
        "--connectionString",
        "mongodb://localhost:27017/<db-name>?directConnection=true"
      ]
    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants