MongoDB MCP Server π
About
A powerful Model Context Protocol (MCP) server implementation for MongoDB integration
Details
- License
- MIT license
Explore
- π Full MongoDB CRUD operations support
- π Secure connection handling with MongoDB Atlas
- π¦ Async/await patterns for optimal performance
- π‘οΈ Comprehensive error handling
- π¦ Docker support for easy deployment
- π Query execution with proper type hints
Setting up with Highlight
This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:
- Download and install Highlight from highlightai.com/download
- Navigate to the plugins tab and select "Add Custom Plugin"
-
Configure the plugin with the settings below
Plugin Name
MongoDB MCP Server πCommand (node, npx, python, etc.)Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.
- Enable "Start Automatically" if you want the plugin to start when Highlight launches
From the repository
Set these environment variables before running the server:
Add this to your VS Code settings.json:
json{
"mcp": {
"inputs": [
{
"type": "promptString",
"id": "mongodbUri",
"description": "MongoDB Connection URI"
}
],
"servers": {
"mongodb": {
"command": "uvx",
"args": ["mongodb-mcp-bridge", "--transport=sse"],
"env": {
"MONGODB_URI": "$(mongodbUri)"
}
}
}
}
}
For Cursor or Windsurf, configure the MCP server with:
json{
"mcp": {
"servers": {
"mongodb": {
"url": "http://localhost:6274"
}
}
}
}
Using the MCP Inspector (http://127.0.0.1:6274):
json// List all databases
{
"tool": "list_databases"
}
// Find documents in a collection
{
"tool": "find_documents",
"database": "your_database",
"collection": "your_collection",
"query": {"status": "active"},
"limit": 5
}
```
database
Database name
collection
Collection name
query
MongoDB query object (optional)
limit
Maximum number of documents to return (default: 10)
1. ping
- Quick connection test to verify MongoDB connectivity
2. list_databases
- List all available databases in the MongoDB instance
3. find_documents
- Query documents in a collection with filtering options
- Parameters:
- database: Database name
- collection: Collection name
- query: MongoDB query object (optional)
- limit: Maximum number of documents to return (default: 10)
Claude Desktop / Cursor
Paste into your MCP client config file to install this server.
{
"mcpServers": {
"mongodb mcp server \ud83d\ude80": {
"mongodb-mcp-bridge": {
"command": "uvx",
"args": [
"mongodb-mcp-bridge"
]
}
}
}
}
McpServers
{
"mongodb-mcp-bridge": {
"command": "uvx",
"args": [
"mongodb-mcp-bridge"
]
}
}
A powerful Model Context Protocol (MCP) server implementation for MongoDB integration, providing seamless interaction with MongoDB databases through a standardized protocol.
π Author
Syed Asadπ Overview
This MCP server implementation provides a robust interface for interacting with MongoDB databases through the Model Context Protocol. It supports operations on databases, collections, and documents with proper async/await patterns and error handling.
β¨ Features
- π Full MongoDB CRUD operations support
- π Secure connection handling with MongoDB Atlas
- π¦ Async/await patterns for optimal performance
- π‘οΈ Comprehensive error handling
- π¦ Docker support for easy deployment
- π Query execution with proper type hints
π Quick Start
Using uvx (Python)
```bash
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.



