MongoDB
Databases Key required
GitHub stars1.1k
Forks307
LicenseApache-2.0
Last activityOct 20, 2026
Open issues34
Repository: mongodb-js/mongodb-mcp-server · Data checked Oct 2026
About
Let your agent query your MongoDB Atlas clusters and databases.
Details
npx -y mongodb-mcp-serverChecked by plugmyagent · Sep 19, 2026
PlugMyAgent ScorecardChecked Oct 2026
Well kept
Actively maintained, a modest community, a key or two to set up.
MaintenanceStrong
Last commit Oct 20, 2026.
Community adoptionFair
1.1k GitHub stars.
Setup effortFair
Needs MDB_MCP_CONNECTION_STRING.
LicenseStrong
Open license: Apache-2.0.
Listing freshnessStrong
Checked by plugmyagent on Sep 19, 2026.
Rules: Methodology · Scores are never sold or adjusted for anyone.
Config for your agent
Pick your agent and copy the block into its MCP config file. The setup guide shows where that file lives for each agent.
{
"mcpServers": {
"mongodb": {
"args": [
"-y",
"mongodb-mcp-server"
],
"command": "npx",
"env": {
"MDB_MCP_CONNECTION_STRING": "mongodb+srv://user:pass@cluster.mongodb.net"
}
}
}
}{
"mcpServers": {
"mongodb": {
"args": [
"-y",
"mongodb-mcp-server"
],
"command": "npx",
"env": {
"MDB_MCP_CONNECTION_STRING": "mongodb+srv://user:pass@cluster.mongodb.net"
}
}
}
}[mcp_servers.mongodb]
command = "npx"
args = ["-y", "mongodb-mcp-server"]
env = { MDB_MCP_CONNECTION_STRING = "mongodb+srv://user:pass@cluster.mongodb.net" }{
"mcpServers": {
"mongodb": {
"args": [
"-y",
"mongodb-mcp-server"
],
"command": "npx",
"env": {
"MDB_MCP_CONNECTION_STRING": "mongodb+srv://user:pass@cluster.mongodb.net"
}
}
}
}{
"mcpServers": {
"mongodb": {
"args": [
"-y",
"mongodb-mcp-server"
],
"command": "npx",
"env": {
"MDB_MCP_CONNECTION_STRING": "mongodb+srv://user:pass@cluster.mongodb.net"
}
}
}
}{
"mcpServers": {
"mongodb": {
"args": [
"-y",
"mongodb-mcp-server"
],
"command": "npx",
"env": {
"MDB_MCP_CONNECTION_STRING": "mongodb+srv://user:pass@cluster.mongodb.net"
}
}
}
}[mcp_servers.mongodb]
command = "npx"
args = ["-y", "mongodb-mcp-server"]
env = { MDB_MCP_CONNECTION_STRING = "mongodb+srv://user:pass@cluster.mongodb.net" }{
"servers": {
"mongodb": {
"args": [
"-y",
"mongodb-mcp-server"
],
"command": "npx",
"env": {
"MDB_MCP_CONNECTION_STRING": "mongodb+srv://user:pass@cluster.mongodb.net"
}
}
}
}How to use it
- Copy the config block above for your agent.
- Paste it into your agent's MCP config file.
- Restart your agent so it picks up the new server.
- Ask your agent to use it.
Before you install
- Is it free?
- Yes. MongoDB is open source under the Apache-2.0 license and free to run. It needs an API key from the provider; a free account or free tier covers normal use.
- What do I need first?
- Node.js 18 or newer (which provides npx); values for MDB_MCP_CONNECTION_STRING (they go in the env block of the config).
If it does not show up
- Fully quit and relaunch your agent app after editing the config. Closing the window is not always enough for desktop apps.
- Check the JSON is valid: one trailing comma breaks the whole file. Our MCP Config Validator checks it in your browser.
- If the log says "npx: command not found", the runtime above is missing or the app cannot see your PATH. Install it, then relaunch the app.
- If the server starts but every call fails, a credential is usually wrong or expired: MDB_MCP_CONNECTION_STRING.