Best for
- Users of AI coding assistants (Claude Desktop, Cursor, Windsurf) that need to interact with MongoDB
- Developers who want to query databases using plain language
- Teams sharing MongoDB data access with AI tools
mcp-mongo-server is a feature-rich MongoDB MCP server with read-only mode, schema inference, query and aggregation support. It is easy to use via npx and prioritizes safety by restricting cross-db and server-side JS by default. Suitable for developers to safely explore and manipulate MongoDB through AI tools.
Strongest · Documentation 13/20 Weakest · Reliability 5/20
Static review · not runListed 2026-08-07
Read the FMRS scoring method →Runtime:Node.js 20+
MCP_MONGODB_URI
MongoDB connection URI, an alternative to the command-line argument; use your local or Atlas connection string.
MCP_HTTP_AUTH_TOKEN
Bearer token required to access the HTTP endpoint; choose your own value for the Authorization header.
MCP_MONGODB_READONLY
Set to "true" to enable read-only mode, blocking all write operations.
MCP_MONGODB_ALLOW_CROSS_DB
Set to "true" to allow cross-database aggregation stages (off by default).
MCP_MONGODB_ALLOW_SERVER_JS
Set to "true" to allow server-side JavaScript operators (off by default).
MCP_PORT
HTTP port (default 3001).
MCP_HTTP_ALLOWED_ORIGINS
Comma-separated browser origins allowed in HTTP mode.
MCP_HTTP_JSON_LIMIT
Max HTTP request body size (default 10mb).
No install needed; run via npx: npx -y mcp-mongo-server mongodb://localhost:27017/mydatabase
Tools such as query, insert, listCollections, and inferSchema should appear in the client's tool list; ask the AI to run listCollections — returning collection names confirms the connection.
Once connected, you can ask your AI assistant things like:
No matching tools
Listed from the project's documentation, not tested by this site.
mcp-mongo-server is a Model Context Protocol (MCP) server that enables AI assistants to interact with MongoDB databases. It automatically exposes collections, infers schemas, and runs queries, aggregations, and writes through a standard interface. Supports read-only mode, smart ObjectId handling, schema inference, aggregation pipelines, time conversion, and progress/cancellation. Works over stdio or HTTP transport, compatible with Claude Desktop, Cursor, and Windsurf.
Connect ClickHouse to your AI assistants
Unofficial MCP server providing advanced access to the ChEMBL chemical database
Google's official database MCP toolbox — define AI-accessible database tools via config
Bytebase's official, minimalist two-tool database MCP server
Source revision 55310c0d09ed Data synced 2026-10-19 Read the FMRS scoring method