gh-mcp
БесплатноБез исполняемых скриптовНе проверенThis skill should be used when calling GitHub MCP tools — which tool does what, the method discriminators several of them require, oversized payload handling…
от TheLobbi★ 22 звезды на GitHubОб этом скилле
GitHub MCP Tool Map
The gh CLI is not available in Claude Code on the web or in remote
execution environments. Use mcp__github__* for everything.
Connection modes
There are two ways to run the GitHub MCP server, and they differ in more than hosting.
| Remote (hosted) | Local (container) | |
|---|---|---|
| Endpoint | https://api.githubcopilot.com/mcp/ |
Runs as a local process |
| Auth | OAuth (one-click) or PAT | PAT via env var |
| Scope control | OAuth grants only what you approve at sign-in | Whatever the PAT carries |
| Updates | Managed by GitHub | You manage them |
| Offline / air-gapped | No | Yes |
// remote + OAuth — no token to store
{ "mcpServers": { "github": { "url": "https://api.githubcopilot.com/mcp/" } } }
// remote + PAT
{ "mcpServers": { "github": {
"url": "https://api.githubcopilot.com/mcp/",
"authorization_token": "Bearer <PAT>" } } }
Prefer OAuth over a PAT where the host supports it: the server can then only reach the scopes approved at sign-in, whereas a PAT hands over everything it carries. Some organizations disable PAT auth for the MCP server entirely, in which case OAuth is the only path.
GitHub Enterprise Cloud with data residency uses a tenant endpoint —
https://copilot-api.<tenant>.ghe.com/mcp — not the public one. A connection
that 404s on an enterprise tenant is usually pointed at the wrong host.
Toolsets and read-only
The server exposes tools in toolsets that can be narrowed, which is the cheapest way to cut tool-schema context cost:
github-mcp-server --toolsets repos,issues,pull_requests,code_security
GITHUB_TOOLSETS="repos,issues,pull_requests" ./github-mcp-server
github-mcp-server --read-only # only read tools are offered
--read-only is a genuine capability boundary, not a prompt instruction — the
write tools are never exposed. It is the right mode for an advisory or
analysis-only session, and it pairs naturally with agents like gh-advisor
whose disallowed-tools list already forbids mutation.
Multiplexed tools need method
Several read tools are multiplexed behind a method discriminator. Calling them
without it fails with "missing required parameter: method".
| Tool | Methods |
|---|---|
pull_request_read |
get, get_diff, get_files, get_reviews, get_review_comments, get_comments, get_status |
issue_read |
get, get_comments, get_sub_issues, get_labels |
actions_list |
list_workflow_runs, list_workflows, list_workflow_jobs, list_artifacts |
actions_get |
run/workflow metadata — needs method and resource_id (not run_id) |
issue_write |
create, update |
pull_request_review_write |
create, submit_pending, delete_pending |
sub_issue_write |
add, remove, reprioritize |
Task → tool
| Task | Tool |
|---|---|
| Is CI green on a sha? | actions_list → list_workflow_runs, filter by head_sha |
| Read a failing job's log | get_job_logs — run_id + failed_only: true, then job_id + return_content + tail_lines |
| One specific check run | get_check_run with checkRunId — no list mode exists |
| PR diff | pull_request_read → get_diff |
| PR mergeability | pull_request_read → get (read mergeable_state) |
| Post a review | pull_request_review_write → create, then add_comment_to_pending_review ×N, then submit_pending |
| Reply to a review comment | add_reply_to_pull_request_comment |
| Resolve a thread | resolve_review_thread |
| Merge | merge_pull_request, or enable_pr_auto_merge in queue repos |
| Refresh a PR against its base | update_pull_request_branch |
| Find duplicates | search_issues — searches open and closed |
| Read a file at a ref | get_file_contents |
| Write files | create_or_update_file (one) / push_files (several, one commit) |
Known pitfalls
actions_getis not for logs. It returns metadata and needsmethod+resource_id. Useget_job_logsfor log triage.get_check_runhas no list mode. For "CI status on this sha", go throughactions_list.list_workflow_runscan exceed the token limit and be spilled to a file. Parse that file withnode -e, do not read it inline.- Review comments must go through a pending review. Create → add comments → submit once. Posting individually spams the author.
resolve_review_threadneeds the GraphQL thread node id, which goes stale after a force-push. Re-fetch threads before resolving.- Repository scope is enforced. Calls to repos not attached to the session
are denied. Use
add_repoto attach one; do not pre-check with curl orgit ls-remote— unauthenticated requests 404 on private repos that are actually reachable.
Context discipline
- Paginate in batches of 5–10.
- Use
minimal_output: truewhen full objects are not needed. - Prefer
list_*for broad enumeration,search_*for targeted criteria.
Установить gh-mcp в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл gh-mcp?
This skill should be used when calling GitHub MCP tools — which tool does what, the method discriminators several of them require, oversized payload handling, and the pitfalls that produce confusing errors.
Как установить скилл gh-mcp?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл gh-mcp запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic