About MongoDB MCP Server
MongoDB MCP Server connects LLMs to MongoDB through mcp-go, enabling database operations from natural-language requests. It provides tools for document queries and updates as well as collection index management, with SSE support.
Key features
- 01Query documents with filters and projections
- 02Count documents and list collections
- 03Insert, update, and delete documents
- 04Create, drop, and list indexes
- 05Run the server over SSE
Use cases
- 01Find documents using filters
- 02Manage documents in a collection
- 03Inspect or change collection indexes
MCP support
The MCP server exposes MongoDB query, document CRUD, collection listing and counting, and index-management tools to MCP clients. It supports Server-Sent Events (SSE).
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.
Tools
Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.
Details
From the project READMEMongoDB MCP Server
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.
Features
- MongoDB action: Query Collection, Document and Index
- SSE Support: Run MCP Server using Server-Sent Events (SSE)
Available Tools
Query Tools
- find: Query documents with filtering and projection
- Count: Count documents in a collection
- listCollections: List available collections
- insertOne: Insert a single document
- updateOne: Update a single document
- deleteOne: Delete a single document
Index Tools
- createIndex: Create a new index
- dropIndex: Remove an index
- indexes: List indexes for a collection
Configuration
copy the
config.yml.examplefile toconfig.ymland modify it according to your needs.
The server configuration is managed through the config.yml file. Below is an example configuration:
mongo:
host: mongodb
port: 27017
user: admin
password: 123456
database: db
mcp:
name: mongo-mcp-server
version: 1.0.0
base_url: localhost:8081
address: ":8081"
sse: true
-
MongoDB Configuration:
host: MongoDB server host.port: MongoDB server port.user: MongoDB username.password: MongoDB password.database: Target MongoDB database.
-
MCP Server Configuration:
name: Name of the MCP server.version: Version of the MCP server.base_url: Base URL for the server.address: Address and port for the server to listen on.sse: Enable or disable SSE support, default istrue.
Usage
Start the MCP Server: Run the server using the following command:
go run main.go
Use in DeepChat

Example

References
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.