GitHub MCP Server
An MCP server that provides tools for interacting with the GitHub API, enabling AI assistants to query repositories, pull requests, issues, commits, users, and more.
README
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
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-mcp
- Install dependencies:
npm install
- Build the TypeScript code:
npm run build
Configuration
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.js
This will open a web interface where you can test all the tools interactively.
Watch Mode
npm run watch
License
MIT
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.