MongoDB MCP Server

A Model Context Protocol (MCP) server that enables LLMs to connect MongoDB using mcp-go.

Local serverstdioGo

What is the MongoDB MCP Server?

A Model Context Protocol (MCP) server that enables LLMs to connect MongoDB using mcp-go.

What the server does

A Model Context Protocol (MCP) server that enables LLMs to connect MongoDB using mcp-go. The server acts as a bridge between the LLM and the MongoDB database, allowing you to perform CRUD operations using natural language.

  • MongoDB action — Query Collection, Document and Index
  • SSE Support — Run MCP Server using Server-Sent Events (SSE)

More MCP options

Compare MCP servers by category, or browse hosted MCP servers if you prefer an endpoint over a local process.

Maintainer setup documentation.

Recorded tools

Check the linked publisher documentation and your connected client's tool list. Names and availability can vary with the server version and account permissions.

ToolWhat it does
findQuery documents with filtering and projection
listCollectionsList available collections
insertOneInsert a single document
updateOneUpdate a single document
deleteOneDelete a single document
createIndexCreate a new index
dropIndexRemove an index
indexesList indexes for a collection

Example prompts to try

  • “Use MongoDB to find.”
  • “Use MongoDB to Count.”
  • “Use MongoDB to listCollections.”

Frequently asked questions

Configuration is managed through a `config.yml` file with MongoDB connection details (host, port, user, password, database) and MCP server settings (name, version, base URL, address, SSE toggle).