mongodb-js

mongodb-mcp-server: Connect AI Agents to MongoDB and Atlas

A TypeScript Model Context Protocol server built for MongoDB databases and MongoDB Atlas. It gives compatible AI agents tools for database queries and Atlas management, with local and Atlas-hosted connection options.

ActiveTypeScriptApache-2.0AI AgentsDatabaseMCP Server
View on GitHub Compare
Stars
1.1k
Forks
297
Stars, last 30 days
+20
Last commit
today
Contributors
50

Our take

Activeregular commits and releases

Health score

75/100

How it is scored
Activity
87
Community
78
Issues
72
Pull requests
61

+20 stars in the last 30 days

  • Releases more often than 91% of the projects we track
  • Merges more pull requests than 88% of the projects we track

This is an actively maintained, broad MongoDB-to-agent integration, with recent commits and releases, a sizable contributor base, and quick issue and pull request handling.

Good fit if

  • You use MongoDB or Atlas and want MCP tools available inside a compatible AI client.
  • You need a choice of local database access, Atlas credentials, or the recommended Atlas-hosted MCP plugin route.
  • You want to configure read-only access or require confirmation for selected operations.

Look elsewhere if

  • Your data platform is not MongoDB or MongoDB Atlas.
  • You need a server that does not require Node.js or a MongoDB connection or Atlas credentials.
  • You need a different integration protocol than MCP.
All health signals
Last commit2026-10-21 (today)
Commits, last 90 days100+
Releases, last 12 months78 (latest v3.1.1-pre.1, 2026-10-15, pre-release)
Contributors50 (top contributor: 27% of commits)
Issues closed, last 90 days10+ (typically closed in 1 day)
Pull requests merged, last 90 days83 (typically merged in 1 day)
Project age19 months

Checked on 2026-10-22 with the GitHub API.

Project history

Daily GitHub snapshots since Oct 7, 2026. History covers stars and forks; health signals are not tracked historically.

Selected snapshot

Stars

1,163

Forks

299

Change since Nov 16, 2026: +1 stars·0 forks

Overview

mongodb-mcp-server is a TypeScript Model Context Protocol server built for MongoDB databases and MongoDB Atlas. It connects AI agents to MongoDB so they can query and inspect data or perform database and Atlas operations through MCP tools.

It supports direct connections to MongoDB deployments and tools for managing Atlas resources. For Atlas, the project recommends its hosted MCP server and agent plugins; the local server can also connect using Atlas credentials. Read-only configuration is available for limiting database access.

Key Features

  • Provides MongoDB tools for querying collections, running aggregations, inspecting schemas and indexes, and viewing database statistics.
  • Includes database write and administration tools, such as inserting or updating documents, creating indexes, and dropping collections or databases.
  • Offers Atlas tools for managing projects, clusters, database users, access lists, alerts, and Stream Processing resources.
  • Supports direct MongoDB connection strings and Atlas Service Account credentials.
  • Can run locally through npx or Docker, and supports MCP clients including Cursor, Claude, Codex, and VS Code.
  • Includes configuration for read-only operation, disabled tools, and confirmation requirements for selected operations.
  • Exposes resources for configuration, connection debugging, and exported query results.

Use Cases

  • A developer can ask an MCP-compatible agent to inspect a MongoDB collection's schema or indexes while investigating an application issue.
  • A data analyst can explore documents and run aggregations through an AI client without switching between the client and database tooling.
  • An Atlas administrator can use an agent to inspect clusters or alerts and carry out supported project-management tasks.
  • A team evaluating agent access to production data can configure read-only mode and use the server's database tools for controlled exploration.

What you need

Detected in the repository

  • Node.js ^20.19.0 || ^22.13.0 || >= 24.0.0 (from package.json)
  • Automated checks on GitHub Actions

License in plain words

Apache-2.0permissive

  • Commercial use: yes
  • Modify and redistribute: yes
  • You must keep: the license, the NOTICE file and a note of your changes
  • Share your changes: no
  • Includes an explicit patent grant from the contributors:

A summary, not legal advice: the LICENSE file is what applies.

Getting Started

Requires a supported Node.js version. Start the interactive setup with:

npx -y mongodb-mcp-server@latest setup

See the README for manual configuration, client-specific instructions, and the full tool list.

Alternatives

  • whodb: WhoDB is a self-hosted database browsing workspace with optional AI-assisted queries, rather than an MCP server for MongoDB and Atlas tools.
ProjectLanguageLicenseStarsStatus
mongodb-mcp-serverTypeScriptApache-2.01.1kActive
whodbGoApache-2.05kActive

Considerations

  • The server can perform destructive or modifying operations, including deleting documents and dropping databases. Configure read-only mode or tool confirmations to match the access you intend to grant.
  • Atlas tools require Atlas API credentials when using the local server. MongoDB connection-string access requires a reachable MongoDB deployment.
  • The README requires Node.js 22.13 or later, while the package runtime metadata also lists compatible Node.js 20.19 and 24-or-later releases. Check the current package requirements before deployment.
  • The latest listed release is a prerelease, so teams that require stable releases should review the release status before adopting it.
  • Repository metadata does not report a test suite, which may matter to teams assessing automated validation before relying on changes.

Found this useful?

Share it with someone who would like mongodb-mcp-server.

Comparisons