GitHub's official MCP Server
[](https://goreportcard.com/report/github.com/github/github-mcp-server/v2)
# GitHub MCP Server
The GitHub MCP Server connects AI tools directly to GitHub's platform. This gives AI agents, assistants, and chatbots the ability to read repositories and code files, manage issues and
GitHub's official MCP Server
[](https://goreportcard.com/report/github.com/github/github-mcp-server/v2)
# GitHub MCP Server
The GitHub MCP Server connects AI tools directly to GitHub's platform. This gives AI agents, assistants, and chatbots the ability to read repositories and code files, manage issues and
01Repository Management: Browse and query code, search files, analyze commits, and understand project structure across any repository you have access to.
02Issue & PR Automation: Create, update, and manage issues and pull requests. Let AI help triage bugs, review code changes, and maintain project boards.
03CI/CD & Workflow Intelligence: Monitor GitHub Actions workflow runs, analyze build failures, manage releases, and get insights into your development pipeline.
04
GitHub MCP Server
The GitHub MCP Server connects AI tools directly to GitHub's platform. This gives AI agents, assistants, and chatbots the ability to read repositories and code files, manage issues and PRs, analyze code, and automate workflows. All through natural language interactions.
Use Cases
Repository Management: Browse and query code, search files, analyze commits, and understand project structure across any repository you have access to.
Issue & PR Automation: Create, update, and manage issues and pull requests. Let AI help triage bugs, review code changes, and maintain project boards.
CI/CD & Workflow Intelligence: Monitor GitHub Actions workflow runs, analyze build failures, manage releases, and get insights into your development pipeline.
Code Analysis: Examine security findings, review Dependabot alerts, understand code patterns, and get comprehensive insights into your codebase.
Team Collaboration: Access discussions, manage notifications, analyze team activity, and streamline processes for your team.
Built for developers who want to connect their AI tools to GitHub context and capabilities, from simple natural language queries to complex multi-step agent workflows.
Using the Go module
The Go module path is github.com/github/github-mcp-server/v2. Library consumers
must use this prefix in imports, for example
github.com/github/github-mcp-server/v2/pkg/github, and in go get commands.
No /v2 subdirectory is needed when building from a repository checkout.
The existing v2.0.0 tag predates this module-path correction and cannot be used
as a Go module. After this change is merged, a new release such as v2.0.1 must
be tagged from a commit containing the corrected module path. Until then,
consumers can use a pseudo-version from a commit containing this change.
No FAQ yet. Enrichment fills this from the README on the next crawl.
Tools (24)
actions_get
Get details of GitHub Actions resources (workflows, workflow runs, jobs, and artifacts)
actions_list
List GitHub Actions workflows in a repository
actions_run_trigger
Trigger GitHub Actions workflow actions
assign_copilot_to_issue
Assign Copilot to issue
assign_copilot_to_issue_with_intent
Assign Copilot to issue with intent
create_gist
Create Gist
discussion_comment_write
Manage discussion comments
get_code_quality_finding
Get code quality finding
get_code_scanning_alert
Get code scanning alert
get_dependabot_alert
Get dependabot alert
get_discussion
Get discussion
get_discussion_comments
Get discussion comments
get_gist
Get Gist Content
get_job_logs
Get GitHub Actions workflow job logs
get_me
Get my user profile
get_team_members
Get team members
get_teams
Get teams
list_code_scanning_alerts
List code scanning alerts
list_dependabot_alerts
List dependabot alerts
list_discussion_categories
List discussion categories
list_discussions
List discussions
list_gists
List Gists
request_copilot_review
Request Copilot review
ui_get
Get UI data
Code Analysis: Examine security findings, review Dependabot alerts, understand code patterns, and get comprehensive insights into your codebase.
05Team Collaboration: Access discussions, manage notifications, analyze team activity, and streamline processes for your team.
Remote GitHub MCP Server
The remote GitHub MCP Server is hosted by GitHub and provides the easiest method for getting up and running. If your MCP host does not support remote MCP servers, don't worry! You can use the local version of the GitHub MCP Server instead.
Prerequisites
A compatible MCP host with remote server support (VS Code 1.101+, Claude Desktop, Cursor, Windsurf, etc.)
For quick installation, use one of the one-click install buttons above. Once you complete that flow, toggle Agent mode (located by the Copilot Chat text input) and the server will start. Make sure you're using VS Code 1.101 or later for remote MCP and OAuth support.
Alternatively, to manually configure VS Code, choose the appropriate JSON block from the examples below and add it to your host configuration:
Rovo Dev CLI - Installation guide for Rovo Dev CLI
Note: Each MCP host application needs to configure a GitHub App or OAuth App to support remote access via OAuth. Any host application that supports remote MCP servers should support the remote GitHub server with PAT authentication. Configuration details and support levels vary by host. Make sure to refer to the host application's documentation for more info.
Configuration
Toolset configuration
See Remote Server Documentation for full details on remote server configuration, toolsets, headers, and advanced usage. This file provides comprehensive instructions and examples for connecting, customizing, and installing the remote GitHub MCP Server in VS Code and other MCP hosts.
Note: When using OAuth with GitHub Enterprise with VS Code and GitHub Copilot, you also need to configure your VS Code settings to point to your GitHub Enterprise instance - see Authenticate from VS Code
To run the server in a container, you will need to have Docker installed.
Once Docker is installed, you will also need to ensure Docker is running. The Docker image is available at ghcr.io/github/github-mcp-server. The image is public; if you get errors on pull, you may have an expired token and need to docker logout ghcr.io.
Authentication. On github.com you don't need to create anything up front — the one-click buttons above log you in with OAuth on first use (a browser-based flow; the token is kept in memory only). The Docker buttons publish a fixed callback port (127.0.0.1:8085) so the container's login callback is reachable. See Local Server OAuth Login for how it works, headless/device-code fallback, and bringing your own OAuth or GitHub App (required for GitHub Enterprise Server and ghe.com).
Prefer a token? You can still authenticate with a GitHub Personal Access Token by setting GITHUB_PERSONAL_ACCESS_TOKEN instead (it takes precedence over OAuth). The MCP server can use many of the GitHub APIs, so enable the permissions that you feel comfortable granting your AI tools (to learn more about access tokens, please check out the documentation).
Environment Variables (Recommended)
To keep your GitHub PAT secure and reusable across different MCP hosts:
Store your PAT in environment variables
export GITHUB_PAT=your_token_here
Or create a .env file:
GITHUB_PAT=your_token_here
Protect your .env file
# Add to .gitignore to prevent accidental commits
echo ".env" >> .gitignore
Reference the token in configurations
# CLI usage
claude mcp add github -e GITHUB_PERSONAL_ACCESS_TOKEN=$GITHUB_PAT -- docker run -i --rm -e GITHUB_PERSONAL_ACCESS_TOKEN ghcr.io/github/github-mcp-server
# In config files (where supported)
"env": {
"GITHUB_PERSONAL_ACCESS_TOKEN": "$GITHUB_PAT"
}
Note: Environment variable support varies by host app and IDE. Some applications (like Windsurf) require hardcoded tokens in config files.
Token Security Best Practices
Minimum scopes: Only grant necessary permissions
repo - Repository operations
read:packages - Docker image access
read:org - Organization team access
Separate tokens: Use different PATs for different projects/environments
Regular rotation: Update tokens periodically
Never commit: Keep tokens out of version control
File permissions: Restrict access to config files containing tokens
chmod 600 ~/.your-app/config.json
GitHub Enterprise Server and Enterprise Cloud with data residency (ghe.com)
The flag --gh-host and the environment variable GITHUB_HOST can be used to set
the hostname for GitHub Enterprise Server or GitHub Enterprise Cloud with data residency.
For GitHub Enterprise Server, prefix the hostname with the https:// URI scheme. HTTPS is required and enforced: non-HTTPS hosts are refused so that credentials are never sent over cleartext (the only exception is a loopback host such as http://localhost for local development).
For GitHub Enterprise Cloud with data residency, use https://YOURSUBDOMAIN.ghe.com as the hostname.
For quick installation, use one of the one-click install buttons above. Once you complete that flow, toggle Agent mode (located by the Copilot Chat text input) and the server will start.
Install in GitHub Copilot on other IDEs (JetBrains, Visual Studio, Eclipse, etc.)
Add one of the following JSON blocks to your IDE's MCP settings.
Log in with OAuth (no token to create or store). On github.com the official image already includes the app credentials, so you provide none yourself: it runs a browser-based login on first use and keeps the resulting token in memory only. In Docker this needs a fixed callback port published to loopback so the container's login callback is reachable:
See Local Server OAuth Login for the native-binary flow (no fixed port needed), the headless/device-code fallback, GitHub Enterprise Server / ghe.com, and bringing your own OAuth or GitHub App.
Optionally, you can add a similar example (i.e. without the mcp key) to a file called .vscode/mcp.json in your workspace. This will allow you to share the configuration with other host applications that accept the same format.
Note: Any host application that supports local MCP servers should be able to access the local GitHub MCP server. However, the specific configuration process, syntax and stability of the integration will vary by host application. While many may follow a similar format to the examples above, this is not guaranteed. Please refer to your host application's documentation for the correct MCP configuration syntax and setup process.
Build from source
If you don't have Docker, you can use go build to build the binary in the
cmd/github-mcp-server directory, and use the github-mcp-server stdio command with the GITHUB_PERSONAL_ACCESS_TOKEN environment variable set to your token. To specify the output location of the build, use the -o flag. You should configure your server to use the built executable as its command.
STDIO API requests identify the server as github-mcp-server/<version> and retain the upstream MCP client's name/version in parentheses when available. Control characters, quotes, backslashes and parentheses in client metadata are escaped so the HTTP header remains valid; ordinary names, versions, spaces and printable Unicode are preserved. Release builds keep their release version. Source and default Docker builds with revision metadata use vcs-<full-commit-sha>. The Docker publishing workflow preserves tag versions, including prereleases, and lets branch, pull-request and nightly builds use the linked source revision. The -dirty marker applies only when both the revision and modified state come from embedded VCS metadata, never to a valid, explicitly supplied main.commit. This is a VCS build identifier, not a release number.
Build the complete package with go build -o github-mcp-server ./cmd/github-mcp-server from a Git checkout to embed its VCS revision. For builds without VCS metadata, supply the actual release with -ldflags '-X main.version=<release>' or the full source revision with -ldflags '-X main.commit=<sha>'. Valid metadata is selected in this order: explicit release, explicit source revision, embedded VCS revision, then installed main-module version. Valid explicit revisions remain authoritative even if build-context filtering changes embedded VCS metadata. Missing or malformed candidates fall through to the next usable source. If none is available, STDIO still starts with the development label dev and emits a warning on stderr, leaving stdout available for the MCP protocol. Supply real release or revision metadata when version-specific attribution is needed.
The GitHub MCP Server supports enabling or disabling specific groups of functionalities via the --toolsets flag. This allows you to control which GitHub API capabilities are available to your AI tools. Enabling only the toolsets that you need can help the LLM with tool choice and reduce the context size.
Toolsets are not limited to Tools. Relevant MCP Resources and Prompts are also included where applicable.
This registers all tools from repos and issues toolsets, plus get_gist.
Important Notes:
Tools and toolsets can be used together
Read-only mode takes priority: write tools are skipped if --read-only is set, even if explicitly requested via --tools
Tool names must match exactly (e.g., get_file_contents, not getFileContents). Invalid tool names will cause the server to fail at startup with an error message
When tools are renamed, old names are preserved as aliases for backward compatibility. See Tool Renaming for details.
Using Toolsets With Docker
When using Docker, you can pass the toolsets as environment variables:
GitHub Git API related tools for low-level Git operations
governance
Repository governance tools for managing rulesets and custom properties at the repository, organization, and enterprise levels
issues
GitHub Issues related tools
labels
GitHub Labels related tools
notifications
GitHub Notifications related tools
orgs
GitHub Organization related tools
projects
GitHub Projects related tools
pull_requests
GitHub Pull Request related tools
repos
GitHub Repository related tools
secret_protection
Secret protection related tools, such as GitHub Secret Scanning
security_advisories
Security advisories related tools
stargazers
GitHub Stargazers related tools
users
GitHub User related tools
Additional Toolsets in Remote GitHub MCP Server
Toolset
Description
copilot
Copilot related tools (e.g. Copilot Coding Agent)
copilot_spaces
Copilot Spaces related tools
github_support_docs_search
Search docs to answer GitHub product and support questions
Tools
Repository tools expose output schemas and typed structuredContent when the negotiated MCP protocol version is a supported version 2026-07-28 or newer. Older clients, clients with an unknown protocol version, and clients omitting the version receive the existing content without an output schema or structured output. Unknown versions are not treated as supported merely because they sort after 2026-07-28.
For get_file_contents, directory results (including field projections) are structured arrays. File downloads and metadata-only responses use a content array of typed text, embedded-resource, or resource-link blocks, preserving status messages, text, base64 blobs, empty files, and download links. Text-only repository mutations such as starring and deletion also return a structured message; fork responses distinguish a repository reference from an in-progress message. Repository deletion still requires its existing confirmation flow before returning a completed result.
Structured repository results use compact DTOs rather than raw REST objects. Release lookups share the compact release shape with release listings; Git references retain the ref, object type, and SHA; annotated tags retain tag/message/tagger/target information; deletion commits retain SHA, message, authors, tree SHA, parent SHAs, and a human-facing html_url when available. Directory entries retain file metadata and useful HTML/download links, but omit API and hypermedia routing URLs even when those fields were requested in a projection. Legacy and unknown protocol versions retain the original text byte-for-byte; modern text-only JSON responses serialize the same compact DTO as structuredContent. Non-text resource blocks and tool errors retain their existing content behavior. Structured projections use the same sanitized and filtered source as the legacy formatter.
For get_repository_tree, list_gists, get_gist, create_gist, and update_gist, gist results retain file names, contents, sizes, language/type information, timestamps, visibility, and compact owner profiles, while omitting API/node and Git transport URLs. Tree entries omit their derivable API URLs. Create/update gist results contain the gist ID and HTML URL. Modern JSON text and structured content serialize the same compact result. Older or unknown protocol versions retain byte-for-byte legacy text without an output schema or structured content.
The issue metadata (list_issue_types, list_issue_fields), comment (add_issue_comment, update_issue_comment), dependency (issue_dependency_read, issue_dependency_write), and duplicate-detection (find_duplicate) tools provide typed outputSchema and structuredContent for negotiated supported protocol versions 2026-07-28 or newer. Older or unknown protocol versions retain the same text responses without these fields. Tool errors do not return structured content. Dependency and duplicate-detection tools retain their existing feature gates.
For negotiated supported protocol versions 2026-07-28 or newer, the consolidated Actions tools (actions_list, actions_get, actions_run_trigger) return structured objects with a method discriminant and a method-specific typed field; JSON text contains the same compact projection. Workflow, job, and artifact projections omit API/hypermedia URLs while retaining browser links and useful identifiers, states, timestamps, and usage durations. Run usage lists billable runner environments in deterministic name order. Older and unknown-protocol text responses remain unchanged; get_job_logs retains its typed content, URL, or failed-job collection variants.
actions_get - Get details of GitHub Actions resources (workflows, workflow runs, jobs, and artifacts)
OAuth Challenge Scopes: repo
method: The method to execute (string, required)
owner: Repository owner (string, required)
repo: Repository name (string, required)
resource_id: The unique identifier of the resource. This will vary based on the "method" provided, so ensure you provide the correct ID:
Provide a workflow ID or workflow file name (e.g. ci.yaml) for 'get_workflow' method.
Provide a workflow run ID for 'get_workflow_run', 'get_workflow_run_usage', and 'get_workflow_run_logs_url' methods.
Provide an artifact ID for 'download_workflow_run_artifact' method.
Provide a job ID for 'get_workflow_job' method.
(string, required)
actions_list - List GitHub Actions workflows in a repository
OAuth Challenge Scopes: repo
method: The action to perform (string, required)
owner: Repository owner (string, required)
page: Page number for pagination (default: 1) (number, optional)
perPage: Results per page for pagination (default: 30, max: 100) (number, optional)
repo: Repository name (string, required)
resource_id: The unique identifier of the resource. This will vary based on the "method" provided, so ensure you provide the correct ID:
Do not provide any resource ID for 'list_workflows' method.
Provide a workflow ID or workflow file name (e.g. ci.yaml) for 'list_workflow_runs' method, or omit to list all workflow runs in the repository.
Provide a workflow run ID for 'list_workflow_jobs' and 'list_workflow_run_artifacts' methods.
(string, optional)
workflow_jobs_filter: Filters for workflow jobs. ONLY used when method is 'list_workflow_jobs' (object, optional)
workflow_runs_filter: Filters for workflow runs. ONLY used when method is 'list_workflow_runs' (object, optional)
inputs: Inputs the workflow accepts. Only used for 'run_workflow' method. (object, optional)
method: The method to execute (string, required)
owner: Repository owner (string, required)
ref: The git reference for the workflow. The reference can be a branch or tag name. Required for 'run_workflow' method. (string, optional)
repo: Repository name (string, required)
run_id: The ID of the workflow run. Required for all methods except 'run_workflow'. (number, optional)
workflow_id: The workflow ID (numeric) or workflow file name (e.g., main.yml, ci.yaml). Required for 'run_workflow' method. (string, optional)
get_job_logs - Get GitHub Actions workflow job logs
OAuth Challenge Scopes: repo
failed_only: When true, gets logs for all failed jobs in the workflow run specified by run_id. Requires run_id to be provided. (boolean, optional)
job_id: The unique identifier of the workflow job. Required when getting logs for a single job. (number, optional)
owner: Repository owner (string, required)
repo: Repository name (string, required)
return_content: Returns actual log content instead of URLs (boolean, optional)
run_id: The unique identifier of the workflow run. Required when failed_only is true to get logs for all failed jobs in the run. (number, optional)
tail_lines: Number of lines to return from the end of the log (number, optional)
get_code_quality_finding - Get code quality finding
OAuth Challenge Scopes: repo
findingNumber: The number of the finding. (number, required)
owner: The owner of the repository. (string, required)
repo: The name of the repository. (string, required)
get_code_scanning_alert - Get code scanning alert
OAuth Challenge Scopes: security_events
alertNumber: The number of the alert. (number, required)
owner: The owner of the repository. (string, required)
repo: The name of the repository. (string, required)
list_code_scanning_alerts - List code scanning alerts
OAuth Challenge Scopes: security_events
owner: The owner of the repository. (string, required)
page: Page number for pagination (min 1) (number, optional)
perPage: Results per page for pagination (min 1, max 100) (number, optional)
ref: The Git reference for the results you want to list. (string, optional)
repo: The name of the repository. (string, required)
severity: Filter code scanning alerts by severity (string, optional)
state: Filter code scanning alerts by state. Defaults to open (string, optional)
tool_name: The name of the tool used for code scanning. (string, optional)
get_me - Get my user profile
MCP App UI: ui://github-mcp-server/get-me
No parameters required
get_team_members - Get team members
OAuth Challenge Scopes: read:org
org: Organization login (owner) that contains the team. (string, required)
team_slug: Team slug (string, required)
get_teams - Get teams
OAuth Challenge Scopes: read:org
user: Username to get teams for. If not provided, uses the authenticated user. (string, optional)
ui_get - Get UI data
OAuth Challenge Scopes: repo, read:org
method: The type of data to fetch (string, required)
owner: Repository owner (required for all methods) (string, required)
repo: Repository name (required for labels, assignees, milestones, branches, issue fields, reviewers) (string, optional)
assign_copilot_to_issue - Assign Copilot to issue
OAuth Challenge Scopes: repo
base_ref: Git reference (e.g., branch) that the agent will start its work from. If not specified, defaults to the repository's default branch (string, optional)
custom_instructions: Optional custom instructions to guide the agent beyond the issue body. Use this to provide additional context, constraints, or guidance that is not captured in the issue description (string, optional)
issue_number: Issue number (number, required)
owner: Repository owner (string, required)
repo: Repository name (string, required)
request_copilot_review - Request Copilot review
OAuth Challenge Scopes: repo
owner: Repository owner (string, required)
pullNumber: Pull request number (number, required)
repo: Repository name (string, required)
assign_copilot_to_issue_with_intent - Assign Copilot to issue with intent
OAuth Challenge Scopes: repo
base_ref: Git reference (e.g., branch) that the agent will start its work from. If not specified, defaults to the repository's default branch. Ignored when is_suggestion is true (string, optional)
confidence: How confident you are in this choice. 'HIGH' for clear signal or explicit user request, 'MEDIUM' for reasonable inference with some ambiguity, 'LOW' for best guess with limited signal. (string, required)
custom_instructions: Optional custom instructions to guide the agent beyond the issue body. Ignored when is_suggestion is true (string, optional)
is_suggestion: If true, records a pending Copilot assignment intent rather than launching the agent. Approval later supplies the launch context; base_ref and custom_instructions are ignored in this case. (boolean, required)
issue_number: Issue number (number, required)
owner: Repository owner (string, required)
rationale: One concise sentence explaining what specifically about the issue led to choosing Copilot. State the concrete signal (e.g. 'Well-scoped task with clear acceptance criteria'). (string, required)
repo: Repository name (string, required)
get_dependabot_alert - Get dependabot alert
OAuth Challenge Scopes: security_events
alertNumber: The number of the alert. (number, required)
owner: The owner of the repository. (string, required)
repo: The name of the repository. (string, required)
list_dependabot_alerts - List dependabot alerts
OAuth Challenge Scopes: security_events
after: Cursor for pagination. Use the cursor from the previous response. (string, optional)
owner: The owner of the repository. (string, required)
perPage: Results per page for pagination (min 1, max 100) (number, optional)
repo: The name of the repository. (string, required)
severity: Filter dependabot alerts by severity (string, optional)
state: Filter dependabot alerts by state. Defaults to open (string, optional)
body: Comment content (required for 'add', 'reply', and 'update' methods) (string, optional)
commentNodeID: The Node ID of the discussion comment (required for 'reply', 'update', 'delete', 'mark_answer', and 'unmark_answer' methods). For 'reply', this is the top-level comment to reply to; GitHub Discussions only support one level of nesting. (string, optional)
discussionNumber: Discussion number (required for 'add' and 'reply' methods) (number, optional)
method: Write operation to perform on a discussion comment.
Options are:
'add' - adds a new top-level comment to a discussion.
'reply' - replies to a top-level discussion comment (GitHub Discussions only support one level of nesting).
'update' - updates an existing discussion comment.
'delete' - deletes a discussion comment.
'mark_answer' - marks a discussion comment as the answer (Q&A only).
'unmark_answer' - unmarks a discussion comment as the answer (Q&A only).
(string, required)
owner: Repository owner (required for 'add' and 'reply' methods) (string, optional)
repo: Repository name (required for 'add' and 'reply' methods) (string, optional)
get_discussion - Get discussion
OAuth Challenge Scopes: repo
discussionNumber: Discussion Number (number, required)
owner: Repository owner (string, required)
repo: Repository name (string, required)
get_discussion_comments - Get discussion comments
OAuth Challenge Scopes: repo
after: Cursor for pagination. Use the cursor from the previous response. (string, optional)
discussionNumber: Discussion Number (number, required)
includeReplies: When true, each top-level comment will include its replies nested within it (up to 100 replies per comment, which is the GitHub API maximum). Defaults to false. (boolean, optional)
owner: Repository owner (string, required)
perPage: Results per page for pagination (min 1, max 100) (number, optional)
repo: Repository name (string, required)
list_discussion_categories - List discussion categories
OAuth Challenge Scopes: repo
owner: Repository owner (string, required)
repo: Repository name. If not provided, discussion categories will be queried at the organisation level. (string, optional)
list_discussions - List discussions
OAuth Challenge Scopes: repo
after: Cursor for pagination. Use the cursor from the previous response. (string, optional)
category: Optional filter by discussion category ID. If provided, only discussions with this category are listed. (string, optional)
direction: Order direction. (string, optional)
orderBy: Order discussions by field. If provided, the 'direction' also needs to be provided. (string, optional)
owner: Repository owner (string, required)
perPage: Results per page for pagination (min 1, max 100) (number, optional)
repo: Repository name. If not provided, discussions will be queried at the organisation level. (string, optional)
create_gist - Create Gist
OAuth Challenge Scopes: gist
content: Content for simple single-file gist creation (string, required)
description: Description of the gist (string, optional)
filename: Filename for simple single-file gist creation (string, required)
public: Whether the gist is public (boolean, optional)
get_gist - Get Gist Content
gist_id: The ID of the gist (string, required)
list_gists - List Gists
page: Page number for pagination (min 1) (number, optional)
perPage: Results per page for pagination (min 1, max 100) (number, optional)
since: Only gists updated after this time (ISO 8601 timestamp) (string, optional)
username: GitHub username (omit for authenticated user's gists) (string, optional)
update_gist - Update Gist
OAuth Challenge Scopes: gist
content: Content for the file (string, required)
description: Updated description of the gist (string, optional)
filename: Filename to update or create (string, required)
gist_id: ID of the gist to update (string, required)
get_repository_tree - Get repository tree
OAuth Challenge Scopes: repo
owner: Repository owner (username or organization) (string, required)
path_filter: Optional path prefix to filter the tree results (e.g., 'src/' to only show files in the src directory) (string, optional)
recursive: Setting this parameter to true returns the objects or subtrees referenced by the tree. Default is false (boolean, optional)
repo: Repository name (string, required)
tree_sha: The SHA1 value or ref (branch or tag) name of the tree. Defaults to the repository's default branch (string, optional)
bypass_actors: The actors that can bypass the rules in this ruleset (object[], optional)
conditions: Conditions for when this ruleset applies, e.g. {"ref_name": {"include": ["refs/heads/main"], "exclude": []}} (object, optional)
enforcement: The enforcement level of the ruleset. 'evaluate' allows admins to test rules before enforcing them (string, required)
enterprise: Enterprise slug. Required when level is 'enterprise'. (string, optional)
level: The level at which the ruleset is configured:
'repository': A ruleset on a single repository (requires 'owner' and 'repo').
'organization': A ruleset covering repositories in an organization (requires 'org').
'enterprise': A ruleset covering repositories across an enterprise (requires 'enterprise'). (string, required)
name: The name of the ruleset (string, required)
org: Organization name. Required when level is 'organization'. (string, optional)
owner: Repository owner. Required when level is 'repository'. (string, optional)
repo: Repository name. Required when level is 'repository'. (string, optional)
rules: An array of rules within the ruleset. Each rule is an object with a 'type' (e.g. 'creation', 'deletion', 'non_fast_forward', 'required_signatures', 'pull_request', 'required_status_checks') and, for rules that need configuration, a 'parameters' object (object[], required)
target: The target of the ruleset. Defaults to 'branch'. 'repository' is only valid for 'organization' and 'enterprise' level rulesets. (string, optional)
enterprise: Enterprise slug. Required when level is 'enterprise'. (string, optional)
level: The level at which custom properties are managed:
'repository': The custom property VALUES assigned to a repository (requires 'owner' and 'repo').
'organization': The custom property DEFINITIONS (schema) for an organization (requires 'org').
'enterprise': The custom property DEFINITIONS (schema) for an enterprise (requires 'enterprise'). (string, required)
org: Organization name. Required when level is 'organization'. (string, optional)
owner: Repository owner. Required when level is 'repository'. (string, optional)
properties: The custom properties to create or update. At the repository level each item assigns a value ('property_name' and 'value'); at the organization and enterprise levels each item defines the schema ('property_name' and 'value_type', plus optional definition fields). (object[], required)
repo: Repository name. Required when level is 'repository'. (string, optional)
actor_name: The handle for the GitHub user account to filter rule suites on. Used by the 'list_rule_suites' method. (string, optional)
branch: Branch name. Required for the 'get_rules_for_branch' method. (string, optional)
enterprise: Enterprise slug. Required when level is 'enterprise'. (string, optional)
evaluate_status: Filter rule suites by ruleset evaluation mode. Used by the 'list_rule_suites' method. (string, optional)
includes_parents: Include rulesets configured at higher levels that also apply. Defaults to true. Used by the 'get' and 'list' methods at the repository level. (boolean, optional)
level: The level at which the ruleset is configured:
'repository': A ruleset on a single repository (requires 'owner' and 'repo').
'organization': A ruleset covering repositories in an organization (requires 'org').
'enterprise': A ruleset covering repositories across an enterprise (requires 'enterprise'). (string, required)
method: Operation to perform:
'get': Get a specific ruleset by ID (requires 'ruleset_id'). Supported at every level.
'list': List all rulesets. Supported at every level.
'get_rules_for_branch': Get all rules that apply to a branch (requires 'branch'). Repository level only.
'list_rule_suites': List rule suites, the evaluations of rules against pushes. Repository and organization levels only.
'get_rule_suite': Get a specific rule suite by ID (requires 'rule_suite_id'). Repository and organization levels only. (string, required)
org: Organization name. Required when level is 'organization'. (string, optional)
owner: Repository owner. Required when level is 'repository'. (string, optional)
page: Page number for pagination (min 1) (number, optional)
perPage: Results per page for pagination (min 1, max 100) (number, optional)
ref: The name of the ref (branch, tag, etc.) to filter rule suites by. Used by the 'list_rule_suites' method. (string, optional)
repo: Repository name. Required when level is 'repository'. (string, optional)
repository_name: Repository name to filter rule suites by. Used by the 'list_rule_suites' method at the organization level. (string, optional)
add_issue_comment - Add comment to issue or pull request
OAuth Challenge Scopes: repo
body: Comment content. Required unless reaction is provided. (string, optional)
comment_id: The numeric ID of the issue or pull request comment to react to. Use this for reactions to comments; omit it to react to the issue or pull request itself. Cannot be combined with body. (integer, optional)
issue_number: Issue or pull request number to comment on or react to. (number, required)
owner: Repository owner (string, required)
reaction: Emoji reaction to add. Required unless body is provided. (string, optional)
repo: Repository name (string, required)
get_label - Get a specific label from a repository
OAuth Challenge Scopes: repo
name: Label name. (string, required)
owner: Repository owner (username or organization name) (string, required)
repo: Repository name (string, required)
issue_read - Get issue details
OAuth Challenge Scopes: repo
issue_number: The number of the issue (number, required)
method: The read operation to perform on a single issue.
Options are:
get - Get issue details. Also returns best-effort hierarchy flags (has_parent, has_children); parent and sub_issues_summary are optional relationship summaries, and closed_by_pull_requests summarizes the pull requests configured to close the issue as total_count plus up to 5 references.
get_comments - Get issue comments.
get_sub_issues - Get sub-issues (children) of the issue.
get_parent - Get the parent issue, if this issue is a sub-issue of another.
get_labels - Get labels assigned to the issue.
(string, required)
owner: The owner of the repository (string, required)
page: Page number for pagination (min 1) (number, optional)
perPage: Results per page for pagination (min 1, max 100) (number, optional)
repo: The name of the repository (string, required)
issue_write - Create or update issue/pull request
OAuth Challenge Scopes: repo
MCP App UI: ui://github-mcp-server/issue-write
assignees: Usernames to assign to this issue (string[], optional)
body: Issue body content (string, optional)
duplicate_of: Issue number that this issue is a duplicate of. Required when state_reason is 'duplicate'. (number, optional)
issue_fields: Issue field values to set or clear. Each item requires 'field_name' and exactly one of 'value', 'field_option_name', or 'delete: true'. (object[], optional)
issue_number: Issue number to update (number, optional)
labels: Labels to apply to this issue (string[], optional)
method: Write operation to perform on a single issue.
Options are:
'create' - creates a new issue.
'update' - updates an existing issue.
(string, required)
milestone: Milestone number (number, optional)
owner: Repository owner (string, required)
parent_issue_number: Issue number of the parent issue. Only used when method is 'create' and cannot be combined with issue_fields. The new issue is created and attached to this parent in the same operation. (number, optional)
parent_owner: Repository owner of the parent issue. Must be provided with parent_repo. Omit both to use owner and repo. Only used when method is 'create' and parent_issue_number is provided. (string, optional)
parent_repo: Repository name of the parent issue. Must be provided with parent_owner. Omit both to use owner and repo. Only used when method is 'create' and parent_issue_number is provided. (string, optional)
repo: Repository name (string, required)
state: New state (string, optional)
state_reason: Reason for the state change. Ignored unless state is changed. (string, optional)
title: Issue title (string, optional)
type: Type of this issue. For updates, pass null to remove the current type. Only use if issue types are enabled for this repository. Use list_issue_types to get valid type values for this repository or its owner organization. If the repository doesn't support issue types, omit this parameter. (string | null, optional)
list_issue_fields - List issue fields
OAuth Challenge Scopes: repo, read:org
owner: The account owner of the repository or organization. The name is not case sensitive. (string, required)
repo: The name of the repository. When provided, returns fields for this specific repository (inherited from its organization). When omitted, returns org-level fields directly. (string, optional)
list_issue_types - List available issue types
OAuth Challenge Scopes: repo, read:org
owner: The account owner of the repository or organization. (string, required)
repo: The name of the repository. When provided, returns issue types for this specific repository. When omitted, returns org-level issue types directly. (string, optional)
list_issues - List issues
OAuth Challenge Scopes: repo
after: Cursor for pagination. Use the cursor from the previous response. (string, optional)
direction: Order direction. If provided, the 'orderBy' also needs to be provided. (string, optional)
field_filters: Filter by custom issue field values. Each entry takes a field_name and a value; the server looks up the field and coerces the value to its type (single-select option name, text, number, or YYYY-MM-DD date). (object[], optional)
fields: Subset of fields to return for each issue. If omitted, all fields are returned. Use this to reduce response size when you only need specific fields; omitting 'body' and 'field_values' in particular drops the largest per-result data. (string[], optional)
labels: Filter by labels (string[], optional)
orderBy: Order issues by field. If provided, the 'direction' also needs to be provided. (string, optional)
owner: Repository owner (string, required)
perPage: Results per page for pagination (min 1, max 100) (number, optional)
repo: Repository name (string, required)
since: Filter by date (ISO 8601 timestamp) (string, optional)
state: Filter by state, by default both open and closed issues are returned when not provided (string, optional)
search_issues - Search issues
OAuth Challenge Scopes: repo
fields: Subset of fields to return for each issue result. If omitted, all fields are returned. Use this to reduce response size when you only need specific fields; omitting 'body', 'reactions', and 'labels' in particular drops the largest per-result data. (string[], optional)
order: Sort order (string, optional)
owner: Optional repository owner. If provided with repo, only issues for this repository are listed. (string, optional)
page: Page number for pagination (min 1) (number, optional)
perPage: Results per page for pagination (min 1, max 100) (number, optional)
query: The search query, as natural language. When the user gives alternative wordings, include them as plain words rather than joining them with OR. (string, required)
repo: Optional repository name. If provided with owner, only issues for this repository are listed. (string, optional)
sort: Sort field by number of matches of categories, defaults to best match (string, optional)
sub_issue_write - Change sub-issue
OAuth Challenge Scopes: repo
after_id: The ID of the sub-issue to be prioritized after (either after_id OR before_id should be specified) (number, optional)
before_id: The ID of the sub-issue to be prioritized before (either after_id OR before_id should be specified) (number, optional)
issue_number: The number of the parent issue (number, required)
method: The action to perform on a single sub-issue
Options are:
'add' - add a sub-issue to a parent issue in a GitHub repository.
'remove' - remove a sub-issue from a parent issue in a GitHub repository.
'reprioritize' - change the order of sub-issues within a parent issue in a GitHub repository. Use either 'after_id' or 'before_id' to specify the new position.
Writes issue hierarchy. To move a sub-issue to a new parent, use add with replace_parent=true; there is no writable parent field.
(string, required)
owner: Repository owner (string, required)
replace_parent: When true, replaces the sub-issue's current parent issue. Use with 'add' method only. (boolean, optional)
repo: Repository name (string, required)
sub_issue_id: The ID of the sub-issue to add. ID is not the same as issue number (number, required)
update_issue_comment - Update issue comment
OAuth Challenge Scopes: repo
body: New comment content (string, required)
comment_id: The numeric ID of the issue or pull request conversation comment to update. Do not use a pull request review comment ID. (integer, required)
owner: Repository owner (string, required)
repo: Repository name (string, required)
get_label - Get a specific label from a repository
OAuth Challenge Scopes: repo
name: Label name. (string, required)
owner: Repository owner (username or organization name) (string, required)
repo: Repository name (string, required)
label_write - Write operations on repository labels
OAuth Challenge Scopes: repo
color: Label color as 6-character hex code without '#' prefix (e.g., 'f29513'). Required for 'create', optional for 'update'. (string, optional)
description: Label description text. Optional for 'create' and 'update'. (string, optional)
method: Operation to perform: 'create', 'update', or 'delete' (string, required)
name: Label name - required for all operations (string, required)
new_name: New name for the label (used only with 'update' method to rename) (string, optional)
owner: Repository owner (username or organization name) (string, required)
repo: Repository name (string, required)
list_label - List labels from a repository
OAuth Challenge Scopes: repo
after: Cursor for pagination. Use the cursor from the previous response. (string, optional)
owner: Repository owner (username or organization name) - required for all operations (string, required)
perPage: Results per page for pagination (min 1, max 100) (number, optional)
repo: Repository name - required for all operations (string, required)
dismiss_notification - Dismiss notification
OAuth Challenge Scopes: notifications
state: The new state of the notification (read/done) (string, required)
threadID: The ID of the notification thread (string, required)
get_notification_details - Get notification details
OAuth Challenge Scopes: notifications
notificationID: The ID of the notification (string, required)
list_notifications - List notifications
OAuth Challenge Scopes: notifications
before: Only show notifications updated before the given time (ISO 8601 format) (string, optional)
filter: Filter notifications to, use default unless specified. Read notifications are ones that have already been acknowledged by the user. Participating notifications are those that the user is directly involved in, such as issues or pull requests they have commented on or created. (string, optional)
owner: Optional repository owner. If provided with repo, only notifications for this repository are listed. (string, optional)
page: Page number for pagination (min 1) (number, optional)
perPage: Results per page for pagination (min 1, max 100) (number, optional)
repo: Optional repository name. If provided with owner, only notifications for this repository are listed. (string, optional)
since: Only show notifications updated after the given time (ISO 8601 format) (string, optional)
action: Action to perform: ignore, watch, or delete the repository notification subscription. (string, required)
owner: The account owner of the repository. (string, required)
repo: The name of the repository. (string, required)
mark_all_notifications_read - Mark all notifications as read
OAuth Challenge Scopes: notifications
lastReadAt: Describes the last point that notifications were checked (optional). Default: Now (string, optional)
owner: Optional repository owner. If provided with repo, only notifications for this repository are marked as read. (string, optional)
repo: Optional repository name. If provided with owner, only notifications for this repository are marked as read. (string, optional)
search_orgs - Search organizations
OAuth Challenge Scopes: read:org
order: Sort order (string, optional)
page: Page number for pagination (min 1) (number, optional)
perPage: Results per page for pagination (min 1, max 100) (number, optional)
query: Organization search query. Examples: 'microsoft', 'location:california', 'created:>=2025-01-01'. Search is automatically scoped to type:org. (string, required)
sort: Sort field by category (string, optional)
projects_get - Get details of GitHub Projects resources
OAuth Challenge Scopes: read:project
field_id: The field's ID. Required for 'get_project_field' method. (number, optional)
field_names: Specific list of field names to include in the response when getting a project item (e.g. ["Status", "Priority"]). Resolved server-side to field IDs — pass this instead of 'fields' when you only know the human-readable names. Mutually exclusive with 'fields' — provide one, not both. Only used for 'get_project_item' method. (string[], optional)
fields: Specific list of field IDs to include in the response when getting a project item (e.g. ["102589", "985201", "169875"]). If neither 'fields' nor 'field_names' is provided, only the title field is included. Mutually exclusive with 'field_names' — provide one, not both. Only used for 'get_project_item' method. (string[], optional)
item_id: The item's ID. Required for 'get_project_item' method. (number, optional)
method: The method to execute (string, required)
owner: The owner (user or organization login). The name is not case sensitive. (string, optional)
owner_type: Owner type (user or org). If not provided, will be automatically detected. (string, optional)
project_number: The project's number. (number, optional)
status_update_id: The node ID of the project status update. Required for 'get_project_status_update' method. (string, optional)
view_id: The node ID of the project view. Required for 'get_project_view' method. (string, optional)
projects_list - List GitHub Projects resources
OAuth Challenge Scopes: read:project
after: Forward pagination cursor from previous pageInfo.nextCursor. (string, optional)
before: Backward pagination cursor from previous pageInfo.prevCursor (rare). (string, optional)
field_names: Field names to include when listing project items (e.g. ["Status", "Priority"]). Resolved server-side to field IDs — pass this instead of 'fields' when you only know the human-readable names. Names that fail to resolve return a structured error. Mutually exclusive with 'fields' — provide one, not both. Only used for 'list_project_items' method. (string[], optional)
fields: Field IDs to include when listing project items (e.g. ["102589", "985201"]). CRITICAL: Always provide to get field values. Without this (and without 'field_names'), only titles returned. Mutually exclusive with 'field_names' — provide one, not both. Only used for 'list_project_items' method. (stri
rule_suite_id: Rule suite ID. Required for the 'get_rule_suite' method. (number, optional)
rule_suite_result: The rule suite result to filter by. Used by the 'list_rule_suites' method. (string, optional)
ruleset_id: Ruleset ID. Required for the 'get' method. (number, optional)
time_period: The time period to filter rule suites by. Used by the 'list_rule_suites' method. (string, optional)