Spaces:
Running
A newer version of the Gradio SDK is available:
6.2.0
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 |
| Pranjal Prakash | @pranjal00 |
| Karan Singh | @karansingh99 |
| Shriprasasd Patil | @Shriprasad-P |
| Bharath Nuthalapati | @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_repogithub.list_reposgithub.create_issuegithub.list_issuesgithub.commit_filegithub.read_filegithub.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
- A Hugging Face account
- A GitHub Personal Access Token (PAT) with repo permissions
- A Google Gemini API Key
- 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:
Clone the repository
git clone <your-space-url> cd HF-ProInstall dependencies
pip install -r requirements.txtSet environment variables
# Windows (PowerShell) $env:GITHUB_TOKEN="your_github_token" $env:GEMINI_API_KEY="your_gemini_key" $env:ELEVENLABS_API_KEY="your_elevenlabs_key"Run the application
python app.pyOpen in browser
- Navigate to
http://localhost:7860
- Navigate to
๐ License
MIT License - feel free to use this code for your own projects.