MCP Server with MongoDB Integration
Description
# MCP Server with MongoDB Integration This is an MCP server that provides tools for querying MongoDB data. ## Setup 1. Install dependencies using uv: ```bash uv pip install -e . ``` 2. Configure MongoDB connection: - The server will connect to MongoDB at…
About
# MCP Server with MongoDB Integration This is an MCP server that provides tools for querying MongoDB data. ## Setup 1. Install dependencies using uv: ```bash uv pip install -e . ``` 2. Configure MongoDB connection: - The server will connect to MongoDB at `mongodb://localhost:27017` by default - You can change the…
Details
- Author
- sven-olding
- Downloads
- 173
- Categories
- Database
Jump to
- Query MongoDB collections with a filter and optional limit.
- List all collections in the database.
- Default connection to localhost:27017.
- Customizable MongoDB URI and database via environment variables.
- Simple command-line invocation with minimal setup.
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
MCP Server with MongoDB IntegrationCommand (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
Install dependencies with uv pip install -e ., then run python main.py. The server connects to mongodb://localhost:27017 by default; override the connection using environment variables MONGODB_URI and MONGODB_DATABASE. Two tools are available: query_mongodb and list_collections.
Claude Desktop / Cursor
Paste into your MCP client config file to install this server.
{
"mcpServers": {
"mcp server with mongodb integration": {
"mcp-server-mongo": {
"command": "uv",
"args": [
"pip",
"install",
"-e",
"."
]
}
}
}
}
McpServers
{
"mcp-server-mongo": {
"command": "uv",
"args": [
"pip",
"install",
"-e",
"."
]
}
}
MCP Server with MongoDB Integration
This is an MCP server that provides tools for querying MongoDB data.
Setup
1. Install dependencies using uv:
uv pip install -e .
2. Configure MongoDB connection:
- The server will connect to MongoDB at mongodb://localhost:27017 by default
- You can change the connection details by setting environment variables:
- MONGODB_URI: MongoDB connection string
- MONGODB_DATABASE: Database name
Running the Server
python main.py
Available Tools
1. query_mongodb
Query a MongoDB collection with a filter.Parameters:
- collection (string): Name of the collection to query
- query (object): MongoDB query filter
- limit (integer, optional): Maximum number of results to return (default: 10)
Example:
{
"collection": "users",
"query": {"age": {"$gt": 18}},
"limit": 5
}
2. list_collections
List all collections in the database.No parameters required.
Development
To add new dependencies:
uv pip install <package-name>
To update dependencies:
uv pip install --upgrade <package-name>
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.



