home / mcp / github mcp server
Provides an API bridge to GitHub enabling AI tools to read repos, manage issues/PRs, run workflows, and analyze code across your GitHub context.
Configuration
View docs{
"mcpServers": {
"github-github-mcp-server": {
"url": "https://api.githubcopilot.com/mcp/",
"headers": {
"GITHUB_PERSONAL_ACCESS_TOKEN": "<GITHUB_PERSONAL_ACCESS_TOKEN>"
}
}
}
}You can connect AI tools to GitHub to read repositories, analyze code, manage issues and pull requests, monitor workflows, and collaborate more effectively. This MCP Server acts as a bridge between your AI tooling and GitHub, enabling natural language interactions with GitHub data and actions across your authorized repositories.
You use the MCP Server by connecting an MCP host or IDE to the GitHub MCP Server endpoints. Once connected, you can run natural language queries to explore repositories, read files, list issues, trigger workflows, review code, manage pull requests, and surface security alerts. You can enable or disable groups of functionality with toolsets to tailor what your AI tools can do in GitHub.
Prerequisites and installation are described here. You will connect either a remote GitHub MCP Server or run a local MCP server instance and configure it in your MCP host or IDE.
{
"mcp": {
"servers": {
"github": {
"type": "http",
"url": "https://api.githubcopilot.com/mcp/"
}
}
}
}Remote server setup in IDEs like VS Code follows a JSON configuration block that points your host to the remote MCP endpoint. You may also enable an insiders version by using the insiders URL path. For local deployment, you can run the MCP server via Docker or build from source and execute the stdio mode. Ensure you store your GitHub Personal Access Token securely and reference it in your environment or configuration.
// Example: VS Code host configuration for a remote server
{
"servers": {
"github": {
"type": "http",
"url": "https://api.githubcopilot.com/mcp/"
}
}
}To authenticate with GitHub, you will typically use a GitHub Personal Access Token (PAT). Protect this token and avoid committing it to source control. Consider storing it in environment variables or a secrets manager and reference it in your MCP host configuration.
Get details of GitHub Actions resources such as workflows, workflow runs, jobs, and artifacts. Requires repo scope.
List GitHub Actions workflows in a repository with pagination and optional filters.
Get the file tree of a repository with options to filter by path and recursive traversal.
Open a new pull request with specified base, head, and title.
List pull requests for a repository with optional filters for base, head, state, and pagination.
Get details about a pull request, including diff, status, files, reviews, and comments via different read modes.
Retrieve the contents of a file or directory in a repository at a given ref.
Fetch the latest release for a repository.
List branches in a repository with pagination.
Search code across repositories using GitHub code search syntax.
Search repositories with filtering and sorting options.
Create, update, or delete labels in a repository.
List user notifications with filters for time, repository, and pagination.
Get the authenticated user's profile.
Get tag details for a repository.
List issues in a repository with filters for state, labels, and time.
Read issue details, comments, and related data in a repository.
Create a new branch in a repository.
Get commit details with optional diff and stats.
Retrieve file/directory contents at a specific ref.
Get latest release information.
List releases in a repository.
List labels in a repository.
Search users with optional filters and sorting.