
1rb/mongo-mcp
Developer toolsЭта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал
MCP server that provide tools to LLMs such as claude in cursor to interact with MongoDB
Обзор
A Model Context Protocol (MCP) server that enables LLMs to interact directly with MongoDB databases. Query collections, inspect schemas, and manage data seamlessly through natural language. The Model Context Protocol (MCP) is an open standard developed by Anthropic that creates a universal way for AI systems to connect with external data sources and tools. MCP establishes a standardized communication channel between: - : AI assistants like Claude that consume data (e.g., Claude Desktop, Cursor.
README
Показан фрагмент оригинального README. Открыть оригинал.
🗄️ MongoDB MCP Server for LLMS
A Model Context Protocol (MCP) server that enables LLMs to interact directly with MongoDB databases. Query collections, inspect schemas, and manage data seamlessly through natural language.
📚 What is Model Context Protocol (MCP)?
The Model Context Protocol (MCP) is an open standard developed by Anthropic that creates a universal way for AI systems to connect with external data sources and tools. MCP establishes a standardized communication channel between:
- MCP Clients: AI assistants like Claude that consume data (e.g., Claude Desktop, Cursor.ai)
- MCP Servers: Services that expose data and functionality (like this MongoDB server)
Key benefits of MCP:
- Universal Access: Provides a single protocol for AI assistants to query data from various sources
- Standardized Connections: Handles authentication, usage policies, and data formats consistently
- Sustainable Ecosystem: Promotes reusable connectors that work across multiple LLM clients
✨ Features
- 🔍 Collection schema inspection
- 📊 Document querying and filtering
- 📈 Index management
- 📝 Document operations (insert, update, delete)
- 🔒 Secure database access through connection strings
- 📋 Comprehensive error handling and validation
📋 Prerequisites
Before you begin, ensure you have:
- Node.js (v18 or higher)
- MongoDB instance (local or remote)
- An MCP client like Claude Desktop or Cursor.ai
You can verify your Node.js installation by running:
node --version # Should show v18.0.0 or higher
🚀 Quick Start
To get started, find your MongoDB connection URL and add this configuration to your Claude Desktop config file:
MacOS: ~/Library/Application\ Support/Claude/claude_desktop_config.json
Windows: %APPDATA%/Claude/claude_desktop_config.json
{
"mcpServers": {
"mongodb": {
"command": "npx",
"args": [
"mongo-mcp",
"mongodb://:@:/?authSource=admin"
]
}
}
}
Installing via Smithery
Smithery.ai is a registry platform for MCP servers that simplifies discovery and installation. To install MongoDB MCP Server for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install mongo-mcp --client claude
Cursor.ai Integration
To use MongoDB MCP with Cursor.ai:
- Open Cursor.ai and navigate to Settings > Features
Установка
npx mongo-mcp mongodb://<username>:<password>@<host>:<port>/<database>?authSource=adminКонфигурация
{
"mcpServers": {
"mongodb": {
"command": "npx",
"args": [
"mongo-mcp",
"mongodb://<username>:<password>@<host>:<port>/<database>?authSource=admin"
]
}
}
}