GitHub MCP 服务器
概述
GitHub MCP Server 是一个基于 API 的工具,它使用MCP(模块化命令处理器)框架与 GitHub 交互。它提供各种功能,包括使用 GitHub 的 REST API 获取用户详细信息、仓库信息和经过身份验证的用户数据。
该项目使用 Python 构建,并利用httpx进行异步 API 调用。它还使用dotenv来安全处理 GitHub 身份验证令牌。
特征
通过用户名获取 GitHub 用户信息。
检索 GitHub 存储库的详细信息。
使用 GitHub 个人访问令牌获取经过身份验证的用户详细信息。
利用
FastMCP进行模块化命令处理。
项目结构
main.py:GitHub MCP Server 的核心逻辑。.env:存储环境变量(例如,GitHub Token)。claude_desktop_config.json:运行 MCP 服务器的配置。requirements.txt:列出所需的依赖项。explanation_video.mp4:解释该项目的视频。
设置说明
先决条件
Python >=3.10
GitHub 个人访问令牌(用于经过身份验证的请求)
conda或venv用于虚拟环境管理
设置和使用
克隆存储库
git clone https://github.com/DivyanshKushwaha/GitHub-MCP-Server-Claude.git cd GitHub-MCP-Server-Claude创建 Python 环境
安装依赖项
设置环境变量(创建.env 文件)
设置 claude_desktop_config.json
命令键指定位于 conda 环境中的 uv 脚本的路径。该脚本用于运行服务器。
args 键为 uv 脚本提供了附加参数:
“run”:表示运行服务器的操作。
my_env :python 环境 'my_env'
“D:/MCP_Project/main.py”:指定 main.py 脚本的路径,其中包含 MCP 服务器的实现。
启动 Claude 桌面应用程序
打开 Claude 桌面应用程序。
它将使用 claude_desktop_config.json 文件中配置的 MCP 服务器来获取和处理数据。
This server cannot be installed
Related Resources
Related MCP Servers
- -securityFlicense-qualityA Model Context Protocol server that enables AI assistants like Claude to interact with GitHub repositories, issues, and pull requests.Last updated -9
- AsecurityFlicenseAqualityAn MCP server that enables Claude and other compatible LLMs to interact with the GitHub API, supporting features like creating issues, retrieving repository information, listing issues, and searching repositories.Last updated -4
- AsecurityFlicenseAqualityAn MCP server that allows Claude and other MCP-compatible LLMs to interact with the GitHub API, supporting features like creating issues, getting repository information, listing issues, and searching repositories.Last updated -4
- -securityAlicense-qualityAn MCP server that enables AI assistants like Claude to help users manage their GitHub notifications through natural language commands.Last updated -116MIT License