mongo-mcp
Provides tools for interacting with a MongoDB database, including querying, aggregating, inserting, updating, and deleting documents, with safety protections against destructive operations.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mongo-mcpfind all documents in the users collection where age is greater than 30"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
mongo-mcp
MCP server untuk MongoDB dengan proteksi penghapusan data:
Tidak ada tool
dropDatabase/dropCollection/ truncate — mustahil dilakukan lewat server ini.Tool
deletemenolak filter kosong (tidak bisa mengosongkan koleksi).Tanpa
confirm: true,deletehanya dry-run: mengembalikan jumlah dokumen yang akan terhapus dan meminta konfirmasi user dulu.Pipeline
aggregatemenolak$out/$merge(tidak bisa menimpa koleksi).Ramah server: pool koneksi maksimal 5, timeout koneksi 5 detik,
maxTimeMS10 detik untuk semua query baca, hasilfinddibatasi 100 dokumen.
Prasyarat
cd /path/to/mongo-mcp
npm install
npm test # opsional, verifikasi proteksi deleteSemua contoh di bawah memakai path absolut /Users/wahyu/Projects/playground/mongo-mcp/index.js — sesuaikan dengan lokasi clone kamu. MONGODB_URI opsional (default mongodb://localhost:27017).
Related MCP server: mongodb3-mcp-server
Claude Code
claude mcp add mongo --env MONGODB_URI=mongodb://localhost:27017 -- node /Users/wahyu/Projects/playground/mongo-mcp/index.jsAtau manual di .mcp.json (project) / ~/.claude.json (global):
{
"mcpServers": {
"mongo": {
"command": "node",
"args": ["/Users/wahyu/Projects/playground/mongo-mcp/index.js"],
"env": { "MONGODB_URI": "mongodb://localhost:27017" }
}
}
}Untuk Claude Desktop, tambahkan blok mcpServers yang sama ke ~/Library/Application Support/Claude/claude_desktop_config.json.
Codex (OpenAI Codex CLI)
Tambahkan ke ~/.codex/config.toml:
[mcp_servers.mongo]
command = "node"
args = ["/Users/wahyu/Projects/playground/mongo-mcp/index.js"]
env = { MONGODB_URI = "mongodb://localhost:27017" }OpenCode
Tambahkan ke opencode.json (project) atau ~/.config/opencode/opencode.json:
{
"mcp": {
"mongo": {
"type": "local",
"command": ["node", "/Users/wahyu/Projects/playground/mongo-mcp/index.js"],
"environment": { "MONGODB_URI": "mongodb://localhost:27017" },
"enabled": true
}
}
}Kilo Code
Settings → MCP Servers → Edit MCP Settings (mcp_settings.json), atau .kilocode/mcp.json di project:
{
"mcpServers": {
"mongo": {
"command": "node",
"args": ["/Users/wahyu/Projects/playground/mongo-mcp/index.js"],
"env": { "MONGODB_URI": "mongodb://localhost:27017" }
}
}
}Antigravity
Agent panel → ikon MCP / Manage MCP Servers → Edit mcp_config.json:
{
"mcpServers": {
"mongo": {
"command": "node",
"args": ["/Users/wahyu/Projects/playground/mongo-mcp/index.js"],
"env": { "MONGODB_URI": "mongodb://localhost:27017" }
}
}
}Tools
Tool | Keterangan |
| Baca metadata |
| Baca data (read-only, dibatasi |
| Tulis data |
| Butuh |
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityCmaintenanceFull featured MCP Server for MongoDB database analysis.Last updated105204MIT
- Alicense-qualityDmaintenanceA lightweight MCP server for MongoDB 3.6+ providing read, write, metadata, and management tools.Last updated181MIT
- Alicense-qualityDmaintenanceAn MCP server that enables querying, inserting, updating, deleting, aggregating, and listing collections in MongoDB via natural language commands.Last updated43MIT
- Alicense-qualityBmaintenanceMCP server for comprehensive MongoDB integration, enabling database operations, document management, schema analysis, and query tools.Last updated22MIT
Related MCP Connectors
MCP server for managing Prisma Postgres.
MCP (Model Context Protocol) server for Appwrite
MCP server for interacting with the Supabase platform
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/wahyuakbarwibowo/mongo-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server