ghub-mcp-interface
A dedicated Model Context Protocol (MCP) backend for interfacing with GitHub's extensive suite of APIs, enabling sophisticated automation, data retrieval, and workflow orchestration for software development teams.
Author

asifdotpy
Quick Info
Actions
Tags
GitHub MCP Interface Service
This component functions as a specialized Model Context Protocol (MCP) endpoint, establishing robust connectivity to GitHub Application Programming Interfaces. It empowers developers and automated systems with advanced capabilities for managing repositories, tracking development artifacts, and automating complex operational pipelines.
Primary Functions
- Orchestrating GitHub processes and development automation sequences.
- Extracting, querying, and analyzing granular metadata from GitHub repositories.
- Enabling the creation of AI-driven applications requiring interaction with the GitHub ecosystem.
Prerequisites for Operation
- Docker Requirement: Docker must be installed to run the server within a containerized environment.
- Authentication Credential: A GitHub Personal Access Token (PAT) is necessary. Generate a new PAT here. The server interacts with numerous GitHub APIs; ensure the token possesses the requisite permissions you are comfortable delegating to your automated tools. Consult the official GitHub documentation for details on token scopes.
Deployment Guide
Integration with Visual Studio Code
One-click installation buttons are provided at the document's apex for rapid setup.
For manual configuration, inject the subsequent JSON object into your VS Code User Settings file. Access this by invoking Preferences: Open User Settings (JSON) via the command palette (Ctrl + Shift + P).
Alternatively, place this configuration within a .vscode/mcp.json file in your project workspace to facilitate sharing settings across team members.
Note: The top-level
mcpkey is omitted when using the workspace configuration file (.vscode/mcp.json).
{ "mcp": { "inputs": [ { "type": "promptString", "id": "github_token", "description": "GitHub Personal Access Token", "password": true } ], "servers": { "github": { "command": "docker", "args": [ "run", "-i", "--rm", "-e", "GITHUB_PERSONAL_ACCESS_TOKEN", "ghcr.io/github/github-mcp-server" ], "env": { "GITHUB_PERSONAL_ACCESS_TOKEN": "${input:github_token}" } } } } }
Refer to the VS Code agent mode documentation for advanced MCP server utilization.
Integration with Claude Desktop
{
"mcpServers": {
"github": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"GITHUB_PERSONAL_ACCESS_TOKEN",
"ghcr.io/github/github-mcp-server"
],
"env": {
"GITHUB_PERSONAL_ACCESS_TOKEN": "
Building from Source Code
If Docker is unavailable, compilation can be performed using Go. Build the executable located in the cmd/github-mcp-server directory. Subsequently, execute it using the command ./github-mcp-server stdio, ensuring the GITHUB_PERSONAL_ACCESS_TOKEN environment variable is correctly set to your token.
GitHub Enterprise Server Support
For deployments targeting GitHub Enterprise Server instances, utilize the --gh-host flag or set the GH_HOST environment variable to specify the appropriate server hostname.
Tool Description Internationalization / Overrides
Tool descriptions exposed by the service can be customized by furnishing a github-mcp-server-config.json file in the same directory as the binary. This file maps tool names to revised descriptions:
{ "TOOL_ADD_ISSUE_COMMENT_DESCRIPTION": "an alternative description", "TOOL_CREATE_BRANCH_DESCRIPTION": "Create a new branch in a GitHub repository" }
To retain existing customizations while incorporating new defaults, execute the binary with the --export-translations argument:
sh ./github-mcp-server --export-translations cat github-mcp-server-config.json
Description overrides are also manageable via environment variables. The variable names mirror the JSON keys, but are prefixed with GITHUB_MCP_ and converted to uppercase.
Example override for TOOL_ADD_ISSUE_COMMENT_DESCRIPTION:
sh export GITHUB_MCP_TOOL_ADD_ISSUE_COMMENT_DESCRIPTION="a new description for commenting on issues"
Exposed Toolset
User Management
- get_me: Retrieves the profile details of the currently authenticated user.
- Arguments: None.
Issue Management
- get_issue: Fetches the complete details for a specified issue.
-
Parameters:
owner: Account name responsible for the repository (String, Mandatory).repo: Identifier of the repository (String, Mandatory).issue_number: The numerical index of the issue (Number, Mandatory).
-
create_issue: Provisions a new issue within a designated repository.
-
Parameters:
owner: Repository owner identifier (String, Mandatory).repo: Target repository name (String, Mandatory).title: Subject line for the new issue (String, Mandatory).body: Detailed description content (String, Optional).assignees: List of user login names to assign responsibility (String Array, Optional).labels: Tags to categorize the issue (String Array, Optional).
-
add_issue_comment: Appends a new comment to an existing issue thread.
-
Parameters:
owner: Repository owner (String, Mandatory).repo: Repository name (String, Mandatory).issue_number: Issue sequence ID (Number, Mandatory).body: The text content of the comment (String, Mandatory).
-
list_issues: Retrieves a filtered collection of repository issues.
-
Parameters:
owner: Owner identifier (String, Mandatory).repo: Repository identifier (String, Mandatory).state: Filtering by status ('open', 'closed', 'all') (String, Optional).labels: Filter by included tags (String Array, Optional).sort: Criterion for ordering results ('created', 'updated', 'comments') (String, Optional).direction: Ascending or descending order ('asc', 'desc') (String, Optional).since: Filter issues created or updated after this ISO 8601 timestamp (String, Optional).page: Pagination index (Number, Optional).perPage: Maximum results per page (Number, Optional).
-
update_issue: Modifies attributes of an existing GitHub issue.
-
Parameters:
owner: Repository owner (String, Mandatory).repo: Repository name (String, Mandatory).issue_number: The issue index to modify (Number, Mandatory).title: New title text (String, Optional).body: Revised body content (String, Optional).state: New issue status ('open' or 'closed') (String, Optional).labels: Replacement set of labels (String Array, Optional).assignees: Replacement set of assignees (String Array, Optional).milestone: Target milestone identifier (Number, Optional).
-
search_issues: Executes a search across issues and pull requests.
- Parameters:
query: The full search predicate string (String, Mandatory).sort: Field by which to sort results (String, Optional).order: Sort sequence ('asc'/'desc') (String, Optional).page: Page number for results (Number, Optional).per_page: Count of items per result page (Number, Optional).
Pull Request Operations
- get_pull_request: Retrieves specifics for a singular Pull Request (PR).
-
Parameters:
owner: Repository owner (String, Mandatory).repo: Repository name (String, Mandatory).pullNumber: PR numerical index (Number, Mandatory).
-
list_pull_requests: Fetches a filtered list of repository PRs.
-
Parameters:
owner: Repository owner (String, Mandatory).repo: Repository name (String, Mandatory).state: PR lifecycle status (String, Optional).sort: Sorting field (String, Optional).direction: Sort orientation (String, Optional).perPage: Limit results per page (Number, Optional).page: Page index (Number, Optional).
-
merge_pull_request: Finalizes and merges a specified pull request.
-
Parameters:
owner: Repository owner (String, Mandatory).repo: Repository name (String, Mandatory).pullNumber: Target PR sequence ID (Number, Mandatory).commit_title: Title for the resultant merge commit (String, Optional).commit_message: Detailed message for the merge commit (String, Optional).merge_method: Strategy to use for merging (String, Optional).
-
get_pull_request_files: Lists all file modifications contained within a PR.
-
Parameters:
owner: Repository owner (String, Mandatory).repo: Repository name (String, Mandatory).pullNumber: PR sequence ID (Number, Mandatory).
-
get_pull_request_status: Fetches the aggregated status checks summary for a PR.
-
Parameters:
owner: Repository owner (String, Mandatory).repo: Repository name (String, Mandatory).pullNumber: PR sequence ID (Number, Mandatory).
-
update_pull_request_branch: Re-bases a PR branch against its upstream target branch.
-
Parameters:
owner: Repository owner (String, Mandatory).repo: Repository name (String, Mandatory).pullNumber: PR sequence ID (Number, Mandatory).expectedHeadSha: The predicted SHA of the PR's head reference (String, Optional).
-
get_pull_request_comments: Retrieves inline review feedback attached to a PR.
-
Parameters:
owner: Repository owner (String, Mandatory).repo: Repository name (String, Mandatory).pullNumber: PR sequence ID (Number, Mandatory).
-
get_pull_request_reviews: Fetches formal review submissions for a PR.
-
Parameters:
owner: Repository owner (String, Mandatory).repo: Repository name (String, Mandatory).pullNumber: PR sequence ID (Number, Mandatory).
-
create_pull_request_review: Submits a formal review or comment on a PR.
-
Parameters:
owner: Repository owner (String, Mandatory).repo: Repository name (String, Mandatory).pullNumber: Target PR sequence ID (Number, Mandatory).body: General text summary for the review (String, Optional).event: The action being taken ('APPROVE', 'REQUEST_CHANGES', 'COMMENT') (String, Mandatory).commitId: SHA hash of the commit being reviewed (String, Optional).comments: An array detailing line-specific feedback, includingpath,position(line number), andbodytext (Array, Optional).
-
create_pull_request: Initiates the creation of a new PR.
- Parameters:
owner: Repository owner (String, Mandatory).repo: Repository name (String, Mandatory).title: The proposed title (String, Mandatory).body: Detailed summary/description (String, Optional).head: Source branch containing the modifications (String, Mandatory).base: Destination branch for merging (String, Mandatory).draft: Flag to mark as a draft submission (Boolean, Optional).maintainer_can_modify: Permission for maintainers to push directly (Boolean, Optional).
Repository Management
- create_or_update_file: Atomically creates a new file or overwrites an existing one in a branch.
-
Parameters:
owner: Repository owner (String, Mandatory).repo: Repository identifier (String, Mandatory).path: Location/filename within the repository (String, Mandatory).message: Commit message summary (String, Mandatory).content: The base64-encoded file data (String, Mandatory).branch: Target branch name (String, Optional).sha: Required if overwriting; the current version's SHA (String, Optional).
-
push_files: Commits and pushes a collection of file changes in a single transaction.
-
Parameters:
owner: Repository owner (String, Mandatory).repo: Repository identifier (String, Mandatory).branch: Destination branch (String, Mandatory).files: A structured array defining thepathandcontentfor each file (Array, Mandatory).message: Commit summary (String, Mandatory).
-
search_repositories: Finds repositories matching specified criteria.
-
Parameters:
query: Search predicate string (String, Mandatory).sort: Primary sort field (String, Optional).order: Sort sequence ('asc'/'desc') (String, Optional).page: Page index (Number, Optional).perPage: Items per page (Number, Optional).
-
create_repository: Provisions a completely new repository resource.
-
Parameters:
name: Desired name for the repository (String, Mandatory).description: Repository summary text (String, Optional).private: Visibility setting (Boolean, Optional).autoInit: Flag to include an initial README.md (Boolean, Optional).
-
get_file_contents: Fetches the data payload for a file or directory listing.
-
Parameters:
owner: Repository owner (String, Mandatory).repo: Repository identifier (String, Mandatory).path: Full file path (String, Mandatory).ref: Specific Git reference (e.g., branch, tag, SHA) (String, Optional).
-
fork_repository: Duplicates a repository under a specified account or organization.
-
Parameters:
owner: Original repository owner (String, Mandatory).repo: Original repository name (String, Mandatory).organization: Target organization for the fork (String, Optional).
-
create_branch: Establishes a new branch reference based on an existing commit SHA.
-
Parameters:
owner: Repository owner (String, Mandatory).repo: Repository identifier (String, Mandatory).branch: Name for the new branch (String, Mandatory).sha: The commit hash from which the new branch should originate (String, Mandatory).
-
list_commits: Retrieves chronological commit history for a specified reference.
- Parameters:
owner: Repository owner (String, Mandatory).repo: Repository identifier (String, Mandatory).sha: Reference point (branch name, tag, or SHA) (String, Optional).path: Filters commits affecting only this file path (String, Optional).page: Page index (Number, Optional).perPage: Results per page (Number, Optional).
Search Utilities
- search_code: Executes global or scoped searches for source code snippets.
-
Parameters:
query: The textual search expression (String, Mandatory).sort: Sorting metric (String, Optional).order: Sequence ('asc' or 'desc') (String, Optional).page: Page index (Number, Optional).perPage: Items per page (Number, Optional).
-
search_users: Locates GitHub user accounts based on criteria.
- Parameters:
query: Search expression targeting user attributes (String, Mandatory).sort: Field to sort by (String, Optional).order: Sort direction (String, Optional).page: Pagination index (Number, Optional).perPage: Results quantity per page (Number, Optional).
Code Security & Analysis
- get_code_scanning_alert: Fetches details for a singular security alert identified via Code Scanning.
-
Parameters:
owner: Repository owner (String, Mandatory).repo: Repository identifier (String, Mandatory).alertNumber: The unique ID of the alert (Number, Mandatory).
-
list_code_scanning_alerts: Retrieves all security findings for a repository.
- Parameters:
owner: Repository owner (String, Mandatory).repo: Repository identifier (String, Mandatory).ref: Git reference (e.g., branch name) to check alerts against (String, Optional).state: Filtering by alert status (String, Optional).severity: Filtering by risk level (String, Optional).
Resource Access Patterns (URI Templates)
Repository Contents
-
Fetch Repository Content (Default Ref) Accesses file or directory structure at a specified location.
-
Template:
repo://{owner}/{repo}/contents{/path*} -
Arguments:
owner: Account name (String, Required).repo: Repository slug (String, Required).path: Optional traversal path within the repo (String, Optional).
-
Fetch Repository Content (Specific Branch) Retrieves content scoped to a particular branch version.
-
Template:
repo://{owner}/{repo}/refs/heads/{branch}/contents{/path*} -
Arguments:
owner: Owner identifier (String, Required).repo: Repository slug (String, Required).branch: Target branch name (String, Required).path: Optional traversal path (String, Optional).
-
Fetch Repository Content (Specific Commit) Views content as it existed at a specific commit SHA.
-
Template:
repo://{owner}/{repo}/sha/{sha}/contents{/path*} -
Arguments:
owner: Owner identifier (String, Required).repo: Repository slug (String, Required).sha: The exact commit hash (String, Required).path: Optional traversal path (String, Optional).
-
Fetch Repository Content (Specific Tag) Retrieves content associated with a version tag.
-
Template:
repo://{owner}/{repo}/refs/tags/{tag}/contents{/path*} -
Arguments:
owner: Owner identifier (String, Required).repo: Repository slug (String, Required).tag: The tag identifier (String, Required).path: Optional traversal path (String, Optional).
-
Fetch Repository Content (Specific Pull Request Head) Examines the merged content state of a PR before it is merged.
-
Template:
repo://{owner}/{repo}/refs/pull/{prNumber}/head/contents{/path*} - Arguments:
owner: Owner identifier (String, Required).repo: Repository slug (String, Required).prNumber: The PR index (String, Required).path: Optional traversal path (String, Optional).
Licensing Information
This software is distributed under the permissive MIT License. Full statutory details are located in the accompanying MIT file.
WIKIPEDIA: Cloud computing is defined by ISO as "a paradigm for enabling network access to a scalable and elastic pool of shareable physical or virtual resources with self-service provisioning and administration on-demand," frequently simplified to "the cloud."
== Core Attributes == In 2011, the U.S. National Institute of Standards and Technology (NIST) established five indispensable attributes defining cloud systems. The official NIST definitions are:
On-demand self-service: "A consumer can unilaterally provision computing capabilities, such as server time and network storage, as needed automatically without requiring human interaction with each service provider." Broad network access: "Capabilities are available over the network and accessed through standard mechanisms that promote use by heterogeneous thin or thick client platforms (e.g., mobile phones, tablets, laptops, and workstations)." Resource pooling: " The provider's computing resources are pooled to serve multiple consumers using a multi-tenant model, with different physical and virtual resources dynamically assigned and reassigned according to consumer demand." Rapid elasticity: "Capabilities can be elastically provisioned and released, in some cases automatically, to scale rapidly outward and inward commensurate with demand. To the consumer, the capabilities available for provisioning often appear unlimited and can be appropriated in any quantity at any time." Measured service: "Cloud systems automatically control and optimize resource use by leveraging a metering capability at some level of abstraction appropriate to the type of service (e.g., storage, processing, bandwidth, and active user accounts). Resource usage can be monitored, controlled, and reported, providing transparency for both the provider and consumer of the utilized service. Subsequent updates by the International Organization for Standardization (ISO) have since augmented this foundational list.
== Historical Context ==
The conceptual lineage of cloud computing traces back to the 1960s, marked by the rise of time-sharing concepts popularized through Remote Job Entry (RJE). During this period, the prevailing operational model involved 'data centers' where users submitted tasks to human operators managing large mainframes. This era was characterized by intensive exploration into optimizing infrastructure, platform layers, and applications to maximize computing accessibility and end-user efficiency. The term "cloud" as a metaphor for network-delivered services emerged in 1994, utilized by General Magic to describe the abstract space mobile agents in their Telescript framework could traverse. This metaphorical adoption is often attributed to David Hoffman, a communications specialist at General Magic, who based it on established usage in telecommunications networking. The phrase 'cloud computing' gained broader recognition in 1996 following a business strategy document drafted by Compaq Computer Corporation outlining future computing ambitions over the Internet.
