Skip to main content
Glama

GitHub MCP Server

GitHub MCP 服务器

概述

GitHub MCP Server 是一个基于 API 的工具,它使用MCP(模块化命令处理器)框架与 GitHub 交互。它提供各种功能,包括使用 GitHub 的 REST API 获取用户详细信息、仓库信息和经过身份验证的用户数据。

该项目使用 Python 构建,并利用httpx进行异步 API 调用。它还使用dotenv来安全处理 GitHub 身份验证令牌。

特征

  • 通过用户名获取 GitHub 用户信息。
  • 检索 GitHub 存储库的详细信息。
  • 使用 GitHub 个人访问令牌获取经过身份验证的用户详细信息。
  • 利用FastMCP进行模块化命令处理。

项目结构

D:/MCP_Project/ |----.env │----.gitignore │----claude_desktop_config.json (Create this file in C:\Users\your_username\AppData\Roaming\Claude\) │----main.py │----pyproject.toml │----README.md │----requirements.txt
  • main.py :GitHub MCP Server 的核心逻辑。
  • .env :存储环境变量(例如,GitHub Token)。
  • claude_desktop_config.json :运行 MCP 服务器的配置。
  • requirements.txt :列出所需的依赖项。
  • explanation_video.mp4 :解释该项目的视频。

设置说明

先决条件

  • Python >=3.10
  • GitHub 个人访问令牌(用于经过身份验证的请求)
  • condavenv用于虚拟环境管理

设置和使用

  1. 克隆存储库
    git clone https://github.com/DivyanshKushwaha/GitHub-MCP-Server-Claude.git cd GitHub-MCP-Server-Claude
  2. 创建 Python 环境
python -m venv venv source venv/bin/activate
  1. 安装依赖项
pip install -r requirements.txt
  1. 设置环境变量(创建.env 文件)
GITHUB_TOKEN=your_personal_access_token
  1. 设置 claude_desktop_config.json
{ "mcpServers": { "MCP_Server": { "command": "my_env/Scripts/uv", "args": [ "run", "D:/MCP_Project/main.py" ] } } }
  • 命令键指定位于 conda 环境中的 uv 脚本的路径。该脚本用于运行服务器。
  • args 键为 uv 脚本提供了附加参数:
    • “run”:表示运行服务器的操作。
    • my_env :python 环境 'my_env'
    • “D:/MCP_Project/main.py”:指定 main.py 脚本的路径,其中包含 MCP 服务器的实现。
  1. 启动 Claude 桌面应用程序
  • 打开 Claude 桌面应用程序。
  • 它将使用 claude_desktop_config.json 文件中配置的 MCP 服务器来获取和处理数据。
-
security - not tested
F
license - not found
-
quality - not tested

hybrid server

The server is able to function both locally and remotely, depending on the configuration or use case.

模块化命令处理器服务器,可与 GitHub 的 REST API 进行交互,以通过 Claude 中的自然语言命令获取用户详细信息、存储库信息和经过身份验证的用户数据。

  1. 概述
    1. 特征
      1. 项目结构
        1. 设置说明
          1. 先决条件
          2. 设置和使用

        Related MCP Servers

        • A
          security
          A
          license
          A
          quality
          A Model Context Protocol server that connects GitHub code to Claude.ai. This server utilizes the Pera1 service to extract code from GitHub repositories and provide better context to Claude.
          Last updated -
          1
          31
          1
          JavaScript
          MIT License
          • Apple
        • -
          security
          A
          license
          -
          quality
          A server that allows AI assistants to browse and read files from specified GitHub repositories, providing access to repository contents via the Model Context Protocol.
          Last updated -
          3
          JavaScript
          MIT License
          • Apple
        • A
          security
          F
          license
          A
          quality
          A Model Context Protocol server that enables AI models to interact with GitHub's API, allowing for repository creation and management with descriptions, topics, and website URLs through natural language commands.
          Last updated -
          1
          JavaScript
        • -
          security
          F
          license
          -
          quality
          A Model Context Protocol server that enables AI assistants like Claude to interact with GitHub repositories, issues, and pull requests.
          Last updated -
          129
          Python

        View all related MCP servers

        MCP directory API

        We provide all the information about MCP servers via our MCP API.

        curl -X GET 'https://glama.ai/api/mcp/v1/servers/DivyanshKushwaha/GitHub-MCP-Server-Claude'

        If you have feedback or need assistance with the MCP directory API, please join our Discord server