MongoDB

MongoDB

Official
Data & Analytics
Connection string

Run database operations and Atlas management across any MongoDB deployment.

MongoDB

Run database operations and Atlas management across any MongoDB deployment. With Lunar.dev MCPX, the MCP Gateway for secure and governed tool access, you connect the MongoDB MCP server to Claude, ChatGPT, Cursor, and any MCP client through one gateway that routes, authenticates, and governs every MongoDB tool call against your policies.

Why MCPX

MCPX is Lunar.dev's MCP Gateway. It sits between your AI agents and your MCP servers as a single gateway for every tool call, routing, authenticating, and governing traffic against your policies. Connect MongoDB once and govern it everywhere: role-based access per agent with on-behalf-of attribution, real-time visibility, and an immutable audit trail of who did what, all deployable inside your own VPC.

Tools content

  • aggregate · Read-only
    Run an aggregation against a MongoDB collection.
  • aggregate-db · Read-only
    Run an aggregation against a MongoDB database.
  • collection-indexes · Read-only
    Describe the indexes for a collection.
  • collection-schema · Read-only
    Describe the schema for a collection.
  • collection-storage-size · Read-only
    Get the size of the collection.
  • connect · Read-only
    Connect to a MongoDB instance.
  • count · Read-only
    Get the number of documents in a collection with an optional filter.
  • create-collection · Write
    Create a new collection in a database.
  • create-index · Write
    Create an index for a collection.
  • db-stats · Read-only
    Return statistics on the use state of a single database.
  • delete-many · Write
    Remove all documents that match the filter from a collection.
  • drop-collection · Write
    Remove a collection or view from the database, including its indexes.
  • drop-database · Write
    Remove the specified database, deleting its data files.
  • drop-index · Write
    Drop an index for the provided database and collection.
  • explain · Read-only
    Return execution statistics for the winning query plan.
  • export · Read-only
    Export a query or aggregation results in EJSON format.
  • find · Read-only
    Run a find query against a MongoDB collection.
  • insert-many · Write
    Insert an array of documents into a collection.
  • list-collections · Read-only
    List all collections for a given database.
  • list-databases · Read-only
    List all databases for a MongoDB connection.

See all 48 tools

Frequently asked questions

What is the MongoDB MCP server?

Run database operations and Atlas management across any MongoDB deployment. Through Lunar.dev MCPX, MongoDB connects to any MCP-compatible AI client behind a single governed gateway.

How do I connect MongoDB to MCPX?

Add the MongoDB server in the MCPX control plane or your app.yaml, then point your AI client at your MCPX gateway. MCPX handles Connection string and routes every MongoDB call through the gateway.

Is the MongoDB MCP server official?

Yes. MongoDB is an official, vendor-published MCP server, and MCPX governs it like any other server in your catalog.

What authentication does MongoDB use with MCPX?

MongoDB uses Connection string. MCPX enforces authentication at the gateway with token-based auth, OAuth, and role-based profiles, so you control which agents can invoke it.

How many tools does MongoDB expose in MCPX?

MongoDB exposes 49 tools. In MCPX you can enable or disable each tool per agent for least-privilege access.

Server details

CategoryData & Analytics
AuthConnection string
Connectionstdio
Tools49 available