mcp-mongo-server

MCP server for querying and modifying MongoDB from AI assistants

Local

Install

See setup instructions on www.npmjs.com

What it does

This server implements the Model Context Protocol for MongoDB, letting an AI assistant inspect collections, infer document schemas, run queries and aggregation pipelines, and perform writes. It is intended for developers using MCP-capable clients such as Claude Desktop, Cursor, and Windsurf who want to explore or manipulate a MongoDB database conversationally.

It runs on Node.js 20 or newer via npx and supports stdio for local clients or an HTTP endpoint at /mcp for remote access. Configuration can be given as a connection URI argument or environment variable, or as a JSON object of named connections each with its own database permissions. Read-only mode, cross-database aggregation blocking, and server-side JavaScript blocking are available as flags.

Limits are worth noting: HTTP mode rejects browser origins outside localhost unless explicitly allowed, and an optional bearer token can gate the endpoint. Aggregation stages that touch other databases, and operators like $where and $function, are disabled by default. The project recommends scoping MongoDB users to least privilege as a backstop.

Compatibility and authentication

Connection
Local
Transports
Unspecified
Authentication
Unknown

Security and permissions

  • When you run the server locally, it runs with your user permissions.
  • Authentication type: Unknown.

Repository data

Stars
284
Last push
Nov 11, 2026
License
MIT
Archived
No

Other MongoDB MCP servers

Compare servers
  • Open-source desktop SQL workspace with an MCP server for AI coding agents.

    • BigQuery
    • ClickHouse
    • DuckDB
    Updated
  • Self-hosted workflow automation with AI agent steps and 250+ connectors.

    • Anthropic
    • DeepSeek
    • Hugging Face
    Updated
  • Database client for VS Code with built-in MCP access for AI agents

    • BigQuery
    • Chroma
    • ClickHouse
    Updated
  • veil

    MCP

    Local privacy proxy that pseudonymises personal data before AI coding agents see it.

    • MariaDB
    • MongoDB
    • MySQL
    Updated

FAQ

What license does mcp-mongo-server use?
MIT
Does mcp-mongo-server run locally or remotely?
It runs locally.
Is mcp-mongo-server an official server?
It is listed as a community server.

Comments

No comments yet.

Embed a listing badge

Featured on AI Agents Marketplace
<a href="https://aiagentsmarketplace.dev/mcp/mcp-mongo-server"><img src="https://aiagentsmarketplace.dev/badges/featured.svg" alt="Featured on AI Agents Marketplace" width="262" height="36"></a>
See badge options