A lightweight Model Context Protocol (MCP) server built with FastMCP to expose and automate GitHub operations using LLM-compatible tools.
- βοΈ GitHub API integration via MCP tools
- π€ LLM-friendly schema for interaction with AI agents
- π Optional authentication support
- π§© Easy to extend with new GitHub operations
This server currently supports the following GitHub features as callable MCP tools:
Tool Name | Description |
---|---|
get_user_bio |
Retrieve bio of a user |
get_github_files |
Recursively fetch all files and directories from a GitHub repo starting at 'path' |
get_file_content |
Fetches the content of a file from a GitHub repository. |
create_pull_request_with_branch |
Creates a new branch and then a pull request on GitHub |
create_github_issue |
Creates an issue on a GitHub repository |
β More tools can be added easily by decorating a Python function with
@mcp.tool()
.
-
Clone the repository:
git clone https://github.com/mymadhavyadav07/Github-MCP-server.git cd Github-MCP-Server
-
Install dependencies:
Using
uv
(recommended for Python 3.11+):uv venv uv pip install -r requirements.txt
-
Configure Github Access Token:
- Create a .env file and copy contents from .env.example to .env
- Replace GITHUB_TOKEN with your own Github Access Token. You can generate one from here
GITHUB_TOKEN = "<GITHUB_TOKEN>"
-
Download and install Claude Desktop - Claude Desktop
-
Install MCP Server in Claude:
- Activate Virtual Environment:
.venv\Scripts\activate
- Now, finally install the MCP Server in Claude:
uv run mcp install main.py
-
Now you are all set to use this custom Github-MCP-Server in your Claude Desktop
FastMCP by @jlowin
GitHub REST API v3
Contributions are welcome!
If you have ideas for new GitHub tools, bug fixes, or improvements, feel free to:
-
Open an issue
-
Fork the repo
-
Submit a PR π
For questions or suggestions, reach out via Twitter or raise an issue.