issue while connecting with mcp #5
Replies: 2 comments 2 replies
-
|
Thanks for trying MongoDB Lens The error messages suggest MongoDB Lens can't connect to your MongoDB instance Here's MongoDB Lens in Cursor unable to connect to a MongoDB URI (i.e. in this case Here's MongoDB Lens in Cursor successfully connected to a MongoDB URI (i.e. in this case (please note how the TroubleshootingLet's verify your MongoDB is running and accessible If you're running MongoDB locally: # Check process
ps aux | grep mongo
systemctl status mongodb # If using systemd
# Connect via MongoDB shell
mongosh mongodb://localhost:27017If you're running MongoDB in Docker: # Check if container is running
docker ps | grep mongo
# Check container logs
docker logs <container_id>
# Connect using Docker's MongoDB instance
docker exec -it <container_id> mongosh
# Verify container is exposing port 27017
docker port <container_id>
# Inspect network the MongoDB container is on
docker network inspect <network_name>Network accessibility test (i.e. test if port 27017 is reachable): nc -zv localhost 27017 # Linux/macOS
telnet localhost 27017 # WindowsAdditional information needed:
Can you try these basic tests and share the results and additional info if you're still stuck Cheers |
Beta Was this translation helpful? Give feedback.
-
|
Closing due to inactivity |
Beta Was this translation helpful? Give feedback.


Uh oh!
There was an error while loading. Please reload this page.
-
"mongodb-lens": {
"command": "npx",
"args": [
"-y",
"mongodb-lens@latest",
"mongodb://localhost:27017"
]
} , this is the configuration i am using , but error is coming in cursor, when i see log by going to view->outout->mcp server, this is the log found, 2025-04-08 20:12:54.072 [info] lens: Starting new stdio process with command: npx -y mongodb-lens@latest mongodb://localhost:27017
2025-04-08 20:13:08.416 [info] lens: Client closed for command
2025-04-08 20:13:08.416 [error] lens: Error in MCP: Client closed
2025-04-08 20:13:08.905 [info] lens: Client closed for command
2025-04-08 20:13:08.906 [error] lens: Error in MCP: Client closed
2025-04-08 20:13:09.363 [info] lens: Client closed for command
2025-04-08 20:13:09.364 [error] lens: Error in MCP: Client closed
2025-04-08 20:13:09.366 [info] thub: Handling ListOfferings action
2025-04-08 20:13:09.367 [info] thub: Listing offerings
and also i used docker, unable to connect.
Beta Was this translation helpful? Give feedback.
All reactions