yukkie

gh-mcp

Community yukkie
Updated

Thin stdio MCP wrapper around GitHub CLI for body-bearing operations (issue create/comment/edit, pr create)

gh-mcp

gh(GitHub CLI)の body を持つ操作だけを薄くラップする stdio MCP サーバ。

なぜ

issue / PR の長文 Markdown body をシェル経由で gh に渡すと、PowerShell のhere-string(@'...'@)・stop-parsing トークン(--%)・クォートエスケープで繰り返し事故る。このサーバは body を JSON 引数で受け取り、一時ファイルに書いてgh ... --body-file <tmp>shell=False で実行する。シェルが body 文字列を一切見ないので、事故が構造的に消える。

公式 GitHub MCP(HTTP)が接続不安定なための代替でもある。認証は既存のgh auth ログインをそのまま使う(PAT 不要)。

提供ツール(事故が多い body 持ち系のみ)

ツール 引数 実行する gh
gh_issue_create repo, title, body, labels? gh issue create --repo R --title T --body-file <tmp> [--label ...]
gh_issue_comment repo, number, body gh issue comment N --repo R --body-file <tmp>
gh_issue_edit repo, number, body gh issue edit N --repo R --body-file <tmp>
gh_pr_create base, title, body, repo?, draft? gh pr create --base B --title T --body-file <tmp> [--repo R] [--draft]

読み取り系(gh issue view / gh pr list 等)は body を持たず事故らないためラップしない。従来どおり gh を直接呼ぶこと。

返り値: { ok, url, stdout, stderr, exit_code }url は gh が出力する作成済み issue/PR の URL(stdout の先頭 http 行)。

登録

uv で依存(fastmcp)を隔離実行する。グローバル Python を汚さない。

claude mcp add gh-mcp -- uv run --project "C:\Users\ynaga\.claude\mcp\gh-mcp" python server.py

登録後、claude mcp list で接続を確認できる。

動作確認(手動)

uv run --project "C:\Users\ynaga\.claude\mcp\gh-mcp" python -c "import server; print([t for t in dir(server) if t.startswith('gh_')])"

前提

  • gh 2.x がインストール済みで gh auth status が通っていること。
  • gh は PATH から解決。見つからなければ C:\Program Files\GitHub CLI\gh.exe にフォールバックする(server.py_resolve_gh)。

MCP Server · Populars

MCP Server · New

    WJZ-P

    Douyin Upload MCP Skill

    MCP Server

    Community WJZ-P
    pwno-io

    pwno-mcp

    MCP for Pwn

    Community pwno-io
    antoinebou12

    UML-MCP: Diagram Generation via MCP

    UML-MCP Server is a UML diagram generation tool based on MCP (Model Context Protocol), which can help users generate various types of UML diagrams through natural language description or directly writing PlantUML and Mermaid and Kroki https://uml-mcp.vercel.app/docs

    Community antoinebou12
    JeremyVyska

    BC Code Intelligence MCP Server

    BC Code Intelligence MCP Server - Persona-driven workflow orchestration for Business Central development. Provides 16+ MCP tools, layered knowledge system, and intelligent BC pattern analysis through Model Context Protocol.

    Community JeremyVyska
    noimank

    FNewsCrawler (该项目已放弃维护)

    一个专门为大模型设计的财经信息MCP(Model Context Protocol)服务,通过高效的爬虫技术从各大财经网站(同花顺、东方财富等)获取实时资讯,为AI模型提供准确、及时的财经数据支持。

    Community noimank