Skip to main content
Glama

mongo-mcp

MCP server untuk MongoDB dengan proteksi penghapusan data:

  • Tidak ada tool dropDatabase / dropCollection / truncate — mustahil dilakukan lewat server ini.

  • Tool delete menolak filter kosong (tidak bisa mengosongkan koleksi).

  • Tanpa confirm: true, delete hanya dry-run: mengembalikan jumlah dokumen yang akan terhapus dan meminta konfirmasi user dulu.

  • Pipeline aggregate menolak $out / $merge (tidak bisa menimpa koleksi).

  • Ramah server: pool koneksi maksimal 5, timeout koneksi 5 detik, maxTimeMS 10 detik untuk semua query baca, hasil find dibatasi 100 dokumen.

Prasyarat

cd /path/to/mongo-mcp
npm install
npm test   # opsional, verifikasi proteksi delete

Semua 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.js

Atau 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

list-databases, list-collections

Baca metadata

find, count, aggregate

Baca data (read-only, dibatasi maxTimeMS)

insert, update

Tulis data

delete

Butuh confirm: true setelah persetujuan user; filter kosong ditolak

A
license - permissive license
-
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

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

View all related MCP servers

Related MCP Connectors

  • MCP server for managing Prisma Postgres.

  • MCP (Model Context Protocol) server for Appwrite

  • MCP server for interacting with the Supabase platform

View all MCP Connectors

Latest Blog Posts

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