GitHub MCP Server
Provides tools to interact with the GitHub API, including searching repositories and users, retrieving repository information, managing pull requests and issues, viewing commits, comparing branches, reading file contents, and listing releases and branches.
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 ServerSearch for repositories about machine learning"
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
An MCP (Model Context Protocol) server that provides tools for interacting with the GitHub API. This server enables AI assistants to query repositories, pull requests, issues, commits, users, and more.
Features
🔍 Search repositories and users
📦 Get repository information
🔀 List and view pull requests
🐛 List and view issues
📝 View commits and compare branches
👤 Get user information
📄 Read file contents from repositories
🏷️ List releases and branches
Related MCP server: GitHub MCP Agent Server
Prerequisites
Node.js (v18 or higher)
A GitHub Personal Access Token
Installation
Clone this repository:
git clone https://github.com/grysonbaltazar/github-mcp.git
cd github-mcpInstall dependencies:
npm installBuild the TypeScript code:
npm run buildConfiguration
Get a GitHub Token
Go to GitHub Settings → Developer settings → Personal access tokens
Click "Generate new token (classic)"
Give it a name (e.g., "MCP Server")
Select scopes:
repo- Full control of private repositoriesread:user- Read user profile dataread:org- Read org and team membership (optional)
Generate and copy the token
For Claude Desktop
Edit ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"github": {
"command": "node",
"args": ["/path/to/github-mcp/build/index.js"],
"env": {
"GITHUB_TOKEN": "your_github_token_here"
}
}
}
}For Cursor
Edit ~/.cursor/mcp_config.json:
{
"mcpServers": {
"github": {
"command": "node",
"args": ["/path/to/github-mcp/build/index.js"],
"env": {
"GITHUB_TOKEN": "your_github_token_here"
}
}
}
}Usage
Once configured, the MCP server provides the following tools:
get_repository- Get detailed information about a repositorylist_user_repos- List repositories for a user or organizationsearch_repositories- Search for repositories on GitHubget_pull_request- Get details about a specific pull requestlist_pull_requests- List pull requests for a repositoryget_pr_files- Get the list of files changed in a pull requestget_pr_comments- Get review comments on a pull requestget_commit- Get details about a specific commitlist_commits- List commits in a repositorycompare_commits- Compare two commits or branchesget_issue- Get details about a specific issuelist_issues- List issues for a repositoryget_issue_comments- Get comments on an issuelist_branches- List branches in a repositoryget_branch- Get details about a specific branchget_user- Get information about a GitHub usersearch_users- Search for users on GitHubget_file_contents- Get the contents of a file in a repositorylist_releases- List releases for a repositoryget_latest_release- Get the latest release for a repository
Development
Testing with MCP Inspector
npx @modelcontextprotocol/inspector node build/index.jsThis will open a web interface where you can test all the tools interactively.
Watch Mode
npm run watchLicense
MIT
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Related MCP Connectors
An MCP server that gives your AI access to the source code and docs of all public github repos
Driflyte MCP server which lets AI assistants query topic-specific knowledge from web and GitHub.
Create, deploy, and operate MCP servers directly from your GitHub repositories.
An MCP server that integrates with Discord to provide AI-powered features.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceAn MCP server that wraps around the GitHub CLI tool, allowing AI assistants to interact with GitHub repositories through commands for pull requests, issues, and repository operations.9 npmMIT
- AlicenseBqualityCmaintenanceMCP server that exposes GitHub operations as tools for AI agents, enabling code search, issue management, and PR review.12MIT
- AlicenseNot gradedqualityBmaintenanceAn MCP server that enables GitHub API operations such as managing repositories, issues, and pull requests through natural language.256 npmISC
- AlicenseAqualityBmaintenanceMCP server that enables AI assistants to look up and analyze GitHub repositories, including stars, forks, description, open issues, and README content.244 npmMIT