MCP.so
登录

MCP Mongodb

@nan-qin

基本信息

分类

数据库

传输方式

stdio

作者

nan-qin

关于 MCP Mongodb

MCP Server

MCP Mongodb 配置

使用下面的配置,将此服务器添加到你的 MCP 客户端。

{
  "mcpServers": {
    "mongodb": {
      "command": "node",
      "args": [
        "E:\\project\\mongodb\\build\\index2.js"
      ],
      "env": {
        "MONGO_URI": "mongodb://localhost:27017/"
      },
      "disabled": false,
      "autoApprove": []
    }
  }
}

MCP Mongodb 工具

工具列表暂未提供

当前收录暂时没有可展示的工具列表,不代表服务没有工具。请查阅项目文档了解支持的能力。

工具是从 README 中自动提取的。维护者可以在 ## Tools 标题下列出工具,即可填充这部分内容。

概览

What is Mcp Mongodb?

Mcp Mongodb is an MCP server that enables interaction with MongoDB databases through the Model Context Protocol. It provides tools and resources for reading and writing data, executing aggregation pipelines, and performing multi‑collection queries. It is intended for developers who want to integrate MongoDB with AI‑powered MCP clients.

How to use Mcp Mongodb?

Configure the server by setting the MONGO_URI environment variable (e.g., mongodb://localhost:27017/). Launch the server with Node.js, then use MCP tools such as read_resource to read resources and multi_collection_query to perform aggregation queries across collections.

Key features of Mcp Mongodb

  • Supports read and write operations via resources and tools.
  • Enables multi‑collection aggregation using MongoDB’s $lookup.
  • Provides a clear separation between CallTool and ReadResource schemas.
  • Configurable connection URI via environment variable.
  • Built on Node.js for lightweight deployment.

Use cases of Mcp Mongodb

  • Querying documents from a MongoDB collection.
  • Performing complex aggregation pipelines that join multiple collections.
  • Reading database status or metadata as a resource.
  • Inserting, updating, or deleting data through tool calls.

常见问题

1

How do I configure the Mcp Mongodb server?

Set the `MONGO_URI` environment variable in the MCP server configuration to your MongoDB connection string. The example uses `mongodb://localhost:27017/`.

2

What tools and resources are available?

The server provides `read_resource` for reading resources (e.g., collection documents) and `multi_collection_query` for aggregation pipelines. The README distinguishes between `CallToolRequestSchema` (for active operations) and `ReadResourceRequestSchema` (for read‑only access).

3

What are the runtime requirements?

The server requires Node.js to run, as the command is `node` with a JavaScript entry point.

4

Can I perform multi‑table joins?

Yes. The server supports multi‑collection queries using MongoDB’s `$lookup` stage in an aggregation pipeline, as shown in the multi‑collection query example.

5

Is authentication handled?

The README does not specify authentication. The connection is defined solely by the `MONGO_URI` string, so any authentication must be included in that URI (e.g., `mongodb://user:pass@host`).

评论

数据库 分类下的更多 MCP 服务器