Basic information
About MCP MongoDB Server
A Model Context Protocol Server for MongoDB
MCP MongoDB Server is a MCP server in the Databases category listed in the AddMCP.net directory, published by kiliczsh. Supported transport: stdio. Runtime: node. License: MIT. The repository has 281 GitHub stars. Source code is hosted on github.com. Related topics: antrophic, claude, claude-desktop, cline, cursor.
Setup
{
"mcpServers": {
"mongodb": {
"command": "npx",
"args": [
"-y",
"github:kiliczsh/mcp-mongo-server",
"mongodb://muhammed:kilic@localhost:27017/database"
]
},
"mongodb-readonly": {
"command": "npx",
"args": [
"-y",
"github:kiliczsh/mcp-mongo-server",
"mongodb://muhammed:kilic@localhost:27017/database",
"--read-only"
]
}
}
}
{
"mcpServers": {
"mongodb": {
"command": "npx",
"args": [
"-y",
"github:kiliczsh/mcp-mongo-server",
"mongodb://muhammed:kilic@localhost:27017/database"
]
},
"mongodb-readonly": {
"command": "npx",
"args": [
"-y",
"github:kiliczsh/mcp-mongo-server",
"mongodb://muhammed:kilic@localhost:27017/database",
"--read-only"
]
}
}
}
{
"servers": {
"mongodb": {
"command": "npx",
"args": [
"-y",
"github:kiliczsh/mcp-mongo-server",
"mongodb://muhammed:kilic@localhost:27017/database"
]
},
"mongodb-readonly": {
"command": "npx",
"args": [
"-y",
"github:kiliczsh/mcp-mongo-server",
"mongodb://muhammed:kilic@localhost:27017/database",
"--read-only"
]
}
}
}
MCP MongoDB Server — by kiliczsh config
Add this server to your MCP-compatible client using the configuration below.
{
"mcpServers": {
"mongodb": {
"command": "npx",
"args": [
"-y",
"github:kiliczsh/mcp-mongo-server",
"mongodb://muhammed:kilic@localhost:27017/database"
]
},
"mongodb-readonly": {
"command": "npx",
"args": [
"-y",
"github:kiliczsh/mcp-mongo-server",
"mongodb://muhammed:kilic@localhost:27017/database",
"--read-only"
]
}
}
}
MCP MongoDB Server — by kiliczsh tools
Tool list not available yet
This listing does not currently have a tool list to display. This does not mean the server has no tools; check its documentation for supported capabilities.
We auto-extract tools from the README. The maintainer can list them under a ## Tools heading to populate this section.
Overview
What is MCP MongoDB Server?
MCP MongoDB Server is a Model Context Protocol server that enables LLMs to interact with MongoDB databases. It provides capabilities for inspecting collection schemas and executing MongoDB operations through a standardized interface.
How to use MCP MongoDB Server?
Start the server via npx with a MongoDB URI: npx -y mcp-mongo-server mongodb://localhost:27017/database. Use the --read-only flag to prevent write operations. Alternatively, set the MCP_MONGODB_URI and MCP_MONGODB_READONLY environment variables.
Key features of MCP MongoDB Server
- Smart ObjectId Handling with configurable auto/none/force modes.
- Read-Only Mode for protection against write operations.
- Schema Inference from document samples.
- Query & Aggregation with full MongoDB pipeline support.
- Write Operations including insert, update, and index creation.
- Collection Completions for auto-complete collection names.
Use cases of MCP MongoDB Server
- Allow LLMs to query MongoDB databases interactively.
- Inspect collection schemas automatically.
- Execute aggregation pipelines with explain plans.
- Perform write operations when not in read-only mode.
Frequently asked questions
1 How do I connect to MongoDB?
Pass the MongoDB URI as a command-line argument, e.g., npx -y mcp-mongo-server mongodb://localhost:27017/database, or set the MCP_MONGODB_URI environment variable.
2 Can I prevent write operations?
Yes, use the --read-only flag or set MCP_MONGODB_READONLY to "true". Read-only mode also uses secondary read preference.
3 What tools are available?
The server provides tools for query, aggregate, update, insert, and more. See the [Available Tools](docs/tools.md) documentation.
4 How does ObjectId handling work?
ObjectId handling has three configurable modes: auto, none, and force for string-to-ObjectId conversion.
5 Is there a license?
Yes, MCP MongoDB Server is released under the MIT license.
Comments
No comments yet
Be the first to share feedback about this listing. Sign in to leave a comment.
Sign In