
quantgeekdev/mongo-mcp
Developer toolsЭта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал
quantgeekdev/mongo-mcp — это кандидат для MCP-сервера, импортированный из https://github.com/quantgeekdev/mongo-mcp.
Обзор
quantgeekdev/mongo-mcp — это кандидат для MCP-сервера, импортированный из https://github.com/quantgeekdev/mongo-mcp.
Обзор (машинный перевод)
Сервер Model Context Protocol (MCP), который позволяет LLM напрямую взаимодействовать с базами данных MongoDB. Запрашивайте коллекции, проверяйте схемы и бесшовно управляйте данными с помощью естественного языка.
✨ Особенности
- 🔍 Инспекция схемы коллекции
- 📊 Запросы и фильтрация документов
- 📈 Управление индексом
- 📝 Операции с документом (вставка, обновление, удаление)
Демо-видео
https://github.com/user-attachments/assets/2389bf23-a10d-49f9-bca9-2b39a1ebe654
🚀 Быстрый старт
Чтобы начать, найдите свой URL подключения mongodb и добавьте эту конфигурацию в ваш конфигурационный файл Claude Desktop:
MacOS: ~/Library/Application\ Support/Claude/claude_desktop_config.json
Windows: %APPDATA%/Claude/claude_desktop_config.json
Установка через Smithery
Чтобы автоматически установить MongoDB MCP Server для Claude Desktop через Smithery:
Требования
- Node.js 18+
- NPX
- Docker и Docker Compose (только для локального тестирования песочницы)
- Клиент MCP (например, приложение Claude Desktop App)
Тестовая настройка песочницы
Если у вас нет сервера mongo db для подключения и вы хотите создать пример песочницы, следуйте этим шагам
-
Запустите MongoDB с помощью Docker Compose:
-
Засейте базу данных тестовыми данными:
Эта страница переведена автоматически. Технические детали смотрите в оригинале.
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.
✨ Features
- 🔍 Collection schema inspection
- 📊 Document querying and filtering
- 📈 Index management
- 📝 Document operations (insert, update, delete)
Demo Video
https://github.com/user-attachments/assets/2389bf23-a10d-49f9-bca9-2b39a1ebe654
🚀 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
To install MongoDB MCP Server for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install mongo-mcp --client claude
Prerequisites
- Node.js 18+
- npx
- Docker and Docker Compose (for local sandbox testing only)
- MCP Client (Claude Desktop App for example)
Test Sandbox Setup
If you don’t have a mongo db server to connect to and want to create a sample sandbox, follow these steps
- Start MongoDB using Docker Compose:
docker-compose up -d
- Seed the database with test data:
npm run seed
Configure Claude Desktop
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
Local Development Mode:
{
"mcpServers": {
"mongodb": {
"command": "node",
"args": [
"dist/index.js",
"mongodb://root:example@localhost:27017/test?authSource=admin"
]
}
}
}
Test Sandbox Data Structure
The seed script creates three collections with sample data:
Users
- Personal info (name, email, age)
- Nested address with coordinates
- Arrays of interests
- Membership dates
Products
- Product details (name, SKU, category)
- Nested specifications
- Price and inventory info
- Tags and ratings
Orders
- Order details with items
- User references
- Shipping and payment info
- Status tracking
🎯 Example Prompts
Try these prompts with Claude to explore the functionality:
Basic Operations
"What collections are available in the database?"
Установка
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"
]
}
}
}