
1rb/mongo-mcp
Developer toolsこのページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る
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"
]
}
}
}