π GitHub MCP Server - FastAPI Implementation
Description
# π GitHub MCP Server - FastAPI Implementation ## π Overview This project implements a **Model Context Protocol (MCP) server** using **FastAPI**, enabling AI assistants like Claude to interact with GitHub. The server provides API endpoints to fetch user details, manageβ¦
About
# π GitHub MCP Server - FastAPI Implementation ## π Overview This project implements a **Model Context Protocol (MCP) server** using **FastAPI**, enabling AI assistants like Claude to interact with GitHub. The server provides API endpoints to fetch user details, manage repositories, create issues, and automate GitHubβ¦
Details
- Author
- snehaapratap
- GitHub stars
- 1
- Downloads
- 186
- Categories
- Developer Tools
Jump to
- Fetch GitHub user details and repositories
- Create and manage issues in repositories
- List all issues in a repository
- Star a repository
- AI-powered GitHub Issue Summarization (optional)
- Secure API with GitHub OAuth Token
- Asynchronous FastAPI implementation
Setting up with Highlight
This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:
- Download and install Highlight from highlightai.com/download
- Navigate to the plugins tab and select "Add Custom Plugin"
-
Configure the plugin with the settings below
Plugin Name
π GitHub MCP Server - FastAPI ImplementationCommand (node, npx, python, etc.)Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.
- Enable "Start Automatically" if you want the plugin to start when Highlight launches
From the repository
Clone the repository, create a virtual environment, install dependencies, and set your GITHUB_TOKEN environment variable. Then run uvicorn server:app --reload to start the server on http://127.0.0.1:8000. Use the provided API endpoints via cURL or an AI assistant.
Claude Desktop / Cursor
Paste into your MCP client config file to install this server.
{
"mcpServers": {
"\ud83d\ude80 github mcp server - fastapi implementation": {
"mcp-server-snehaapratap": {
"command": "python3",
"args": [
"-m",
"venv",
"venv"
]
}
}
}
}
McpServers
{
"mcp-server-snehaapratap": {
"command": "python3",
"args": [
"-m",
"venv",
"venv"
]
}
}
π GitHub MCP Server - FastAPI Implementation
π Overview
This project implements a Model Context Protocol (MCP) server using FastAPI, enabling AI assistants like Claude to interact with GitHub. The server provides API endpoints to fetch user details, manage repositories, create issues, and automate GitHub workflows.β¨ Features
- β Fetch GitHub user details and repositories - β Create and manage issues in repositories - β List all issues in a repository - β Star a repository - β AI-powered GitHub Issue Summarization (Optional) - β Secure API with GitHub OAuth Token - β Asynchronous FastAPI implementation---
π οΈ Setup & Installation
1οΈβ£ Clone the Repository
git clone https://github.com/snehaapratap/mcp-server.git
cd mcp-server
2οΈβ£ Create & Activate a Virtual Environment
python3 -m venv venv
source venv/bin/activate
3οΈβ£ Install Dependencies
pip install -r requirements.txt
4οΈβ£ Set Up Environment Variables
Create a.env file in the root directory and add your GitHub Personal Access Token (PAT):
GITHUB_TOKEN=your_personal_access_token
5οΈβ£ Run the FastAPI Server
uvicorn server:app --reload
The server will start on http://127.0.0.1:8000.
---
π₯ API Endpoints
| Method | Endpoint | Description |
|--------|---------|-------------|
| GET | / | Health check for MCP server |
| GET | /github/user | Fetch GitHub user details |
| GET | /github/repos | Get all repositories of the authenticated user |
| POST | /github/create-issue | Create an issue in a repository |
| GET | /github/list-issues | List all issues in a repository |
| PUT | /github/star-repo | Star a repository |
| POST | /github/summarize-issues | AI-powered issue summarization (Optional) |
---
β‘ Usage Examples (cURL)
πΉ Get User Details
curl -X GET "http://127.0.0.1:8000/github/user"
πΉ Fetch Repositories
curl -X GET "http://127.0.0.1:8000/github/repos"
πΉ Create an Issue
curl -X POST "http://127.0.0.1:8000/github/create-issue?owner=your-username&repo=your-repo&title=New%20Issue&body=This%20is%20a%20test%20issue"
πΉ Star a Repository
curl -X PUT "http://127.0.0.1:8000/github/star-repo?owner=your-username&repo=your-repo"
---
π₯ Slides
π View the Slides---
π‘οΈ Error Handling
The API handles errors gracefully and returns meaningful messages:{
"error": "Invalid GitHub Token",
"hint": "Ensure your token has the 'repo' scope."
}
---
π― Future Enhancements
- πΉ Support for pull requests management - πΉ Implement WebSockets for real-time GitHub notifications - πΉ Deploy on AWS/GCP with CI/CD pipeline---
π‘ Contributing
Want to improve this project? Feel free to open a pull request or file an issue!---
π¨βπ» Author
πΉ Sneha P Pratap πΉ GitHub: @snehaapratap πΉ LinkedIn: Sneha Prem Pratap---
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.





