nan-qin
MCP Servernan-qinpublic

mcp mongodb

MCP Server

Repository Info

0
Stars
1
Forks
0
Watchers
0
Issues
TypeScript
Language
-
License

About This Server

MCP Server

Model Context Protocol (MCP) - This server can be integrated with AI applications to provide additional context and capabilities, enabling enhanced AI interactions and functionality.

Documentation

MCP 配置文件

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

读取资源请求示例:

<use_mcp_tool> <server_name>mongodb</server_name> <tool_name>read_resource</tool_name>

{ "uri": "mongodb://localhost:27017/common" }

</use_mcp_tool>

CallToolRequestSchema、ReadResourceRequestSchema 的区别

CallToolRequestSchema: 用于执行特定操作 适合执行命令、处理数据等主动操作 示例:获取集合列表、插入数据等

ReadResourceRequestSchema: 用于读取资源内容 适合提供对资源的只读访问 示例:读取集合文档、获取数据库状态等

多表联查示例

<use_mcp_tool> <server_name>mongodb</server_name> <tool_name>multi_collection_query</tool_name>

{ "database": "common", "collection": "players", "pipeline": [ { "$lookup": { "from": "platform", "localField": "platform", "foreignField": "appKey", "as": "platformInfo" } }, { "$unwind": "$platformInfo" }, { "$project": { "_id": 1, "pid": 1, "__v": 1, "bank": 1, "ip": 1, "lobbyUrl": 1, "platform": "$platformInfo", "rtp": 1, "_collection": { "$literal": "players" } } }, { "$limit": 2 } ] }

</use_mcp_tool>

Quick Start

1

Clone the repository

git clone https://github.com/nan-qin/mcp-mongodb
2

Install dependencies

cd mcp-mongodb
npm install
3

Follow the documentation

Check the repository's README.md file for specific installation and usage instructions.

Repository Details

Ownernan-qin
Repomcp-mongodb
LanguageTypeScript
License-
Last fetched8/10/2025

Recommended MCP Servers

💬

Discord MCP

Enable AI assistants to seamlessly interact with Discord servers, channels, and messages.

integrationsdiscordchat
🔗

Knit MCP

Connect AI agents to 200+ SaaS applications and automate workflows.

integrationsautomationsaas
🕷️

Apify MCP Server

Deploy and interact with Apify actors for web scraping and data extraction.

apifycrawlerdata
🌐

BrowserStack MCP

BrowserStack MCP Server for automated testing across multiple browsers.

testingqabrowsers

Zapier MCP

A Zapier server that provides automation capabilities for various apps.

zapierautomation