GitHub MCP Server
Provides comprehensive tools for managing GitHub repositories, issues, pull requests, branches, commits, and file operations, as well as searching across repositories, code, and users on the GitHub platform.
Click on "Deploy 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., "@GitHub MCP Server list pull requests in the claude-desktop repository"
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.
GitHub MCP Server
Model Context Protocol server for GitHub repositories, issues, pull requests, branches, tags, commits, and search.
It ships with 34 tools across 5 categories and supports:
hosted key-service mode with
usr_...user keysself-hosted Streamable HTTP deployments
CLI/stdio usage for local MCP clients
Quick Start
Option 1: Hosted key-service mode
Preferred path-based form:
{
"mcpServers": {
"github": {
"transport": "streamable-http",
"url": "https://mcp.techmavie.digital/github/mcp/usr_YOUR_USER_KEY"
}
}
}Compatibility query form:
https://mcp.techmavie.digital/github/mcp?api_key=usr_YOUR_USER_KEYOption 2: Self-hosted HTTP
Use header-based auth on /github/mcp:
{
"mcpServers": {
"github": {
"transport": "streamable-http",
"url": "https://mcp.techmavie.digital/github/mcp",
"headers": {
"X-API-Key": "YOUR_MCP_API_KEY",
"X-GitHub-Token": "YOUR_GITHUB_TOKEN"
}
}
}
}MCP_API_KEY must be configured on the server or self-hosted /mcp requests will be rejected.
For deployments mounted under /github, set PUBLIC_BASE_PATH=/github so the server card advertises the correct public endpoint.
Option 3: CLI / stdio
npm install -g mcp-github
GITHUB_PERSONAL_ACCESS_TOKEN=ghp_your_token_here mcp-githubExample client config:
{
"mcpServers": {
"github": {
"command": "npx",
"args": ["-y", "mcp-github"],
"env": {
"GITHUB_PERSONAL_ACCESS_TOKEN": "ghp_your_token_here"
}
}
}
}Option 4: Legacy query-token mode
This is still supported for explicit requests only and is deprecated:
https://mcp.techmavie.digital/github/mcp?token=YOUR_GITHUB_TOKENThe server no longer falls back to its own GITHUB_PERSONAL_ACCESS_TOKEN for bare /mcp HTTP requests.
Related MCP server: GitHub Analyzer Pro MCP Server
Authentication Modes
Mode | Endpoint | Client auth |
Hosted key-service |
| user key in path |
Hosted key-service compatibility |
| user key in query string |
Self-hosted |
|
|
Legacy |
| explicit query token, deprecated |
CLI | stdio |
|
Tool Categories
Search Tools (3)
search_repositoriessearch_codesearch_users
Repository Tools (12)
get_repositoryget_commitlist_commitslist_branchescreate_or_update_filecreate_repositoryget_file_contentsfork_repositorycreate_branchlist_tagsget_tagpush_files
Issue Tools (7)
get_issueadd_issue_commentsearch_issuescreate_issuelist_issuesupdate_issueget_issue_comments
Pull Request Tools (11)
get_pull_requestupdate_pull_requestlist_pull_requestsmerge_pull_requestget_pull_request_filesget_pull_request_statusupdate_pull_request_branchget_pull_request_commentscreate_pull_requestget_pull_request_review_commentscreate_pull_request_review_comment
Utility Tools (1)
hello
Endpoints
Endpoint | Method | Description |
| GET | health check |
| POST | hosted key-service endpoint |
| POST | self-hosted endpoint |
| POST | diagnostics endpoint when enabled |
| GET | root-level discovery metadata |
| GET | analytics JSON, requires |
| GET | analytics tool breakdown, requires |
| GET | analytics dashboard shell |
If this server is mounted under /github, the server-card route still lives at the host root:
https://mcp.techmavie.digital/.well-known/mcp/server-card.jsonEnvironment Variables
Variable | Default | Description |
|
| HTTP port |
|
| bind address |
| unset | CLI/stdio token only |
| unset | required for self-hosted |
| unset | hosted key-service resolver URL |
| unset | hosted key-service bearer token |
|
| comma-separated CORS allowlist |
| unset | public reverse-proxy mount path such as |
|
| protocol version reported by HTTP server |
|
| enable sanitized request tracing |
|
| enable |
|
| analytics storage directory |
Local Development
npm install
npm run dev:httpBuild and run production HTTP mode:
npm run build:tsc
npm run start:httpRun CLI mode:
GITHUB_PERSONAL_ACCESS_TOKEN=ghp_your_token_here npm run cliProject Structure
mcp-github/
|-- src/
| |-- index.ts
| |-- http-server.ts
| |-- cli.ts
| |-- tools/
| |-- resources/
|-- deploy/
| |-- DEPLOYMENT.md
| |-- nginx-mcp.conf
|-- .github/workflows/
|-- docker-compose.yml
|-- Dockerfile
|-- .env.sample
|-- package.json
|-- tsconfig.json
`-- README.mdSecurity Notes
Self-hosted
/mcpfails closed whenMCP_API_KEYis missing.Analytics fail closed when
MCP_API_KEYis missing.Bare
/mcprequests no longer inherit the server's own PAT.Recent analytics store hashed client IPs only.
Request-scoped MCP servers and transports are used for HTTP requests.
?token=remains available only as an explicit deprecated compatibility path.
License
Available Tools
34 toolsadd_issue_commentB
Add a comment to a specific issue in a GitHub repository.
Inputs: owner (required), repo (required), issue_number (required), body (required).
create_branchB
Create a new branch in a GitHub repository
Inputs: owner (required), repo (required), branch (required), from_branch.
create_issueB
Create a new issue in a GitHub repository.
Inputs: owner (required), repo (required), title (required), body, +3 more.
create_or_update_fileB
Create or update a single file in a GitHub repository. If updating an existing file, you must provide the current SHA of the file (the full 40-character SHA, not a shortened version).
Inputs: owner (required), repo (required), path (required), content (required), +3 more.
create_pull_requestB
Create a new pull request in a GitHub repository.
Inputs: owner (required), repo (required), title (required), head (required), +4 more.
create_pull_request_review_commentB
Create a review comment (line-by-line code comment) on a pull request.
Inputs: owner (required), repo (required), pullNumber (required), body (required), +7 more.
create_repositoryB
Create a new GitHub repository in your account
Inputs: name (required), description, private, autoInit.
fork_repositoryB
Fork a GitHub repository to your account or specified organization
Inputs: owner (required), repo (required), organization.
get_commitB
Get details for a commit from a GitHub repository
Inputs: owner (required), repo (required), sha (required).
get_file_contentsB
Get the contents of a file from a GitHub repository
Inputs: owner (required), repo (required), path (required), branch, +1 more.
get_issueB
Get details of a specific issue in a GitHub repository.
Inputs: owner (required), repo (required), issue_number (required).
get_issue_commentsB
Get comments for a specific issue in a GitHub repository.
Inputs: owner (required), repo (required), issue_number (required), page, +1 more.
get_pull_requestB
Get details of a specific pull request in a GitHub repository.
Inputs: owner (required), repo (required), pullNumber (required).
get_pull_request_commentsC
Get comments for a specific pull request
Inputs: owner (required), repo (required), pullNumber (required), per_page, +1 more.
get_pull_request_filesA
Get the files changed in a specific pull request.
Inputs: owner (required), repo (required), pullNumber (required), per_page, +1 more.
get_pull_request_review_commentsB
Get review comments (line-by-line code comments) for a specific pull request.
Inputs: owner (required), repo (required), pullNumber (required), sort, +4 more.
get_pull_request_statusB
Get the status of a specific pull request.
Inputs: owner (required), repo (required), pullNumber (required).
get_repositoryB
Get detailed information about a GitHub repository including README and file structure
Inputs: owner (required), repo (required).
get_tagA
Get details about a specific git tag in a GitHub repository (supports both annotated and lightweight tags)
Inputs: owner (required), repo (required), tag (required).
helloA
A simple test tool to verify that the MCP server is working correctly
Inputs: no named parameters.
list_branchesB
List branches in a GitHub repository
Inputs: owner (required), repo (required), per_page, page.
list_commitsC
Get list of commits of a branch in a GitHub repository
Inputs: owner (required), repo (required), sha, per_page, +1 more.
list_issuesC
List issues in a GitHub repository.
Inputs: owner (required), repo (required), state, labels, +5 more.
list_pull_requestsC
List pull requests in a GitHub repository.
Inputs: owner (required), repo (required), state, head, +5 more.
list_tagsB
List git tags in a GitHub repository
Inputs: owner (required), repo (required), per_page, page.
merge_pull_requestB
Merge a pull request in a GitHub repository.
Inputs: owner (required), repo (required), pullNumber (required), commit_title, +2 more.
push_filesB
Push multiple files to a GitHub repository in a single commit
Inputs: owner (required), repo (required), branch (required), files (required), +1 more.
search_codeA
Search for code across GitHub repositories. Returns a concise list with file paths and repositories. Use 'get_file_contents' for full file content.
Inputs: q (required), sort, order, per_page, +1 more.
search_issuesC
Search for issues in GitHub repositories.
Inputs: q (required), sort, order, per_page, +1 more.
search_repositoriesA
Search for GitHub repositories. Returns a concise list with essential information. Use 'get_repository' for detailed information about a specific repository.
Inputs: query (required), per_page, page.
search_usersC
Search for GitHub users.
Inputs: q (required), sort, order, per_page, +1 more.
update_issueB
Update an existing issue in a GitHub repository.
Inputs: owner (required), repo (required), issue_number (required), title, +5 more.
update_pull_requestC
Update an existing pull request in a GitHub repository.
Inputs: owner (required), repo (required), pullNumber (required), title, +4 more.
update_pull_request_branchB
Update the branch of a pull request with the latest changes from the base branch
Inputs: owner (required), repo (required), pullNumber (required), expectedHeadSha.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 34 tools
Each tool has a clear, distinct purpose; even closely related tools like get_pull_request_comments and get_pull_request_review_comments are differentiated by name. The test tool 'hello' is standalone.
All operational tools follow a consistent verb_noun snake_case pattern (e.g., create_issue, list_branches, search_code). The lone exception 'hello' is a test tool and does not break the pattern for the main set.
34 tools is on the higher side, but the GitHub domain is broad and each tool covers a specific operation. The count is well-justified for a full-featured GitHub MCP server.
The tool surface covers the core CRUD and lifecycle operations for issues, pull requests, repositories, files, branches, commits, and search. Minor gaps like delete operations are missing but not critical for typical agent workflows.
Maintenance
Related MCP Connectors
Connect AI assistants to GitHub - manage repos, issues, PRs, and workflows through natural language.
Ask any GitHub repository a question. Get source-backed answers.
Operate GitHub from your AI assistant: repos, PRs, issues, Actions. Previews and read-only mode.
Code intelligence for LLMs. Analyze, search, and retrieve code from any public git repository.
Related MCP Servers
- AlicenseAqualityDmaintenanceProvides GitHub data analysis for repositories, developers, and organizations, enabling insights into open source ecosystems through API calls and natural language queries.514MIT
- FlicenseNot gradedqualityDmaintenanceA production-ready server featuring over 28 tools for comprehensive GitHub analysis, including repository metadata, issue tracking, and workflow monitoring. It enables users to search repositories, analyze contributor activity, and inspect codebase health through natural language.1-
- AlicenseNot gradedqualityAmaintenanceAn autonomous GitHub management engine that enables control over repositories, branches, security alerts, and Actions workflows through natural language. It utilizes a zero-local-footprint architecture by storing all configuration and audit logs within a private state repository on GitHub.1MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to interact with GitHub via natural language, supporting repository management, issue tracking, file commits, and more.ISC