MongoDB MCP Server
✓ verifiedQuery and manage MongoDB and Atlas clusters from the assistant.
Don't have ToolPiper? We'll take you to the download.
Publisher
License
Apache-2.0
Transport
Local subprocess
Tools
5
What this server does
MongoDB's official MCP server connects to a cluster directly or to Atlas via the Admin API. With a connection string it can run find and aggregate queries, list databases and collections, infer schemas, and (unless you set read-only mode) insert and update documents. Point it at a connection string with a least-privilege user so the assistant sees only what it should. The server reads MDB_MCP_CONNECTION_STRING from the environment; pass a read-only user or a replica for analytics work.
Tools included
find
Run a find query against a collection.
aggregate
Run an aggregation pipeline.
list_collections
List collections in a database.
count
Count documents matching a filter.
collection_schema
Infer the schema of a collection.
The authoritative list comes from the server's tools/list at runtime. This catalog entry may lag the upstream until the next ToolPiper release.
Install in ToolPiper
ToolPiper handles the JSON configuration. Click Install, fill in any required tokens, and the server is ready in your chat.
Don't have ToolPiper? We'll take you to the download.
Install in another client
Install in another MCP client (Claude Desktop, Cursor, Continue, Cline)
Add this to ~/Library/Application Support/Claude/claude_desktop_config.json.
{
"mcpServers": {
"mongodb": {
"command": "npx",
"args": [
"-y",
"mongodb-mcp-server"
]
}
}
}Example prompts
"List the collections in the analytics database and show me the schema of events."
"How many users signed up in the last 7 days?"
"Aggregate orders by status and return the totals."
Security notes
The connection string contains database credentials and grants whatever the user can do. Use a read-only user for analytics, and never point it at production with a write-capable account unless you mean it. Set MDB_MCP_READ_ONLY=true to block writes. Treat the string like a password.
Related tools
Postgres
✓ verifiedQuery Postgres databases with read-only SQL.
DataLocal subprocess1 toolSQLite
✓ verifiedQuery SQLite databases and run business-intelligence prompts.
DataLocal subprocess4 toolsRedis
✓ verifiedInteract with Redis key-value stores from the assistant.
DataLocal subprocess4 toolsAWS Knowledge Base
✓ verifiedRetrieve answers from an AWS Bedrock Knowledge Base.
DataLocal subprocess1 tool