M
MongoDB MCP
Query and manage MongoDB Atlas clusters and self-hosted databases.
Share:
About
Official MongoDB MCP server: run find/aggregate queries, inspect schemas, manage indexes, and administer Atlas projects, clusters, and users. Supports both connection-string access to any MongoDB deployment and the Atlas Admin API for cloud management. Read-only mode available for safe exploration.
Example tools
Illustrative tool names — the actual tool set is defined by the server at runtime.
query
Run a read-only SQL query
list_tables
List tables in the connected database
describe_table
Return column info for a table
Screenshots
No screenshots yet.
Frequently Asked Questions
Common questions about MongoDB MCP.
- What is the MongoDB MCP server for?
- The MongoDB MCP server allows you to query and manage MongoDB Atlas clusters and self-hosted databases. It supports tasks like running find/aggregate queries, inspecting schemas, and administering Atlas projects, clusters, and users via command-line tools or integrated development environments.
- How do I authenticate with the MongoDB MCP server?
- Authentication to the MongoDB MCP server uses an API key. This key is typically configured within your MCP client. It enables access to both connection-string based MongoDB deployments and the Atlas Admin API for cloud management features.
- What specific MongoDB database operations can I perform?
- You can perform various database operations including executing find and aggregate queries, inspecting collection schemas, and managing database indexes. The server also supports administrative functions for MongoDB Atlas projects, clusters, and users.
- Can I use the MongoDB MCP in a read-only capacity?
- Yes, a read-only mode is available for the MongoDB MCP server. This allows for safe exploration and querying of your databases without the risk of making unintended modifications. It's ideal for schema inspection and data analysis.
- What are the prerequisites for using the MongoDB MCP server?
- To use the MongoDB MCP server, you need access to a MongoDB deployment, either an Atlas cluster or a self-hosted database. Using the Atlas Admin API features requires an Atlas account with appropriate permissions and an API key.
Install MongoDB MCP
Claude Desktop
Add this to claude_desktop_config.json.
{
"mcpServers": {
"mongodb": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mongodb"
]
}
}
}Cursor
Add this to ~/.cursor/mcp.json.
{
"mcpServers": {
"mongodb": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mongodb"
]
}
}
}VS Code
Add this to your workspace settings.json.
{
"mcp.servers": {
"mongodb": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mongodb"
]
}
}
}Reviews
Sign in to leave a review.
No reviews yet. Be the first!
Discussion(0)
No comments yet.