MongoDB MCP Server
@seeun0210
About MongoDB MCP Server
mongodb mcp server를 만들어보자
Config
Add this server to your MCP-compatible client using the configuration below.
{
"mcpServers": {
"mongo_mcp_server": {
"command": "node",
"args": [
"dist/index.js",
"mongodb://localhost:27017"
]
}
}
}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?
A Model Context Protocol (MCP) server for MongoDB databases. It analyzes database collection structures and generates queries using AI, providing two main tools: ERD generation and natural‑language query generation.
How to use MongoDB MCP Server?
Install dependencies (npm install), build (npm run build), then run the server with node dist/index.js "mongodb://localhost:27017". For use with Claude Desktop, configure the MCP server in claude_desktop_config.json pointing to the built index.js and a MongoDB URI.
Key features of MongoDB MCP Server
- Generates ERD diagrams (Mermaid or JSON format)
- Creates MongoDB queries from natural language descriptions
- Analyzes actual database structure for accurate queries
- Supports both raw MongoDB and Mongoose query syntax
- Optional explanations for generated queries
Use cases of MongoDB MCP Server
- Quickly visualize database schema by generating ERD from collections
- Let AI write MongoDB queries from plain‑language requests
- Explore an unfamiliar database with auto‑generated ERD
- Speed up development by prototyping queries without manual MongoDB syntax
FAQ from MongoDB MCP Server
What tools are available in MongoDB MCP Server?
Two tools: generateErd (produces ERD from database collections) and generateQuery (generates MongoDB/Mongoose queries from a natural‑language description).
How do I connect the server to my MongoDB instance?
Pass the MongoDB connection string as a command‑line argument when starting the server, e.g., node dist/index.js "mongodb://localhost:27017".
Can I choose the output format for ERD?
Yes, the format parameter accepts "mermaid" (default) or "json".
Does query generation support Mongoose syntax?
Yes, the type parameter can be set to "mongoose" (default is "mongodb").
What runtime environment is required?
Node.js with npm. The server is built and run locally; a running MongoDB instance must be accessible at the provided URI.
Frequently asked questions
What tools are available in MongoDB MCP Server?
Two tools: `generateErd` (produces ERD from database collections) and `generateQuery` (generates MongoDB/Mongoose queries from a natural‑language description).
How do I connect the server to my MongoDB instance?
Pass the MongoDB connection string as a command‑line argument when starting the server, e.g., `node dist/index.js "mongodb://localhost:27017"`.
Can I choose the output format for ERD?
Yes, the `format` parameter accepts `"mermaid"` (default) or `"json"`.
Does query generation support Mongoose syntax?
Yes, the `type` parameter can be set to `"mongoose"` (default is `"mongodb"`).
What runtime environment is required?
Node.js with npm. The server is built and run locally; a running MongoDB instance must be accessible at the provided URI.
Basic information
More Databases MCP servers
Neon MCP Server
neondatabase-labsMCP server for interacting with Neon Management API and databases
Sail MCP Server for Spark SQL
lakehqDrop-in Apache Spark replacement written in Rust, unifying batch processing, stream processing, and compute-intensive AI workloads.
mcp-server-qdrant: A Qdrant MCP server
qdrantAn official Qdrant Model Context Protocol (MCP) server implementation

Lawstronaut
Lawstronaut-FZCOAccess millions of official legal and regulatory source documents from 155+ jurisdictions via MCP. Lawstronaut supports AI agents with structured legal research, legal data, laws, regulations, cases, guidance, official s
Neon MCP Server
neondatabaseMCP server for interacting with Neon Management API and databases
Comments