MCP.so
ログイン

MongoDB MCP Server

@MCP-Mirror

MongoDB MCP Server について

Mirror of

基本情報

カテゴリ

データベース

トランスポート

stdio

公開者

MCP-Mirror

設定

以下の設定を使って、このサーバーを MCP 対応クライアントに追加してください。

{
  "mcpServers": {
    "mongodb": {
      "command": "npx",
      "args": [
        "-y",
        "@pash1986/mcp-server-mongodb"
      ],
      "env": {
        "MONGODB_URI": ""
      }
    }
  }
}

ツール

2

Execute MongoDB aggregation pipelines against the connected database

Get execution plans for aggregation pipelines

概要

What is MongoDB MCP Server?

A Model Context Protocol server that provides read-only access to MongoDB databases. It enables LLMs to inspect collection schemas and execute aggregation pipelines.

How to use MongoDB MCP Server?

Add the server configuration to the mcpServers section of your claude_desktop_config.json, using npx -y @pash1986/mcp-server-mongodb and setting the MONGODB_URI environment variable to your connection string.

Key features of MongoDB MCP Server

  • Execute MongoDB aggregation pipelines against connected databases
  • Get execution plans for aggregation pipelines
  • Automatic limit of 1000 documents if no limit stage is specified
  • Default timeout of 30 seconds for all operations
  • Provides inferred JSON schema information for each collection
  • Read‑only operations only for safety

Use cases of MongoDB MCP Server

  • LLMs querying MongoDB collections using aggregation pipelines
  • Inspecting collection schemas to understand database structure
  • Analyzing query performance with execution plan explanations

FAQ from MongoDB MCP Server

What tools does the server provide?

The server provides two tools: aggregate (execute aggregation pipelines) and explain (get execution plans).

What is the default document limit?

A limit of 1000 documents is applied automatically if no limit stage is specified in the pipeline.

What are the runtime requirements?

The server requires Node.js and is run via npx. It connects to any MongoDB instance via a connection string.

How is schema information obtained?

Schemas are derived by sampling collection documents and inferring field names and data types.

Is the connection read‑only?

Yes, all operations are read‑only. No write or update operations are supported.

コメント

「データベース」の他のコンテンツ