A reliable MongoDB MCP server that provides seamless MongoDB integration for Claude Desktop with built-in schema discovery and field validation
Setup
Choose your client, copy the config, then fill in any required environment variables.
claude mcp add mongodb-that-works --env MONGODB_URI='<MONGODB_URI>' -- npx -y @sourabhshegane/mongodb-mcp-that-works~/.codex/config.toml
[mcp_servers.mongodb-that-works]
command = "npx"
args = ["-y", "@sourabhshegane/mongodb-mcp-that-works"]
env = { MONGODB_URI = "<MONGODB_URI>" }
# codex mcp add mongodb-that-works --env MONGODB_URI='<MONGODB_URI>' -- npx -y @sourabhshegane/mongodb-mcp-that-works~/.cursor/mcp.json
{
"mcpServers": {
"mongodb-that-works": {
"command": "npx",
"args": [
"-y",
"@sourabhshegane/mongodb-mcp-that-works"
],
"env": {
"MONGODB_URI": "<MONGODB_URI>"
}
}
}
}.vscode/mcp.json
{
"servers": {
"mongodb-that-works": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@sourabhshegane/mongodb-mcp-that-works"
],
"env": {
"MONGODB_URI": "<MONGODB_URI>"
}
}
}
}~/.gemini/settings.json
{
"mcpServers": {
"mongodb-that-works": {
"command": "npx",
"args": [
"-y",
"@sourabhshegane/mongodb-mcp-that-works"
],
"env": {
"MONGODB_URI": "<MONGODB_URI>"
}
}
}
}claude_desktop_config.json
{
"mcpServers": {
"mongodb-that-works": {
"command": "npx",
"args": [
"-y",
"@sourabhshegane/mongodb-mcp-that-works"
],
"env": {
"MONGODB_URI": "<MONGODB_URI>"
}
}
}
}.trae/mcp.json
{
"mcpServers": {
"mongodb-that-works": {
"command": "npx",
"args": [
"-y",
"@sourabhshegane/mongodb-mcp-that-works"
],
"env": {
"MONGODB_URI": "<MONGODB_URI>"
}
}
}
}Environment variables
MONGODB_URI
Replace the placeholders with your own credentials and keep them out of version control.