MongoDB Logo

MongoDB

Official

Provides a bridge between MongoDB databases and conversational interfaces, enabling comprehensive da...

139 views
4 installs
Updated Sep 9, 2025
Not audited
Provides a bridge between MongoDB databases and conversational interfaces, enabling comprehensive database operations, collection management, schema inspection, and Atlas cloud service interactions with authentication and telemetry support.
  1. Determine which authentication method you want to use:

    • If you want to connect directly to a MongoDB instance, you’ll need a MongoDB connection string.
    • If you want to use MongoDB Atlas tools (for organization, clusters, or database users), you’ll need to create a Service Account API client ID and secret from MongoDB Atlas.
  2. Obtain your MongoDB connection string (for direct database access):

    • If you are using MongoDB Atlas:
      1. Log in to MongoDB Atlas.
      2. Select your project and cluster.
      3. Click Connect.
      4. Choose Connect your application.
      5. Copy the connection string (looks like mongodb+srv://username:password@cluster.mongodb.net/myDatabase).
      6. Replace username, password, and myDatabase with your actual database credentials.
    • If you are using a self-hosted MongoDB:
      • Your connection string will be in the format: mongodb://username:password@host:port/database.
  3. To use Atlas API tools, obtain API credentials:

    1. Create a Service Account in MongoDB Atlas:
      • Log in to MongoDB Atlas.
      • Navigate to Access Manager > Organization Access.
      • Click Add New > Applications > Service Accounts.
      • Enter a name, description, and expiration (e.g., “MCP, MCP Server Access, 7 days”).
      • Assign only the minimum necessary permissions for your use case.
      • Click Create.
    2. Save Client Credentials:
      • After creation, you’ll see the Client ID and Client Secret.
      • Copy and save the Client Secret immediately; it will not be shown again.
    3. Add your IP address to the Atlas API access list.
      • Still in the Atlas dashboard, go to API Access/Access List.
      • Add your current IP address or a range to allow API access.
    4. Assign minimum permissions for required operations:
      • For basic reading, “Project Read Only” (Project level) is generally sufficient.
      • For advanced tooling, follow the roles table in the README.
  4. Fill in values in the FastMCP connection interface:

    • Click the Install Now button in your environment.
    • Use the FastMCP interface to add your keys:
      • For MongoDB connection string: Enter it into the field labeled MDB_MCP_CONNECTION_STRING.
      • For Atlas API: Enter your MDB_MCP_API_CLIENT_ID and MDB_MCP_API_CLIENT_SECRET in the provided fields.
    • Only one method is required: either a connection string (for direct DB access) or API credentials (for Atlas operations).
  5. Finish Setup:

    • Save changes in FastMCP.
    • The server will now have access to your MongoDB database or Atlas project according to the credentials provided.

Summary Table of Required Information:

Option FastMCP Field(s) Where to get it
Direct MongoDB MDB_MCP_CONNECTION_STRING MongoDB Atlas UI or self-hosted config
Atlas API (recommended) MDB_MCP_API_CLIENT_ID and MDB_MCP_API_CLIENT_SECRET Atlas Service Account setup in Atlas UI

Quick Start

View on GitHub

More for Database

View All →

Similar MCP Servers

MongoDB Atlas

MongoDB Atlas

Official

Integrates with MongoDB Atlas to enable creating and managing database resources including clusters, network access, users, and connection strings using TypeScript and the MongoDB Atlas API.

Database
108
0
M

MongoDB

Query and analyze MongoDB databases.

Database
118
1

Report Issue

Thank you! Your issue report has been submitted successfully.