I am running mongodb and mcp as docker containers. mongodb is accessible via mongosh, and connects, authenticates fine. I am getting mongosh shell.
But, I am not able to connect using MCP server.
I am trying to run mongodb database with MCP for a AI use case.
I started mongodb:
podman run -d
–name mongo8
-p 27017:27017
-e MONGO_INITDB_ROOT_USERNAME=admin
-e MONGO_INITDB_ROOT_PASSWORD=secret
mongo
I tried to run MCP:
export MDB_MCP_CONNECTION_STRING=“mongodb://admin:secret@0.0.0.0:27017/test”
podman run -i --rm -p 8081:8081 |
-e MDB_MCP_CONNECTION_STRING=mongodb://admin:secret@0.0.0.0:27017/test?authSource=admin |
-e MDB_MCP_READ_ONLY=true |
mongodb://admin:secret@0.0.0.0:27017 |
–transport http --httpHost=0.0.0.0 --httpPort=8081
mongodb/mongodb-mcp-server:latest
I don’t see any logs in mongodb when MCP is started.
Do I need to enable more flags or some missing config?