MongoDB MCP 服务器

MongoDB MCP 服务器

用于 MongoDB 与 Claude 集成的 Model Context Protocol 服务器。

快速入门

  1. 克隆仓库:

    git clone https://github.com/ryaker/mongodb-mcp-server.git
    cd mongodb-mcp-server
    
  2. 安装依赖:

    npm install
    
  3. 配置环境变量: 在 config.json 或相关设置中添加以下内容:

    {
      "MONGODB_URI": "your_mongodb_connection_string",
      "DEFAULT_DATABASE": "your_default_db"
    }
    
  4. 启动服务器并重启 Claude Desktop 或 Cursor。

  5. 使用示例(查询文档):

    {
      "tool": "find",
      "collection": "users",
      "filter": {"email": "test@example.com"}
    }