https://github.com/kiliczsh/mcp-mongo-server
A Model Context Protocol Server for MongoDB
https://github.com/kiliczsh/mcp-mongo-server
antrophic claude claude-desktop cline cursor mcp model-context-protocol mongo mongodb windsurf
Last synced: 3 months ago
JSON representation
A Model Context Protocol Server for MongoDB
- Host: GitHub
- URL: https://github.com/kiliczsh/mcp-mongo-server
- Owner: kiliczsh
- License: mit
- Created: 2024-12-04T19:30:40.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-05-27T05:53:29.000Z (11 months ago)
- Last Synced: 2026-01-02T19:42:28.714Z (4 months ago)
- Topics: antrophic, claude, claude-desktop, cline, cursor, mcp, model-context-protocol, mongo, mongodb, windsurf
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/mcp-mongo-server
- Size: 95.7 KB
- Stars: 271
- Watchers: 4
- Forks: 50
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
- awesome-mcp - kiliczsh/mcp-mongo-server
- awesome-mcp-servers - mcp-mongo-server - Model Context Protocol server for MongoDB, enabling database operations through MCP. ([Read more](/details/mcp-mongo-server.md)) `mcp` `mongodb` `database` `integration` (Database & Messaging MCP Servers)
- awesome-mcp-servers - kiliczsh/mcp-mongo-server - MongoDBのためのモデルコンテキストプロトコルサーバー (サーバー実装 / 🗄️ <a name="databases"></a>データベース)
- awesome-mcp-servers - MongoDB - A Model Context Protocol Server for querying and analyzing MongoDB collections. (🗄️ <a name="databases"></a>Databases)
- awesome-mcp-servers - MongoDB - MCP server for interacting with MongoDB databases. (Community Servers)
- awesome-mcp-zh - kiliczsh/mcp-mongo-server
- awesome-mcp-servers - **mcp-mongo-server** - A Model Context Protocol Server for MongoDB `http` `mongodb` `git` `github` `typescript` `npm install kiliczsh/mcp-mongo-server` (🗄️ Database)
- awesome-mcp-servers - MongoDB - A Model Context Protocol Server for MongoDB (Community Servers)
- Awesome-MCP-Servers-directory - MongoDB (kiliczsh) - A Model Context Protocol Server for MongoDB (Databases)
- awesome-mcp-servers - kiliczsh/mcp-mongo-server - MongoDBのためのモデルコンテキストプロトコルサーバー (サーバー実装 / 🗄️ <a name="databases"></a>データベース)
- awesome-mcp-servers - kiliczsh/mcp-mongo-server - A Model Context Protocol Server for MongoDB (Legend / 🗄️ <a name="databases"></a>Databases)
- awesome-mcp - kiliczsh/mcp-mongo-server - A Model Context Protocol Server for MongoDB (MCP Servers / 🗄️ Databases)
- toolsdk-mcp-registry - ❌ mcp-mongo-server
- metorial-index - MCP MongoDB Server - Provides access to MongoDB databases for large language models, enabling inspection of collection schemas and execution of read-only queries. (Cloud Services)
- awesome-ai-tools - MongoDB - MongoDB integration for querying and analyzing collections (MCP Servers / 💾 Databases)
- best-of-mcp-servers - GitHub - 11% open · ⏱️ 06.02.2026) (Databases)
- awesome-mcp - MongoDB MCP - MongoDB operations (Data & Databases / NoSQL Databases)
- awesome-devops-mcp - kiliczsh/mcp-mongo-server - A Model Context Protocol Server for MongoDB (🗄️ Databases)
- awesome-mcp-list - kiliczsh/mcp-mongo-server - mongo-server?style=social)](https://github.com/kiliczsh/mcp-mongo-server): Interacts with MongoDB databases. (Uncategorized / Uncategorized)
- awesome-mcp-servers - MongoMCP - A Model Context Protocol Server for MongoDB (Table of Contents / Databases)
- awesome-mcp - kiliczsh/mcp-mongo-server - MCP MongoDB Server is a Model Context Protocol server that enables large language models to interact with MongoDB databases by providing schema inspection and execution of MongoDB operations through a standardized interface. (MCP Servers / Databases)
- awesome-mcp-whitepapers - mongodb-mcp-server - | (📂 카테고리 / 🗄️ Databases)
- awesome-claude-dxt - kiliczsh/mcp-mongo-server - A Model Context Protocol Server for MongoDB. (🗂️ Extensions by Category / 🗄️ Databases)
- awesome-openclaw-skills - MongoDB - | (MCP Servers & Protocol)
README
# MCP MongoDB Server
---



[](https://smithery.ai/server/mcp-mongo-server)
[](https://mseep.ai/app/e274a3dd-7fe6-4440-8c43-043bae668251)
A Model Context Protocol server that enables LLMs to interact with MongoDB databases. This server provides capabilities for inspecting collection schemas and executing MongoDB operations through a standardized interface.
## Demo
[](https://www.youtube.com/watch?v=FI-oE_voCpA)
## Key Features
- **Smart ObjectId Handling** - Configurable auto/none/force modes for string-to-ObjectId conversion
- **Read-Only Mode** - Protection against write operations, uses secondary read preference
- **Schema Inference** - Automatic collection schema detection from document samples
- **Query & Aggregation** - Full MongoDB query and aggregation pipeline support with optional explain plans
- **Write Operations** - Insert, update, and index creation (when not in read-only mode)
- **Collection Completions** - Auto-complete collection names for LLM integration
## Installation
```bash
npx -y mcp-mongo-server mongodb://localhost:27017/database
```
## Usage
```bash
# Start server with MongoDB URI
npx -y mcp-mongo-server mongodb://muhammed:kilic@localhost:27017/database
# Connect in read-only mode
npx -y mcp-mongo-server mongodb://muhammed:kilic@localhost:27017/database --read-only
```
### Environment Variables
| Variable | Description |
|----------|-------------|
| `MCP_MONGODB_URI` | MongoDB connection URI |
| `MCP_MONGODB_READONLY` | Enable read-only mode (`"true"`) |
## Documentation
- [Integration Guide](docs/integration.md) - Claude Desktop, Windsurf, Cursor, Docker
- [Available Tools](docs/tools.md) - Query, aggregate, update, insert, and more
- [Development](docs/development.md) - Setup, scripts, and debugging
- [Contributing](CONTRIBUTING.md)
## License
MIT - see [LICENSE](LICENSE) for details.