MongoDB
About
This MCP server, developed by kiliczsh, provides AI assistants like Claude with read-only access to MongoDB databases. It offers tools for querying collections, retrieving schema information, and executing aggregations. The server integrates seamlessly with Claude Desktop on…
Details
- Author
- kiliczsh
- Repository
- kiliczsh/mcp-mongo-server
- GitHub stars
- 141
- Downloads
- 9,396
- License
- MIT License
- Categories
- Database, Community, Other, Developer Tools, Design, Workplace, File Management, AI, Search, Infrastructure, Frontend
Jump to
- Read-Only Mode — blocks every write path (insert, update, index creation, and aggregation stages like $out/$merge that could modify data).
- Smart ObjectId Handling — configurable auto/none/force conversion of 24-character hex strings to ObjectIds.
- Schema Inference — automatic collection schema detection from document samples.
- Query & Aggregation — full query and aggregation pipeline support, with optional explain plans.
- Write Operations — insert, update, and index creation (when read-only mode is off).
- Time Conversion — a convertTime helper turns Unix timestamps and date strings into UTC/GMT/ISO, so date queries stay unambiguous across timezones.
- Progress & Cancellation — long operations report progress and can be cancelled mid-flight.
- Two Transports — run locally over stdio, or expose an HTTP endpoint for remote access.
Setting up with Highlight
Follow these steps to add this server as a custom Highlight plugin:
- 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
MongoDBCommand (node, npx, python, etc.)npxArguments-
Argument 1
mcp-mongo-server -
Argument 2
mongodb://user:pass@localhost:27017/mydatabase
Environment-
MCP_MONGODB_URI
mongodb://user:pass@localhost:27017/mydatabase
Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.
-
Argument 1
- Enable "Start Automatically" if you want the plugin to start when Highlight launches
From the repository
| Variable | Description |
|----------|-------------|
| MCP_MONGODB_URI | MongoDB connection URI (alternative to the argument) |
| MCP_MONGODB_READONLY | Enable read-only mode ("true") |
| MCP_MONGODB_ALLOW_CROSS_DB | Allow cross-database aggregation stages ("true") |
| MCP_MONGODB_ALLOW_SERVER_JS | Allow server-side JavaScript operators ("true") |
| MCP_PORT | HTTP port |
| MCP_HTTP_ALLOWED_ORIGINS | Comma-separated browser origins to allow in HTTP mode |
| MCP_HTTP_JSON_LIMIT | Max HTTP request body size (default 10mb) |
| MCP_HTTP_AUTH_TOKEN | Bearer token required to access the HTTP endpoint |
Claude Desktop / Cursor
Paste into your MCP client config file to install this server.
{
"mcpServers": {
"mongodb": {
"env": {
"MCP_MONGODB_URI": "mongodb://user:pass@localhost:27017/mydatabase"
},
"args": [
"mcp-mongo-server",
"mongodb://user:pass@localhost:27017/mydatabase"
],
"command": "npx"
}
}
}
Linux
{
"env": {
"MCP_MONGODB_URI": "mongodb://user:pass@localhost:27017/mydatabase"
},
"args": [
"mcp-mongo-server",
"mongodb://user:pass@localhost:27017/mydatabase"
],
"command": "npx"
}
Macos
{
"env": {
"MCP_MONGODB_URI": "mongodb://user:pass@localhost:27017/mydatabase"
},
"args": [
"mcp-mongo-server",
"mongodb://user:pass@localhost:27017/mydatabase"
],
"command": "npx"
}
Windows
{
"env": {
"MCP_MONGODB_URI": "mongodb://user:pass@localhost:27017/mydatabase"
},
"args": [
"/c",
"npx",
"mcp-mongo-server",
"mongodb://user:pass@localhost:27017/mydatabase"
],
"command": "cmd"
}
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.





