Skip to main content
Glama
rishav0004

GitHub MCP Server (Custom)

by rishav0004

GitHub MCP Server (кастомный)

Кастомный сервер Model Context Protocol (MCP), дающий AI-агенту полный CRUD-доступ к GitHub: репозитории, issues, pull requests, ветки, комментарии, ревью и слияния. Создан с использованием официального Python mcp SDK (FastMCP) и REST API GitHub через httpx.

Всего 23 инструмента — полный список в server.py. Основные:

Область

Инструменты

Репозитории

list_repos, get_repo

Issues

list_issues, get_issue, create_issue, update_issue, close_issue, add_issue_comment, list_issue_comments

Ветки

list_branches, get_branch, create_branch, delete_branch

Pull Requests

list_pull_requests, get_pull_request, create_pull_request, update_pull_request, merge_pull_request, list_pr_files

Ревью

list_pr_reviews, create_pr_review

Коммиты

list_commits, get_commit

Настройка

  1. Установите зависимости

    pip install -r requirements.txt
  2. Создайте GitHub-токен

    Перейдите на https://github.com/settings/tokens и создайте либо:

    • классический PAT с областью repo, либо

    • fine-grained PAT с Contents, Issues, Pull requests и Metadata, установленными на Read & write, с областью действия на репозитории, к которым агенту нужен доступ.

  3. Задайте токен как переменную окружения

    export GITHUB_TOKEN=ghp_your_token_here
  4. Запустите его отдельно (необязательная проверка работоспособности)

    python server.py

    Он будет ждать подключения MCP-клиента через stdio — это ожидаемо, это не веб-сервер.

Related MCP server: GitHub MCP Server

Подключение к Claude Desktop

Добавьте это в ваш claude_desktop_config.json (%APPDATA%\Claude\claude_desktop_config.json в Windows, ~/Library/Application Support/Claude/claude_desktop_config.json в macOS):

{
  "mcpServers": {
    "github": {
      "command": "python",
      "args": ["/absolute/path/to/server.py"],
      "env": {
        "GITHUB_TOKEN": "ghp_your_token_here"
      }
    }
  }
}

Перезапустите Claude Desktop, и инструменты GitHub появятся в списке инструментов.

Подключение к вашему собственному пайплайну агента (например, проект Jira → GitHub → Teams)

Поскольку это стандартный MCP stdio-сервер, любой MCP-совместимый клиент или SDK может запустить его как подпроцесс и общаться с ним через stdin/stdout — включая .NET-хост, если вы используете MCP C# SDK, или Python/TypeScript SDK, если ваш оркестратор полиглот. Укажите клиенту на:

command: python
args: ["/absolute/path/to/server.py"]
env: { "GITHUB_TOKEN": "<token>" }

Расширение

Чтобы добавить новый инструмент, просто добавьте новую функцию с декоратором @mcp.tool() в server.py, которая вызывает _request(method, path, ...) против GitHub REST API. Docstring становится описанием инструмента, показываемым модели, а аннотации типов становятся схемой входных данных — поэтому держите оба точными.

Примечания

  • Все операции записи (create_*, update_*, delete_*, merge_*) вносят реальные изменения на GitHub — режима dry-run нет. Рекомендуется тестировать на тестовом репозитории, особенно merge_pull_request и delete_branch.

  • Лимиты запросов соответствуют стандартным лимитам REST API GitHub (5 000 запросов в час для аутентифицированных запросов на момент написания) — сервер не выполняет собственного троттлинга.

  • Ошибки от GitHub (неверная аутентификация, 404, конфликты слияния и т.д.) выбрасываются как RuntimeError с включённым телом ответа API, чтобы вызывающий агент получил читаемое сообщение для реакции.

F
license - not found
Not graded
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • F
    license
    Not graded
    quality
    D
    maintenance
    Provides secure, controlled access to GitHub operations through the Model Context Protocol with enterprise-grade security features including secret detection, vulnerability scanning, rate limiting, and full audit trails. Supports repository management, file operations, branch creation, commits, and GitHub Actions workflows.
  • F
    license
    Not graded
    quality
    Not graded
    maintenance
    Enables LLMs to interact with GitHub repositories, issues, pull requests, and workflows through the Model Context Protocol. It provides a comprehensive set of tools for repository management, issue tracking, code search, and CI/CD automation.
  • A
    license
    C
    quality
    D
    maintenance
    Enables AI assistants to directly operate GitHub repositories, such as listing issues, through the Model Context Protocol.
    2
    111
    2
    Apache 2.0

View all related MCP servers

Related MCP Connectors

  • Connect AI assistants to GitHub - manage repos, issues, PRs, and workflows through natural language.

  • Git-backed platform for skills, tools, and context for AI agents

  • A Model Context Protocol (MCP) application for automated GitHub PR analysis and issue management.…

View all MCP Connectors

Latest Blog Posts

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/rishav0004/custom-github-mcp'

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