GitNexus / README.md
Viraj77's picture
Update README.md
91f6844 verified
---
title: GitNexus
emoji: ๐Ÿš€
colorFrom: blue
colorTo: purple
sdk: gradio
sdk_version: 6.0.1
app_file: app.py
pinned: false
tags:
- mcp-in-action-track-consumer
---
# ๐Ÿš€ GitNexus
**MCP-Enabled GitHub Automation for AI Agents**
๐Ÿค– Track 2: MCP in Action
tags:
- mcp-in-action-track-consumer
## ๐Ÿ‘ฅ Project Team
| Name | Hugging Face Profile |
|------|----------------------|
| **Viraj Talathi** | [@Viraj77](https://huggingface.co/Viraj77) |
| **Pranjal Prakash** | [@pranjal00](https://huggingface.co/pranjal00) |
| **Karan Singh** | [@karansingh99](https://huggingface.co/karansingh99) |
| **Shriprasasd Patil** | [@Shriprasad-P](https://huggingface.co/Shriprasad-P) |
| **Bharath Nuthalapati** | [@bharath-nuthalapati](https://huggingface.co/bharath-nuthalapati) |
This Hugging Face Space demonstrates GitHub automation using MCP (Model Context Protocol) tools integrated with a Gradio UI. AI agents like Claude, Cursor, and Antigravity can discover and call GitHub functions via MCP, while humans can use the intuitive web interface.
### โ–ถ๏ธYouTube Demo: https://youtu.be/enW1gmE6Xrc
### Huggingface ๐Ÿค—: https://huggingface.co/spaces/Viraj77/GitNexus
### X Post: https://x.com/TalathiViraj/status/1994856982319436242?s=20
### Github Token Generation: https://youtu.be/iLrywUfs7yU?si=s3nQA5DbCb_QFINw
## ๐ŸŽฏ Features
### GitHub Operations
- **Create Repository** - Create new public/private GitHub repositories
- **List Repositories** - View all repositories for the authenticated account
- **Create Issue** - Open issues in any repository
- **List Issues** - View issues filtered by state (open/closed/all)
- **Commit File** - Create or update files in repositories
- **Read File** - Read file contents from repositories
### MCP Tools for AI Agents
The following tools are exposed via MCP for AI agent automation:
- `github.create_repo`
- `github.list_repos`
- `github.create_issue`
- `github.list_issues`
- `github.commit_file`
- `github.read_file`
- `github.generate_docs_with_tts`
## ๐Ÿ”ง Tech Stack
- **Python** - Core language
- **Gradio** - Web UI framework with MCP server support
- **PyGithub** - GitHub API wrapper
- **MCP** - Model Context Protocol for AI agent integration
- **Gemini 2.5 Flash** - AI Code Analysis & Documentation
- **ElevenLabs** - Text-to-Speech Generation
## ๐Ÿ“ฆ Project Structure
```
HF-Pro/
โ”œโ”€โ”€ app.py # Main Gradio application with MCP handlers
โ”œโ”€โ”€ ghclient.py # GitHub API client wrapper
โ”œโ”€โ”€ ai_helper.py # AI Documentation & TTS helper
โ”œโ”€โ”€ requirements.txt # Python dependencies
โ””โ”€โ”€ README.md # This file
```
## ๐Ÿš€ Deployment to Hugging Face Spaces
### Prerequisites
1. A Hugging Face account
2. A GitHub Personal Access Token (PAT) with repo permissions
3. A Google Gemini API Key
4. An ElevenLabs API Key
## ๐ŸŽฎ Usage
### For Humans (Web UI)
The Gradio interface has 3 tabs:
**๐Ÿ“ฆ Repositories Tab**
- Create new repositories with name, privacy setting, and description
- List all repositories for the authenticated account
**๐Ÿ“‹ Issues Tab**
- Create issues in any repository (format: `username/repo`)
- List issues filtered by state (open/closed/all)
**๐Ÿ“„ Custom Files Tab**
- Commit files to repositories (creates or updates)
- Read file contents from repositories
**๐Ÿค– Code Documentation Tab**
- Upload code files for AI analysis
- Generate comprehensive documentation
- Listen to 2-line audio summary
- Commit documentation to GitHub
## ๐Ÿ”’ Security Notes
- **No user authentication required** - The Space uses a server-side GitHub token
- **All repos are public by default** - Anyone can view created repositories
- **Repository name validation** - Input validation prevents malicious repo names
- **Token security** - GitHub token is stored securely in HF Spaces secrets (never in code)
## ๐Ÿ› ๏ธ Local Development
To run locally:
1. **Clone the repository**
```bash
git clone <your-space-url>
cd HF-Pro
```
2. **Install dependencies**
```bash
pip install -r requirements.txt
```
3. **Set environment variables**
```bash
# Windows (PowerShell)
$env:GITHUB_TOKEN="your_github_token"
$env:GEMINI_API_KEY="your_gemini_key"
$env:ELEVENLABS_API_KEY="your_elevenlabs_key"
```
4. **Run the application**
```bash
python app.py
```
5. **Open in browser**
- Navigate to `http://localhost:7860`
## ๐Ÿ“„ License
MIT License - feel free to use this code for your own projects.