Back to Browse

Github MCP Server

Developer ToolsLow Risk10.0MCP RegistryLocal
Free

Server data from the Official MCP Registry

Developer-ready GitHub MCP server with 5-tool hybrid architecture and dynamic discovery.

About

Developer-ready GitHub MCP server with 5-tool hybrid architecture and dynamic discovery.

Security Report

10.0
Low Risk10.0Low Risk

Valid MCP server (1 strong, 1 medium validity signals). No known CVEs in dependencies. Package registry verified. Imported from the Official MCP Registry. Trust signals: trusted author (6/6 approved).

6 files analyzed · 1 issue found

Security scores are indicators to help you make informed decisions, not guarantees. Always review permissions before connecting any MCP server.

Permissions Required

This plugin requests these system permissions. Most are normal for its category.

env_vars

Check that this permission is expected for this type of plugin.

Shell Command Execution

Runs commands on your machine. Be cautious — only use if you trust this plugin.

file_system

Check that this permission is expected for this type of plugin.

What You'll Need

Set these up before or after installing:

GitHub Personal Access Token (classic or fine-grained)Required

Environment variable: GITHUB_PERSONAL_ACCESS_TOKEN

GitHub API URL (defaults to https://api.github.com)Optional

Environment variable: GITHUB_API_URL

Enable 3-tier read-only safety mode (true/false)Optional

Environment variable: GITHUB_READ_ONLY

Comma-separated domain whitelist to restrict registered tools and preserve context window tokens (e.g. 'repositories,pull-requests,issues')Optional

Environment variable: GITHUB_TOOL_DOMAINS

How to Install

Add this to your MCP configuration file:

{
  "mcpServers": {
    "io-github-sumirati-mcp-github": {
      "env": {
        "GITHUB_API_URL": "your-github-api-url-here",
        "GITHUB_READ_ONLY": "your-github-read-only-here",
        "GITHUB_TOOL_DOMAINS": "your-github-tool-domains-here",
        "GITHUB_PERSONAL_ACCESS_TOKEN": "your-github-personal-access-token-here"
      },
      "args": [
        "-y",
        "@sumirati/mcp-github"
      ],
      "command": "npx"
    }
  }
}

Documentation

View on GitHub

From the project's GitHub README.

GitHub MCP Server (@sumirati/mcp-github)

A modern, 2026 AI-native Model Context Protocol (MCP) server for GitHub REST API, engineered for autonomous AI agents and developer workflows.

npm version License: MIT GitHub


What makes v2 Unique: The 2026 5-Tool Hybrid Standard

In early MCP servers, exposing 50–100+ eager tool definitions flooded every LLM turn with thousands of redundant schema tokens ("System Prompt Tax") and degraded reasoning coherence.

Architecturally aligned with @sumirati/mcp-gitlab, @sumirati/mcp-github solves this with a 5-Tool Hybrid Surface:

  • Glama TDQS Coherence Tier A (5/5): By exposing exactly 5 tools to the client, the server sits in the ideal 3–15 tool coherence sweet spot.
  • Ultra-Lean System Prompt Tax: Drops schema overhead from ~14.7k tokens down to ~450 tokens (97% reduction), preserving context windows and maximizing LLM prompt-cache hits.
  • Zero-Hop Hourly Drivers: The 3 operations developers and agents use constantly (get_file_contents, get_repository, get_commit) remain eager tools for instant zero-hop execution.
  • 100% Platform Access on Demand: The entire platform surface of 79 actions across 13 domains is accessible on-demand via dynamic action discovery (github_find_actions $\rightarrow$ github_execute_action), supporting both JSON and Markdown output (format: "json" | "markdown").
  • Resilient Fallback: If an agent directly invokes any catalog action name (e.g. list_pull_requests), the server dynamically executes it with full input validation and projection.
LLM Prompt Context (~450 tokens total):
├── 1. github_find_actions(query, [domain], [format])     [Meta Discovery]
├── 2. github_execute_action(action, params, [format])   [Meta Dynamic Execution]
├── 3. get_file_contents(owner, repo, path)               [Eager Daily Driver #1]
├── 4. get_repository(owner, repo)                        [Eager Daily Driver #2]
└── 5. get_commit(owner, repo, ref)                       [Eager Daily Driver #3]

Under the hood (Dynamic Registry):
└── 79 Curated Actions across 13 Domains (with 70%+ token reduction projections)

Core Capabilities Across 13 Domains

  1. Enterprise Observability & Diagnostics: End-to-end API latency, authentication verification, remaining rate limits, and read-only status (system_health_check).
  2. Repositories & Governance: Full repository lifecycle, branch management, branch protection rules (get_branch_protection), file reading (auto Base64-decoded), atomic multi-file commits, and repository topics.
  3. Pull Requests & Code Reviews: PR lifecycle (create, update, merge), review comments, inline diff reviews, and two-stage diff inspection with lockfile filtering.
  4. Issues & Milestones: Issue tracking, milestone assignment, progress notes, and label management.
  5. CI/CD & GitHub Actions: Workflow inspection, workflow runs, job status, build artifacts (list_workflow_run_artifacts, get_workflow_run_artifact), log tailing, run cancel/retry, and action triggers.
  6. Releases & Tags: Release publishing, tag creation, asset inspection, and release notes management.
  7. Actions Variables & Secrets: Manage repository and environment variables for automated CI/CD pipelines.
  8. Collaborators & Permissions: Audit and manage repository collaborators and permission levels.
  9. Security & Dependabot: Audit Dependabot security alerts and vulnerability reports.
  10. Gists & Snippets: Full gist lifecycle for sharing code templates and configurations.
  11. Webhooks & Integrations: Audit repository webhooks and subscribed event triggers.

Quickstart & Installation

Option 1: Run with npx (No installation needed)

npx -y @sumirati/mcp-github

Option 2: Install Globally

npm install -g @sumirati/mcp-github
mcp-github

Option 3: Local Clone

git clone https://github.com/sumirati/mcp-github.git
cd mcp-github
npm install
npm test
npm start

Environment Configuration

VariableRequiredDefaultDescription
GITHUB_PERSONAL_ACCESS_TOKENYes—GitHub Personal Access Token (classic or fine-grained)
GITHUB_TOKENNo—Alternative token variable name
GITHUB_API_URLNohttps://api.github.comBase API URL (or GitHub Enterprise Server)
GITHUB_READ_ONLYNofalseEnable 3-tier read-only mode (true, 1, yes)
GITHUB_EXPOSE_ALL_TOOLSNofalseSet to true (or GITHUB_EXPOSE_LEGACY_TOOLS=true) to expose all 79 tools directly on ListTools for legacy clients

Client Configuration

Google Antigravity / Claude Desktop / Cursor

Add to your MCP configuration file (mcp_config.json or claude_desktop_config.json):

Using npm / npx (Recommended):
{
  "mcpServers": {
    "github": {
      "command": "npx",
      "args": ["-y", "@sumirati/mcp-github"],
      "env": {
        "GITHUB_PERSONAL_ACCESS_TOKEN": "<your-github-token>",
        "GITHUB_READ_ONLY": "false"
      }
    }
  }
}
Using local clone:
{
  "mcpServers": {
    "github": {
      "command": "node",
      "args": ["/path/to/mcp-github/index.js"],
      "env": {
        "GITHUB_PERSONAL_ACCESS_TOKEN": "<your-github-token>",
        "GITHUB_READ_ONLY": "false"
      }
    }
  }
}

Complete Action Catalog Reference (75 Actions)

All 75 actions feature strict input validation and 2-tier field-mask projections:

1. The 5 Client-Exposed Tools (Hybrid Mode)

ToolTypeDescription
github_find_actionsMetaSearch and discover available GitHub operations across all 13 domains with compact parameter schemas
github_execute_actionMetaExecute any discovered GitHub platform action with input validation and token-optimized projection
get_file_contentsEagerRead raw file contents (auto Base64 decoded) or directory listings at any ref without cloning
get_repositoryEagerRetrieve repository metadata, visibility, description, default branch, clone URLs, and topics
get_commitEagerInspect Git commit details, author info, and token-capped file diffs

2. Repositories & Branches (11 actions)

ActionDescriptionMutating?
search_repositoriesSearch public or accessible GitHub repositories by queryNo
create_repositoryCreate a new repository for the authenticated user or organizationYes
fork_repositoryFork a repository to your account or specified organizationYes
list_branchesList branches with commit SHAs and protection statusNo
get_branchGet detailed branch metadata, protection rules, and head commitNo
create_branchCreate a new git branch from an existing branch or SHAYes
delete_branchDelete a git branch (destructive)Yes
create_or_update_fileCreate or update a single file with a commitYes
delete_fileDelete a file from a repository with a commitYes
push_filesAtomically commit multiple file additions, edits, or deletionsYes

3. Commits & Statuses (4 actions)

ActionDescriptionMutating?
list_commitsList chronological commit history filtered by branch, date, or authorNo
get_commit_statusGet combined CI status checks and commit statuses for a refNo
create_commit_statusPost a status check result to a specific commit SHAYes

4. Pull Requests & Reviews (11 actions)

ActionDescriptionMutating?
list_pull_requestsList PRs filtered by state (open, closed, all), base branch, or sortNo
get_pull_requestGet detailed PR metadata, mergeability status, head, and base refsNo
get_pull_request_diffGet token-capped unified diff of PR changes with max line limitsNo
create_pull_requestCreate a new pull request with head, base, title, and bodyYes
update_pull_requestUpdate title, body, state, or base branch of an existing PRYes
merge_pull_requestMerge a pull request with merge, squash, or rebase strategyYes
list_pull_request_commentsList inline review comments on a pull requestNo
create_pull_request_commentCreate an inline review comment on a specific diff lineYes
create_pull_request_replyReply directly to an existing inline review comment threadYes
list_pull_request_reviewsList formal reviews submitted on a pull requestNo
create_pull_request_reviewSubmit an APPROVE, REQUEST_CHANGES, or COMMENT reviewYes

5. Issues & Labels (8 actions)

ActionDescriptionMutating?
list_issuesList repository issues filtered by state, labels, assignee, or milestoneNo
get_issueGet detailed issue description, assignees, labels, and stateNo
create_issueCreate a new issue with title, body, labels, and assigneesYes
update_issueModify title, body, state (open/closed), or assigneesYes
list_issue_commentsList conversation comments on an issueNo
create_issue_commentPost a comment note to an issueYes
list_labelsList all repository labels with names and color hex codesNo
create_labelCreate a new label with name, color, and descriptionYes

6. Milestones (4 actions)

ActionDescriptionMutating?
list_milestonesList repository milestones with open/closed counts and due datesNo
get_milestoneGet milestone metadata and progress statisticsNo
create_milestoneCreate a new milestone with title, description, and due dateYes
update_milestoneUpdate milestone title, description, state, or due dateYes

7. Collaborators & Roles (4 actions)

ActionDescriptionMutating?
list_collaboratorsList collaborators with role names (admin, push, pull)No
get_collaborator_permissionCheck permission level of a specific user on a repositoryNo
add_collaboratorInvite or add a collaborator with designated permissionYes
remove_collaboratorRemove collaborator access from a repositoryYes

8. Actions Variables & Secrets (6 actions)

ActionDescriptionMutating?
list_actions_variablesList repository Actions variablesNo
get_actions_variableGet variable value and metadataNo
create_actions_variableCreate a new Actions variableYes
update_actions_variableUpdate existing Actions variable valueYes
delete_actions_variableDelete an Actions variableYes
list_actions_secretsList repository Actions secrets names (values redacted)No

9. GitHub Actions & CI (8 actions)

ActionDescriptionMutating?
list_workflowsList GitHub Actions workflows defined in .github/workflows/No
list_workflow_runsList workflow execution runs filtered by branch, event, or statusNo
get_workflow_runGet detailed execution status, conclusion, and timingNo
list_workflow_run_jobsList individual jobs in a workflow run with step conclusionsNo
get_job_logsSafely tail failure logs from a workflow job with line truncationNo
trigger_workflowDispatch a manual workflow_dispatch run on a refYes
cancel_workflow_runCancel an in-progress workflow runYes
rerun_workflowRe-run a failed or completed workflowYes

10. Releases & Git Tags (5 actions)

ActionDescriptionMutating?
list_releasesList project releases with changelogs and asset metadataNo
get_releaseGet specific release notes and downloadable assetsNo
create_releasePublish a release tied to a git tag with markdown release notesYes
list_tagsList git tags with commit hashesNo
create_tagCreate an annotated git tag pointing to a SHAYes

11. Webhooks, Gists, Security & User Context (18 actions)

  • Webhooks & Topics (4 actions): list_repository_topics, set_repository_topics, list_webhooks, create_webhook.
  • Gists (5 actions): list_gists, get_gist, create_gist, update_gist, delete_gist.
  • Security (1 action): list_dependabot_alerts.
  • User & Orgs (4 actions): get_authenticated_user, get_user, list_user_organizations, list_accessible_repositories.

Token Economy & Output Projection Filters

Raw GitHub REST API responses are notoriously heavy (often 30KB–100KB per Issue or PR). @sumirati/mcp-github enforces strict token economy:

  • System Prompt Tax Reduction (>93% savings): Shrinks MCP tool definition footprint from ~14.7k tokens down to ~450 tokens.
  • Recursive Output Projection Filter (projectOutput): Automatically strips redundant metadata fields (_links, avatar_url, gravatar_id, node_id, site_admin, user navigation URLs, internal API links, and null/empty fields) before payloads reach the LLM, guaranteeing 70%+ output token savings.
  • Unified Diff Truncation: PR and commit diffs are capped by line count (max_diff_lines, default: 400).
  • Safe Log Tailing: CI workflow job logs extract the failure tail (tail_lines, default: 200) instead of megabyte log dumps.

Acknowledgements & Lineage

This project incorporates architectural concepts, schemas, and patterns from:

See NOTICE for complete third-party attribution details.


License

This project is licensed under the MIT License — Copyright (c) 2026 sumirati@buggycode.net.

Reviews

No reviews yet

Be the first to review this server!