Command Palette

Search for a command to run...

UnylyUnyly
Browse all

Gh

FreeNot checked

A thin MCP server wrapping GitHub CLI body operations to avoid shell escaping issues, enabling creation and editing of issues and pull requests.

GitHubEmbed

About

A thin MCP server wrapping GitHub CLI body operations to avoid shell escaping issues, enabling creation and editing of issues and pull requests.

README

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)。

from github.com/yukkie/gh-mcp

Install Gh in Claude Desktop, Claude Code & Cursor

Recommended · one command, every IDE
unyly install gh-mcp

Installs into Claude Desktop, Claude Code, Cursor & VS Code — handles npx, uvx and build-from-source repos for you.

First time? Get the CLI: curl -fsSL https://unyly.org/install | sh

Or configure manually

Run in your terminal:

claude mcp add gh-mcp -- uvx gh-mcp

FAQ

Is Gh MCP free?

Yes, Gh MCP is free — one-click install via Unyly at no cost.

Does Gh need an API key?

No, Gh runs without API keys or environment variables.

Is Gh hosted or self-hosted?

Self-hosted: the server runs locally on your machine via the install command above.

How do I install Gh in Claude Desktop, Claude Code or Cursor?

Open Gh on unyly.org, pick your client tab (Claude Desktop, Claude Code, Cursor) and press Install — the config is generated automatically, no JSON editing.

Related MCPs

Compare Gh with

Not sure what to pick?

Find your stack in 60 seconds

Author?

Embed badge for your README

Browse similar

All development MCPs