GitHub MCP Assistant
Provides tools for interacting with GitHub repositories, including fetching recent open issues, retrieving pull request diffs, creating new issues, and adding comments to pull requests.
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 Assistantfetch the latest open issues in microsoft/vscode and summarize them"
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 Assistant
A production-ready Model Context Protocol (MCP) server that gives Claude Desktop read and write access to GitHub repositories.
Built with FastMCP, this local integration allows Claude to analyze code, track issues, inspect pull requests, create issues, and post comments directly to GitHub through natural-language commands.
The server runs locally using stdio, so your GitHub credentials and repository interactions stay on your machine while communicating directly with the GitHub API.
β¨ Features
GitHub MCP Assistant provides the following tools:
Tool | Description |
| Fetches the 5 most recent open issues from a GitHub repository. |
| Retrieves the code diff for a specific Pull Request. Responses are automatically truncated to 5,000 characters. |
| Creates a new GitHub issue with a title and description. |
| Adds a comment to an existing Pull Request. |
What You Can Do
With Claude Desktop connected to this MCP server, you can:
π Analyze GitHub repositories
π Fetch and understand open issues
π Review Pull Request changes
π Create GitHub issues
π¬ Comment on Pull Requests
π€ Perform AI-assisted code reviews
π Ask Claude to summarize repository activity
Related MCP server: GitHub MCP Server
π οΈ Tech Stack
Python 3.10+
FastMCP
Model Context Protocol (MCP)
GitHub API
Claude Desktop
stdio transport
π Prerequisites
Before installing the project, make sure you have:
Python 3.10 or higher
Claude Desktop
A GitHub account
A GitHub Fine-grained Personal Access Token
You can verify your Python installation with:
python --versionπ Installation
1. Install the MCP Server
Install the package directly from GitHub using pip:
pip install git+https://github.com/DivyanshAgarwal7/github-mcp-server.gitAfter installation, the github-assistant command will be available globally.
You can verify the installation with:
github-assistantπ Configuration
To connect the MCP server to Claude Desktop, you need to provide a GitHub Personal Access Token.
2. Generate a GitHub Personal Access Token
Go to:
GitHub β Settings β Developer settings β Personal access tokens β Fine-grained tokens
Create a new token and configure:
Repository Access
Select:
Only select repositories
Then choose the repositories that Claude should be allowed to access.
Repository Permissions
Grant the required permissions for:
Issues β Read and Write
Pull requests β Read and Write
Generate the token and copy it immediately.
β οΈ Security: Never commit your GitHub token to a Git repository or share it publicly.
π₯οΈ Claude Desktop Configuration
3. Locate the Claude Desktop Configuration File
Windows
The standard configuration file is:
%APPDATA%\Claude\claude_desktop_config.jsonFor the Microsoft Store version of Claude Desktop, it may be located at:
%LOCALAPPDATA%\Packages\Claude_pzs8sxrjxfjjc\LocalCache\Roaming\Claude\claude_desktop_config.jsonmacOS
~/Library/Application Support/Claude/claude_desktop_config.json4. Add the MCP Server
Open claude_desktop_config.json and add:
{
"mcpServers": {
"github-assistant": {
"command": "github-assistant",
"args": [],
"env": {
"GITHUB_TOKEN": "YOUR_GITHUB_TOKEN_HERE"
}
}
}
}Replace:
YOUR_GITHUB_TOKEN_HEREwith your actual GitHub Personal Access Token.
Existing MCP Servers
If you already have other MCP servers configured, do not replace the entire file.
Simply add the github-assistant entry inside the existing mcpServers object.
For example:
{
"mcpServers": {
"another-server": {
"command": "another-server"
},
"github-assistant": {
"command": "github-assistant",
"args": [],
"env": {
"GITHUB_TOKEN": "YOUR_GITHUB_TOKEN_HERE"
}
}
}
}π Restart Claude Desktop
After modifying the configuration:
Completely quit Claude Desktop.
Make sure Claude is also closed from the system tray.
Start Claude Desktop again.
Open a new conversation.
Check whether the MCP server/tools are available.
If the server is configured correctly, Claude should be able to access the GitHub MCP tools.
π‘ Usage Examples
Once the MCP server is connected, you can interact with GitHub using natural language.
Get Latest Issues
Use github-assistant to fetch the latest issues in microsoft/vscode and summarize them.Review a Pull Request
Pull the diff for PR #123 in my DivyanshAgarwal7/Demo repository.
What is the core logic change?Create an Issue
Create a new issue in DivyanshAgarwal7/Demo titled
"Update Database Schema"
Write a brief description of the required changes.Comment on a Pull Request
Comment on PR #45 in my repository saying:
"Looks good, but please add unit tests for the new API endpoint."AI-Assisted Code Review
You can also ask Claude to analyze a Pull Request and provide feedback:
Review PR #25 in my repository.
Check for:
- Bugs
- Security issues
- Code quality problems
- Missing tests
- Potential performance issuesπ Security & Privacy
GitHub MCP Assistant is designed to run as a local stdio MCP server.
Local Execution
The MCP server runs directly on your computer rather than being hosted on a third-party server.
Direct GitHub API Communication
Your machine communicates directly with the GitHub API.
No Cloud Hosting
The MCP server does not require a separate cloud backend to operate.
Token Handling
Your GitHub Personal Access Token is supplied through the Claude Desktop configuration as an environment variable.
Important: Your
claude_desktop_config.jsoncontains sensitive credentials. Do not upload it to GitHub or share it publicly.
ποΈ How It Works
βββββββββββββββββββββ
β Claude Desktop β
βββββββββββ¬ββββββββββ
β
β MCP / stdio
βΌ
βββββββββββββββββββββ
β GitHub MCP β
β Assistant β
β β
β FastMCP Server β
βββββββββββ¬ββββββββββ
β
β GitHub API
βΌ
βββββββββββββββββββββ
β GitHub β
β β
β Repositories β
β Issues β
β Pull Requests β
βββββββββββββββββββββClaude sends MCP tool requests to the local server.
The server then communicates with GitHub using the configured GitHub token and returns the results to Claude.
π Project Structure
github-mcp-server/
β
βββ src/
β βββ ...
β
βββ README.md
βββ pyproject.tomlπ§ͺ Troubleshooting
MCP Server Is Not Appearing in Claude
Check the following:
Verify that
github-assistantis installed.Run:
github-assistantVerify that your GitHub token is correct.
Check the Claude Desktop configuration file for JSON syntax errors.
Completely restart Claude Desktop.
Make sure the
commandvalue matches the installed executable.
GitHub API Authentication Fails
Verify that:
Your token has not expired.
The token has access to the requested repository.
Issues and Pull Requests have the required permissions.
The token is correctly placed in the configuration.
Example:
"env": {
"GITHUB_TOKEN": "github_pat_xxxxxxxxxxxxx"
}Claude Cannot Access a Repository
For fine-grained GitHub tokens, make sure the repository is included under:
Repository access
β Only select repositoriesThen verify that the required repository permissions have been granted.
π€ Contributing
Contributions are welcome!
To contribute:
Fork the repository.
Clone your fork.
git clone https://github.com/DivyanshAgarwal7/github-mcp-server.gitCreate a new branch.
git checkout -b feature/your-featureMake your changes.
Test the changes locally.
Commit your changes.
git add .
git commit -m "Add your feature"Push your branch.
git push origin feature/your-featureOpen a Pull Request.
π License
This project is licensed under the MIT License.
π¨βπ» Author
Divyansh Agarwal
GitHub:
https://github.com/DivyanshAgarwal7
β Support
If you find this project useful, consider giving the repository a β on GitHub.
If you encounter a bug or have a feature request, open an Issue in the repository.
This server cannot be deployed
Maintenance
Related MCP Connectors
Connect AI assistants to GitHub - manage repos, issues, PRs, and workflows through natural language.
Access the GitHub API, enabling file operations, repository management, search functionality, andβ¦
Connect AI assistants to your GitHub-hosted Obsidian vault to seamlessly access, search, and analyβ¦
Code intelligence for LLMs. Analyze, search, and retrieve code from any public git repository.
Related MCP Servers
- AlicenseNot gradedqualityNot gradedmaintenanceConnects Claude Desktop to GitHub repositories, enabling users to perform git operations and GitHub API interactions through natural conversation.442 npm-
- AlicenseNot gradedqualityNot gradedmaintenanceConnects Claude Desktop directly to GitHub repositories and git commands, enabling users to clone repos, check status, commit changes, push code, create repositories, and manage GitHub resources through natural conversation.442 npm-
- FlicenseAqualityDmaintenanceConnects Claude to GitHub, enabling listing repositories, browsing open pull requests, and inspecting PR diffs for code review.4-
- FlicenseNot gradedqualityDmaintenanceEnables Claude to query GitHub repositories in plain English, fetching recent activity, release notes, issue triage, and health summaries via the GitHub API.-