数据库与GitHub管理平台

一个集成了AI语言模型的MCP服务器套件,支持通过自然语言命令操作MongoDB数据库和GitHub仓库。

  • by Diksha8859
  • Python
  • 本地部署
  • 更新于
在 GitHub 查看 diksha8859/mcp_servers

使用说明

多平台MCP服务器套件

人工智能集成数据库和GitHub管理平台

一套全面的模型上下文协议(MCP)服务器,使AI语言模型能够通过自然语言命令与MongoDB数据库和GitHub存储库进行交互。使用FastMCP框架构建,与Claude Desktop和其他AI平台无缝集成。

🚀 特性

MongoDB MCP服务器

  • 数据库操作:使用自然语言查询的完整CRUD操作
  • 聚合管道:通过对话式人工智能进行复杂数据分析
  • 收集管理:创建、列出和管理MongoDB集合
  • 实时统计:收集统计数据和数据库见解
  • 文档操作:插入、更新、删除,具有灵活的过滤功能

GitHub MCP服务器

  • 库管理:创建、克隆和管理存储库
  • 发行与公关运营:自动问题跟踪和拉取请求管理
  • 文件操作:通过AI直接读取、创建、更新、删除文件
  • 分行管理:创建、切换、合并分支
  • 发布管理:创建和管理版本和标签
  • 组织工具:用户和组织管理

🛠️ 技术

  • 后端:Python 3.10,FastMCP框架
  • 数据库:MongoDB、PyMongo
  • 应用程序编程接口:GitHub REST API v3,MCP协议1.12.3
  • 人工智能集成:Claude Desktop,自然语言处理
  • 发展:AsyncIO、环境管理、综合日志记录

📦 安装

先决条件

  • Python 3.10+
  • MongoDB(本地或远程运行)
  • GitHub个人访问令牌
  • Claude Desktop(用于AI集成)

设置

  1. 克隆存储库
git clone https://github.com/Diksha8859/MCP_Servers.git
cd MCP_Servers
  1. 创建虚拟环境
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
  1. 安装依赖项
pip install -r mcp_server/requirements.txt
  1. 配置环境变量
cd mcp_server
cp env.example .env
# Edit .env with your credentials

环境变量

创建一个 .env 文件在 mcp_server 目录:

# MongoDB Configuration
MONGODB_URI=mongodb://localhost:27017/
MONGODB_DATABASE=your_database_name
MONGODB_COLLECTION=your_collection_name

# GitHub Configuration
GITHUB_TOKEN=your_github_personal_access_token
GITHUB_USERNAME=your_github_username

# MCP Server Configuration
MCP_SERVER_NAME=mcp-servers-suite

🔧 用法

MongoDB服务器

cd mcp_server
python mongodb_server.py

GitHub服务器

cd mcp_server
python github_server.py

Claude桌面集成

  1. 打开克劳德桌面
  2. 转到“设置”→ MCP服务器
  3. 添加服务器配置:

对于MongoDB:

  • 姓名: mongodb-mcp-server
  • 命令: /path/to/venv/bin/python
  • 论据: ["/path/to/MCP_Servers/mcp_server/mongodb_server.py"]
  • 工作目录: /path/to/MCP_Servers/mcp_server

对于GitHub:

  • 姓名: github-mcp-server
  • 命令: /path/to/venv/bin/python
  • 论据: ["/path/to/MCP_Servers/mcp_server/github_server.py"]
  • 工作目录: /path/to/MCP_Servers/mcp_server

💬 对话示例

MongoDB操作

User: "What collections are in my database?"
Claude: [Lists all MongoDB collections]

User: "Find all users older than 25"
Claude: [Executes MongoDB query and returns results]

User: "Create a new user with name John and age 30"
Claude: [Inserts document into users collection]

GitHub运营

User: "Show me information about my latest repository"
Claude: [Displays repository details, stats, and metadata]

User: "Create a new issue titled 'Bug Fix' in my project repo"
Claude: [Creates new GitHub issue]

User: "List all open pull requests"
Claude: [Shows all open PRs with details]

📁 项目结构

MCP_Servers/
├── mcp_server/
│   ├── mongodb_server.py          # MongoDB MCP Server
│   ├── github_server.py           # GitHub MCP Server
│   ├── requirements.txt           # Python dependencies
│   ├── .env                       # Environment variables
│   ├── tools/
│   │   ├── mongodb.py             # MongoDB operations
│   │   └── github_tool.py         # GitHub API integration
│   ├── handlers/
│   │   ├── tool_handler.py        # Tool execution handlers
│   │   └── github_handler.py      # GitHub-specific handlers
│   ├── claude_config.json         # Claude Desktop configuration
│   ├── github_config.json         # GitHub server configuration
│   └── documentation/
│       ├── MongoDB_MCP_Server_Documentation.pdf
│       └── GitHub_MCP_Server_Documentation.docx
├── venv/                          # Virtual environment
├── README.md                      # This file
└── .gitignore                     # Git ignore rules

🔒 安全

  • 环境变量:将敏感数据存储在 .env 文件
  • GitHub代币:使用具有最低所需权限的GitHub个人访问令牌
  • MongoDB:为生产使用配置适当的身份验证
  • 网络:限制生产环境中的数据库和API访问

🤝 贡献

  1. 分叉存储库
  2. 创建要素分支(git checkout -b feature/amazing-feature)
  3. 提交您的更改(git commit -m 'Add amazing feature')
  4. 推到分支(git push origin feature/amazing-feature)
  5. 打开拉取请求

📄 许可证

此项目根据MIT许可证获得许可-请参阅 许可证 文件以获取详细信息。

🙏 致谢

📞 联系

迪克沙 - @Diksha8859

项目链接: https://github.com/Diksha8859/MCP_Servers


⭐ 如果您觉得此存储库有用,请将其标记为星号!