AdYour product here, seen by people installing AI tools every day Sponsor slots open: 12 of 12, from $249 a month

mongodb-mcp-server

Community

MCP server by mongodb-js · updated · ★ 1.1k · 84k downloads a week

Score 91

MongoDB Model Context Protocol Server mongodb-mcp-server is a community project by mongodb-js, not verified by a company domain.

Yours? Claim it
Maintenance

Last commit 3 days ago

Licence

Apache-2.0: permissive, fine for commercial use

Quality

Published package or server URL, 1,146 stars, original repository

Security

Not checked yet. What we check

What you need

SettingNeededWhat it is
MDB_MCP_ALLOW_REQUEST_OVERRIDESEnvironment variableOptionalWhen set to true, allows configuration values to be overridden via request headers and query parameters.
MDB_MCP_API_CLIENT_IDEnvironment variable, secretOptionalAtlas API client ID for authentication. Required for running Atlas tools.
MDB_MCP_API_CLIENT_SECRETEnvironment variable, secretOptionalAtlas API client secret for authentication. Required for running Atlas tools.
MDB_MCP_ASSISTANT_BASE_URLEnvironment variableOptionalBase URL for the MongoDB Assistant API.
MDB_MCP_ATLAS_TEMPORARY_DATABASE_USER_LIFETIME_MSEnvironment variableOptionalTime in milliseconds that temporary database users created when connecting to MongoDB Atlas clusters will remain active before being automatically deleted.
MDB_MCP_CONFIRMATION_REQUIRED_TOOLSEnvironment variableOptionalComma separated values of tool names that require user confirmation before execution. Requires the client to support elicitation.
MDB_MCP_CONNECTION_SCOPEEnvironment variableOptionalVisibility scope for MongoDB connections created at runtime. With 'session' (the default), each MCP session only sees the connections it created (plus the shared 'preconfigured' one) and they are closed when the session ends — recommended w
MDB_MCP_CONNECTION_STRINGEnvironment variable, secretOptionalMongoDB connection string for direct database connections. Optional, if not set, you'll need to call the connect tool before interacting with MongoDB data.
MDB_MCP_DISABLE_SERVER_SIDE_JSEnvironment variableOptionalWhen set to true, disallows the use of server-side JavaScript operators (such as $where, $function, and $accumulator) in query filters and aggregation pipelines.
MDB_MCP_DISABLED_TOOLSEnvironment variableOptionalComma separated values of tool names, operation types, and/or categories of tools that will be disabled.
MDB_MCP_DRY_RUNEnvironment variableOptionalWhen true, runs the server in dry mode: dumps configuration and enabled tools, then exits without starting the server.
MDB_MCP_ELICITATION_TIMEOUT_MSEnvironment variableOptionalTime in milliseconds the user has to respond to an elicitation request (such as a tool confirmation prompt) before it fails.
MDB_MCP_EXPORT_CLEANUP_INTERVAL_MSEnvironment variableOptionalTime in milliseconds between export cleanup cycles that remove expired export files.
MDB_MCP_EXPORT_TIMEOUT_MSEnvironment variableOptionalTime in milliseconds after which an export is considered expired and eligible for cleanup.
MDB_MCP_EXPORTS_PATHEnvironment variableOptionalFolder to store exported data files.
MDB_MCP_EXTERNALLY_MANAGED_SESSIONSEnvironment variableOptionalWhen true, the HTTP transport allows requests with a session ID supplied externally through the 'mcp-session-id' header. When an external ID is supplied, the initialization request is optional.
MDB_MCP_HEALTH_CHECK_HOSTEnvironment variableOptionalDeprecated. Use `monitoringServerHost` instead. Host address to bind the healthCheck HTTP server to (only used when transport is 'http'). If provided, `healthCheckPort` must also be set.
MDB_MCP_HEALTH_CHECK_PORTEnvironment variableOptionalDeprecated. Use `monitoringServerPort` instead. Port number for the healthCheck HTTP server (only used when transport is 'http'). If provided, `healthCheckHost` must also be set.
MDB_MCP_HTTP_BODY_LIMITEnvironment variableOptionalMaximum size of the HTTP request body in bytes (only used when transport is 'http'). This value is passed as the optional limit parameter to the Express.js json() middleware.
MDB_MCP_HTTP_HEADERSEnvironment variableOptionalHeader that the HTTP server will validate when making requests (only used when transport is 'http').

From the publisher's entry in the official MCP Registry. Required settings are already in the install config below as placeholders.

Install mongodb-mcp-server

Built from the published package, never by AI
claude mcp add mongodb-mcp-server -- npx -y mongodb-mcp-server

Run in your terminal. Add --scope user to use it in every project.

Step-by-step: install mongodb-mcp-server in Claude Code

MCP servers run with your permissions and can read what you give them access to. Some need an API key: check the README and add it under env in the mongodb-mcp-server block.

Weekly newsletter

Like mongodb-mcp-server? Get the best new MCP servers every week

The best new tools, security warnings before you install something risky, and one practical tip. Free, three minute read.

No spam. Unsubscribe in one click. Privacy

Alternatives to mongodb-mcp-server

All alternatives →

mongodb-mcp-server: common questions

How do I install mongodb-mcp-server?

In Claude Code run claude mcp add mongodb-mcp-server -- npx -y mongodb-mcp-server. For Claude Desktop, Cursor and VS Code, paste the config shown above and restart. See the install guides.

Is mongodb-mcp-server the official server?

mongodb-mcp-server is a community project by mongodb-js, not verified by a company domain.

Is mongodb-mcp-server free?

The code is published under the Apache-2.0 licence. The service it connects to may have its own pricing.

Is mongodb-mcp-server safe to use?

It scores 91 of 100. Grades: maintenance A, licence A, quality B. The security check has not run for it yet. Review the code before you install. How grades work.

What are alternatives to mongodb-mcp-server?

Similar MCP servers: Supabase, ArcadeDB MCP Server, MCP Toolbox for Databases, MCP Toolbox for Databases.

Does mongodb-mcp-server work with ChatGPT?

Not directly. It runs locally, and ChatGPT only connects to remote servers with a URL. Use it in Claude Code, Claude Desktop, Cursor, VS Code or Codex.

Add to stack

Loading.