QM

quantgeekdev/mongo-mcp

Developer tools

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

176 stars 35 forks 品質 65 トレンド 17MIT

quantgeekdev/mongo-mcp は、https://github.com/quantgeekdev/mongo-mcp. からインポートされたMCPサーバー候補です。

概要

quantgeekdev/mongo-mcp は、https://github.com/quantgeekdev/mongo-mcp. からインポートされたMCPサーバー候補です。

概要(AI 翻訳)

モデルコンテキストプロトコル(MCP)サーバーで、LLMがMongoDBデータベースと直接やり取りできるようにします。コレクションのクエリ、スキーマの検査、自然言語を通じてシームレスにデータを管理できます。

✨ 特徴

  • 🔍 コレクションスキーマ検査
  • 📊 ドキュメントクエリおよびフィルタリング
  • 📈 インデックス管理
  • 📝 ドキュメント操作(挿入、更新、削除)

デモビデオ

https://github.com/user-attachments/assets/2389bf23-a10d-49f9-bca9-2b39a1ebe654

🚀 クイックスタート

始めるには、Mongodbの接続URLを見つけて、この設定をClaudeデスクトップの設定ファイルに追加してください:

MacOS: ~/Library/Application\ Support/Claude/claude_desktop_config.json Windows: %APPDATA%/Claude/claude_desktop_config.json

Smithery経由のインストール

Smithery経由でClaude Desktop用のMongoDB MCP Serverを自動的にインストールするには:

前提条件

  • Node.js 18+
  • NPX
  • Docker and Docker Compose(ローカルサンドボックステストのみ用)
  • MCPクライアント(例:Claudeデスクトップアプリ)

テストサンドボックスセットアップ

もしMongoのDBサーバーに接続できず、サンプルサンドボックスを作成したい場合は、以下の手順に従ってください

  1. Docker Composeを使ってMongoDBを起動:

  2. データベースにテストデータでシッドする:

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。

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

  1. Start MongoDB using Docker Compose:
docker-compose up -d
  1. 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?"
GitHub で README 全文を見る

インストール

npx mongo-mcp mongodb://<username>:<password>@<host>:<port>/<database>?authSource=admin
MCP 初心者?mcpskill.org のガイドから始めましょう →

設定

{ "mcpServers": { "mongodb": { "command": "npx", "args": [ "mongo-mcp", "mongodb://<username>:<password>@<host>:<port>/<database>?authSource=admin" ] } } }