AITeamGuide Hub · MCP server
MongoDB MCP Server
MongoDB's official MCP server for querying and managing MongoDB databases and Atlas clusters.
MCP server★ 1.1k starsArchived on GitHubApache-2.0Software developmentOps & IT
Key facts
- Type
- MCP server
- Jobs it fits
- Query and manage a database
- Fields
- Software development, Ops & IT
- Works with
- Any MCP client, Claude Code, Cursor, VS Code
- Licence
- Apache-2.0
- Stars
- 1,146 as of October 21, 2026
- Last updated
- October 21, 2026 (last push to GitHub)
- Author
- @mongodb-js
- Submitted by
- @aiteamguide
- Added to the Hub
- October 21, 2026
Install / Use it
Apache-2.0Local MCP server
Cursor
Replace the placeholder values (API keys, tokens) with your own after adding it.
Or paste into ~/.cursor/mcp.json
{
"mcpServers": {
"mongodb": {
"command": "npx",
"args": [
"-y",
"mongodb-mcp-server@latest",
"--readOnly"
],
"env": {
"MDB_MCP_CONNECTION_STRING": "mongodb://localhost:27017/myDatabase"
}
}
}
}Claude Code
Run in your terminal
claude mcp add --transport stdio mongodb --env MDB_MCP_CONNECTION_STRING=mongodb://localhost:27017/myDatabase -- npx -y mongodb-mcp-server@latest --readOnlyReplace the placeholder values (API keys, tokens) with your own after adding it.
Claude Desktop
Add to claude_desktop_config.json (Settings → Developer → Edit Config), then restart Claude
{
"mcpServers": {
"mongodb": {
"command": "npx",
"args": [
"-y",
"mongodb-mcp-server@latest",
"--readOnly"
],
"env": {
"MDB_MCP_CONNECTION_STRING": "mongodb://localhost:27017/myDatabase"
}
}
}
}Replace the placeholder values (API keys, tokens) with your own after adding it.
VS Code
Replace the placeholder values (API keys, tokens) with your own after adding it.
Or from the command line
code --add-mcp '{"name":"mongodb","type":"stdio","command":"npx","args":["-y","mongodb-mcp-server@latest","--readOnly"],"env":{"MDB_MCP_CONNECTION_STRING":"mongodb://localhost:27017/myDatabase"}}'Codex
Run in your terminal
codex mcp add mongodb --env MDB_MCP_CONNECTION_STRING=mongodb://localhost:27017/myDatabase -- npx -y mongodb-mcp-server@latest --readOnlyReplace the placeholder values (API keys, tokens) with your own after adding it.
Safety: Runs code from a third-party repo. Review the source and the permissions before installing.
Commands and configs are taken from the project's README and re-wrapped in each app's documented format. If they differ, the README wins.
Prefer a ready-made product?
Commercial agents for the same job, with real prices: all coding agents.
More from the Hub
-
Skill
Superpowers
A skills library and working method for coding agents: brainstorm, plan, test first, then build.
Software development★ 303k
-
Agent
OpenCode
An open-source coding agent for the terminal and desktop that works with many model providers.
Software development★ 220k
-
MCP server
MCP reference servers
The official set of reference MCP servers (filesystem, fetch, git, memory, time and more) used as starting points.
Software development · Personal productivity★ 91k
-
MCP server
Context7
An MCP server and CLI that feeds coding assistants up-to-date library docs so they stop using outdated APIs.
Software development★ 63k
Summary written by AITeamGuide in our own words. GitHub numbers come from the public GitHub API and refresh daily. Maintainer and want a correction or removal? Tell us. Got something similar? Submit it to the Hub.