mongodb-mcp-server  by mongodb-js

MongoDB Model Context Protocol server

created 4 months ago
450 stars

Top 67.9% 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

2 days ago

Responsiveness

Inactive

Pull Requests (30d)
62
Issues (30d)
14
Star History
449 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.