Home / MCP / Github MCP Server
Provides MCP-based access to GitHub data and actions, enabling repository/issue/commit/code searches and more.
Configuration
View docs{
"mcpServers": {
"github_http": {
"url": "https://example-mcp.github.example/mcp"
}
}
}You can run a GitHub MCP Server to let large language models interact with GitHub data and actions through the Model Context Protocol. It enables searching repositories, issues, commits, code, users, topics, and more, all via a programmable MCP interface.
Use an MCP client to call the available tools and retrieve data from GitHub. You can search for repositories, issues, commits, code, users, topics, and labels; list issues and pull requests; and fetch specific issues or pull requests. Each tool has its own required inputs and optional parameters to refine results. Combine multiple tool calls to build workflows like code research, project triage, or repository discovery.
Prerequisites you need before starting:
• Node.js installed on your system.
• A package manager you are comfortable with (npm, pnpm, or npx).
{
"mcpServers": {
"github": {
"command": "npx",
"args": ["-y", "github-mcp-server"],
"env": {
"GITHUB_PERSONAL_ACCESS_TOKEN": "your_personal_github_access_token"
}
}
}
}Next, configure your MCP client with the above server configuration so that it can communicate with the GitHub MCP Server. The configuration uses the npx command to run the server module and passes the required access token as an environment variable.
Configuration and usage details are provided below to ensure you can operate the GitHub MCP Server securely and efficiently. Follow the steps to start, test, and integrate the server into your workflows.
Search GitHub repositories by a query and paginate results with page and per_page. Optional inputs control how results are ordered and limited.
Search issues across repositories with query, pagination, and sorting options such as order and sort field.
Search commits in a repository by a query with pagination and sorting controls like order and sort field.
Search code within a repository using a query and pagination controls.
Search users on GitHub by a query with pagination and optional sorting by followers, repositories, or joined date.
Search topics across GitHub repositories using a query and pagination.
Search labels within a repository with query, pagination, and optional sort settings.
List issues from a specific repository with filtering options such as labels, milestone, assignee, creator, mentioned, and time range.
Retrieve a specific issue from a repository by owner, repo, and issue number.
List pull requests for a repository with filtering by head/base branch, sort direction, and pagination.
Get details for a specific pull request by owner, repo, and pull request number.