gh-mcp
Provides tools for creating and editing GitHub issues and pull requests, with safe handling of Markdown body content via temporary files to avoid shell escaping issues.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@gh-mcpcreate an issue in owner/repo titled 'Bug fix' with body 'Fixed typo'"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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 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_')])"前提
gh2.x がインストール済みでgh auth statusが通っていること。ghは PATH から解決。見つからなければC:\Program Files\GitHub CLI\gh.exeに フォールバックする(server.pyの_resolve_gh)。
This server cannot be installed
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
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/yukkie/gh-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server