MCP.so
登录

MongoDB MCP Server

@seeun0210

基本信息

分类

数据库

传输方式

stdio

作者

seeun0210

关于 MongoDB MCP Server

mongodb mcp server를 만들어보자

MongoDB MCP Server 配置

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

{
  "mcpServers": {
    "mongo_mcp_server": {
      "command": "node",
      "args": [
        "dist/index.js",
        "mongodb://localhost:27017"
      ]
    }
  }
}

MongoDB MCP Server 工具

工具列表暂未提供

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

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

概览

What is MongoDB MCP Server?

A Model Context Protocol (MCP) server for MongoDB databases. It analyzes database collection structures and generates queries using AI, providing two main tools: ERD generation and natural‑language query generation.

How to use MongoDB MCP Server?

Install dependencies (npm install), build (npm run build), then run the server with node dist/index.js "mongodb://localhost:27017". For use with Claude Desktop, configure the MCP server in claude_desktop_config.json pointing to the built index.js and a MongoDB URI.

Key features of MongoDB MCP Server

  • Generates ERD diagrams (Mermaid or JSON format)
  • Creates MongoDB queries from natural language descriptions
  • Analyzes actual database structure for accurate queries
  • Supports both raw MongoDB and Mongoose query syntax
  • Optional explanations for generated queries

Use cases of MongoDB MCP Server

  • Quickly visualize database schema by generating ERD from collections
  • Let AI write MongoDB queries from plain‑language requests
  • Explore an unfamiliar database with auto‑generated ERD
  • Speed up development by prototyping queries without manual MongoDB syntax

常见问题

1

What tools are available in MongoDB MCP Server?

Two tools: `generateErd` (produces ERD from database collections) and `generateQuery` (generates MongoDB/Mongoose queries from a natural‑language description).

2

How do I connect the server to my MongoDB instance?

Pass the MongoDB connection string as a command‑line argument when starting the server, e.g., `node dist/index.js "mongodb://localhost:27017"`.

3

Can I choose the output format for ERD?

Yes, the `format` parameter accepts `"mermaid"` (default) or `"json"`.

4

Does query generation support Mongoose syntax?

Yes, the `type` parameter can be set to `"mongoose"` (default is `"mongodb"`).

5

What runtime environment is required?

Node.js with npm. The server is built and run locally; a running MongoDB instance must be accessible at the provided URI.

评论

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