mongodb-mcp-server  by mongodb-js

MongoDB Model Context Protocol server

Created 5 months ago
632 stars

Top 52.4% on SourcePulse

GitHubView on GitHub
Project Summary

This project provides a Model Context Protocol (MCP) server for interacting with MongoDB databases and MongoDB Atlas. It enables various AI tools and applications to query and manage MongoDB data and infrastructure, offering a unified interface for data access and administrative tasks.

How It Works

The server acts as a bridge, translating MCP requests into MongoDB commands or Atlas API calls. It supports direct connections via connection strings or authentication through Atlas API credentials obtained from service accounts. This dual approach allows flexibility in how users connect and manage their MongoDB resources, whether for data retrieval or infrastructure management.

Quick Start & Requirements

  • Install/Run: npx -y mongodb-mcp-server or via Docker: docker run --rm -i mongodb/mongodb-mcp-server:latest
  • Prerequisites: Node.js v20.10.0 or later. Atlas API credentials (service account) are required for Atlas tools.
  • Configuration: Via command-line arguments, environment variables (MDB_MCP_CONNECTION_STRING, MDB_MCP_API_CLIENT_ID, MDB_MCP_API_CLIENT_SECRET), or an MCP configuration file.
  • Docs: https://modelcontextprotocol.io/quickstart/user

Highlighted Details

  • Supports a wide range of MongoDB Database Tools (e.g., find, aggregate, insert-one, collection-schema).
  • Includes MongoDB Atlas Tools for managing organizations, projects, clusters, and users.
  • Offers readOnly mode to restrict operations to read and metadata actions.
  • Provides indexCheck mode to enforce query index usage for performance.

Maintenance & Community

  • Primarily maintained by MongoDB.
  • Contribution guidelines are available in the CONTRIBUTING.md file.

Licensing & Compatibility

  • The README does not explicitly state a license. Compatibility for commercial use or closed-source linking is not specified.

Limitations & Caveats

The project requires Node.js v20.10.0 or later. Atlas API tools necessitate the creation and secure management of MongoDB Atlas service accounts and their credentials. The license is not specified, which may impact commercial adoption.

Health Check
Last Commit

1 day ago

Responsiveness

1 day

Pull Requests (30d)
104
Issues (30d)
15
Star History
62 stars in the last 30 days

Explore Similar Projects

Starred by Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems"), Gregor Zunic Gregor Zunic(Cofounder of Browser Use), and
2 more.

airweave by airweave-ai

0.5%
3k
Semantic MCP server for AI agents
Created 8 months ago
Updated 20 hours ago
Feedback? Help us improve.