Github MCP Server
Integrates with GitHub, allowing LLMs to interact with repositories, issues, and pull requests via the GitHub API.
Github MCP Server
A Model Context Protocol Server for Github.
Provides integration with Github through MCP, allowing LLMs to interact with it.
Installation
Manual Installation
-
Create or get access token for your Github Account: Guide
-
Add server config to Claude Desktop:
- MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json
- Windows: Check this Guide
{
"mcpServers": {
"github": {
"command": "npx",
"args": ["-y", "github-mcp-server"],
"env": {
"GITHUB_PERSONAL_ACCESS_TOKEN": "your_personal_github_access_token"
}
}
}
}
Components
Tools
-
search_repositories: Search GitHub for a repository.- Required inputs:
query(string): The query to search for repository.page(number, default: 30, max: 100): Page number for pagination.per_page(number, default: 30, max: 100): Number of results per page.
- Required inputs:
-
search_issues: Search issues from a repository.- Required inputs:
query(string): The query to search for repository.page(number, default: 1): Page number for pagination.per_page(number, default: 30, max: 100): Number of results per page.order(optional string, default:desc): Sort of order (ascordesc).sort(optional string, default:best match): Sort field (can be one of:comments,reactions,reactions-+1,reactions--1,reactions-smile,reactions-thinking_face,reactions-heart,reactions-tada,interactions,createdorupdated).
- Required inputs:
-
search_commits: Search commits from a repository.- Required inputs:
query(string): The query to search for repository.page(number, default: 1): Page number for pagination.per_page(number, default: 30, max: 100): Number of results per page.order(optional string, default:desc): Sort of order (ascordesc).sort(optional string, default:best match): Sort field (can be one of:committer-dateorauthor-date).
- Required inputs:
-
search_code: Search code from a repository.- Required inputs:
query(string): The query to search for repository.page(number, default: 1): Page number for pagination.per_page(number, default: 30, max: 100): Number of results per page.
- Required inputs:
-
search_users: Search users from a repository.- Required inputs:
query(string): The query to search for repository.page(number, default: 1): Page number for pagination.per_page(number, default: 30, max: 100): Number of results per page.order(optional string, default:desc): Sort of order (ascordesc).sort(optional string, default:best match): Sort field (can be one of:followers,repositoriesorjoined).
- Required inputs:
-
search_topics: Search topics.- Required inputs:
query(string): The query to search for repository.page(number, default: 1): Page number for pagination.per_page(number, default: 30, max: 100): Number of results per page.
- Required inputs:
-
search_labels: Search labels in a repository.- Required inputs:
query(string): The query to search for repository.page(number, default: 1): Page number for pagination.per_page(number, default: 30, max: 100): Number of results per page.order(optional string, default:desc): Sort of order (ascordesc).sort(optional string, default:best match): Sort field (can be one of:createdorupdated).
- Required inputs:
-
list_repositories_issues: List issues from a repository.- Required inputs:
owner(string): The owner of the repository.repo(string): The repository name.page(optional number, default: 1): Page number for pagination.per_page(optional number, default: 30, max: 100): Number of results per page.direction(optional string, default:desc): Direction of sort (ascordesc).sort(optional string, default:created): Sort field (can be one of:created,commentsorupdated).since(optional string): Results last updated after the given time (ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.).labels(optional string): Comma separated label names. Example: bug,ui,@high.milestone(optional string): Milestone number.assignee(optional string): Name of assignee user (*for all).creator(optional string): The user that created the issue. (*for all).mentioned(optional string): A user that's mentioned in the issue.
- Required inputs:
-
get_issue: Get an issue from a repository.- Required inputs:
owner(string): The owner of the repository.repo(string): The repository name.issue_number(number): The issue number.
- Required inputs:
-
list_repositories_pull_requests: List pull requests from a repository.- Required inputs:
owner(string): The owner of the repository.repo(string): The repository name.page(optional number, default: 1): Page number for pagination.per_page(optional number, default: 30, max: 100): Number of results per page.direction(optional string, default:desc): Direction of sort (ascordesc).sort(optional string, default:created): Sort field (can be one of:created,popularity,long-runningorupdated).head(optional string): Filter pulls by head user or head organization and branch name in the format of user:ref-name or organization:ref-name (For example: github:new-script-format or octocat:test-branch).base(optional string): Filter pulls by base branch name. (For example: gh-pages).
- Required inputs:
-
get_pull_request: Get a pull request from a repository.- Required inputs:
owner(string): The owner of the repository.repo(string): The repository name.pull_request_number(number): The pull request number.
- Required inputs:
Usage examples
Some example prompts you can use to interact with Github:
- "modelcontextprotocol" → execute the
search_repositoriestool to find repositories where modelcontextprotocol mentioned. - "What is the 739 issue on modelcontextprotocol servers repo" → execute the
get_issuetool to find 739 issue from modelcontextprotocol servers repo. - "What is the 717 PR on modelcontextprotocol servers repo" → execute the
get_pull_requesttool to find 717 PR from modelcontextprotocol servers repo.
Development
- Install dependencies:
pnpm install
- Configure Github Access token in
.env:
GITHUB_PERSONAL_ACCESS_TOKEN=<your_personal_github_access_token>
- Run locally with watch:
pnpm dev
- Build the server:
pnpm build
- Local debugging with inspector:
pnpm inspector
Related Servers
Feather Code MCP
A portable MCP server for performing various GitHub operations on any repository.
AtomGit
An MCP server for interacting with the AtomGit API for version control and code hosting.
Gitea MCP Server
A server for seamless integration with self-hosted Gitea platforms, allowing management of repositories and other resources.
GitHub MCP Server
Seamlessly integrate with GitHub APIs for development automation and interaction.
MCP Perforce Server
A server for Perforce (P4) version control operations, wrapping P4 commands for easier and more reliable use.
GitHub MCP Server
Integrates with the GitHub API for automation and interaction with repositories.
GitHub Pages MCP Server
Hello! This is a GitHub MCP server designed to enable MCP-compatible LLMs, such as Claude, to communicate with the server and interact with the GitHub API to manage GitHub Pages deployments.
GitKraken
A CLI for interacting with GitKraken APIs. Includes an MCP server via `gk mcp` that not only wraps GitKraken APIs, but also Jira, GitHub, GitLab, and more.
GitHub Mapper
Provides tools for mapping and analyzing GitHub repositories using a Personal Access Token for authentication.
Git MCP Server
An MCP server for performing Git operations.