MongoDB MCP Server
@ryaker
About MongoDB MCP Server
A Model Context Protocol server for MongoDB integration with Claude
Basic information
Config
Add this server to your MCP-compatible client using the configuration below.
{
"mcpServers": {
"mongo-custom-server": {
"command": "node",
"args": [
"/Volumes/Dev/localDev/MCPServers/CustomMongo_clean/mongo-mcp-server.js"
],
"env": {
"MONGODB_URI": "",
"DEFAULT_DATABASE": ""
}
}
}
}Tools
No tools detected
We auto-extract tools from the README. The maintainer can list them under a ## Tools heading to populate this section.
Overview
What is MongoDB MCP Server?
The MongoDB MCP Server is a Model Context Protocol implementation that bridges Claude with MongoDB databases. It enables Claude to perform a wide range of MongoDB operations—including querying, aggregation, data manipulation (CRUD), and database management—directly from a conversation. It is designed for users of Claude Desktop or Cursor who need to interact with MongoDB through AI.
How to use MongoDB MCP Server?
Install prerequisites (Node.js v14+, access to a MongoDB instance, and Claude Desktop or Cursor). Clone the repository, install dependencies with npm install, then configure the MCP client (Claude Desktop or Cursor) by adding an entry in its MCP settings with the absolute path to mongo-mcp-server.js and environment variables: MONGODB_URI (required) and optional DEFAULT_DATABASE. Restart the client to load the server.
Key features of MongoDB MCP Server
- Comprehensive MongoDB operations: find, aggregate, count, distinct, sample.
- CRUD support: insert, update, delete documents (single or bulk).
- Database management: list databases, list collections, drop collections.
- Query analysis via
explaintool for aggregation pipelines. - Flexible database selection per operation (defaults to
DEFAULT_DATABASE). - Secure connection using environment variables for credentials.
Use cases of MongoDB MCP Server
- Query and analyze documents in a collection through natural language.
- Insert, update, or delete documents without writing MongoDB queries manually.
- Run aggregation pipelines and get execution plans for performance insights.
- Manage collections and databases (list, drop) during conversations.
- Count documents or get distinct values for a field across a database.
FAQ from MongoDB MCP Server
What runtime and dependencies are required?
Node.js v14 or newer, a MongoDB instance (local or Atlas), and the Claude Desktop or Cursor application. The server uses the MongoDB Node.js driver.
How is the connection string configured?
The MONGODB_URI environment variable must be set to a valid MongoDB connection string. The DEFAULT_DATABASE environment variable is optional and sets the default database if no database parameter is provided in a tool call.
Where does data live?
Data remains in the MongoDB instance specified by the connection string. The server does not store any data locally; it only acts as a bridge.
What are the known limits or constraints?
The sample tool has a default count of 5 and a maximum of 10. The find tool has a default limit of 10 and a maximum of 100. The dropCollection tool requires a confirm boolean parameter set to true to proceed.
What transport and authentication are used?
The server uses the MCP protocol over standard I/O (stdio) for communication with Claude. Authentication to MongoDB is handled via the connection string in the MONGODB_URI environment variable; no other authentication mechanism is provided.
More Databases MCP servers
Elasticsearch MCP Server
elasticMotherDuck's DuckDB MCP Server
motherduckdbLocal MCP server for DuckDB and MotherDuck
mcp_mysql_server
xwb602625136Model Context Protocol (MCP) server that supports secure interaction with MySQL databases and has anomaly analysis capabilities.更加牛逼!更加好用!不仅止于mysql的增删改查功能; 还包含了数据库异常分析能力;且便于开发者们进行个性化的工具扩展
mcp_mysql_server
wenb1n-devModel Context Protocol (MCP) server that supports secure interaction with MySQL databases and has anomaly analysis capabilities.更加牛逼!更加好用!不仅止于mysql的增删改查功能; 还包含了数据库异常分析能力;且便于开发者们进行个性化的工具扩展
Meilisearch MCP Server
meilisearchA Model Context Protocol (MCP) server for interacting with Meilisearch through LLM interfaces.
Comments