toktechteam/mcp-github-demo
3.1
If you are the rightful owner of mcp-github-demo and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
A demo MCP server using FastAPI and Docker, integrated with GitHub API for repository data access.
MCP GitHub Demo
A demo MCP (Model Context Protocol) server built with FastAPI and Docker, integrated with the GitHub API to fetch repository data and expose it via an AI-agent-friendly endpoint.
Includes Nginx reverse proxy and Docker Compose setup for easy deployment on local or cloud (like EC2).
📌 Features
- FastAPI-based MCP server
- GitHub API integration (fetches public repos)
- Reverse proxy using Nginx (
/github
endpoint) - Docker & Docker Compose for quick setup
- Ready for AI agent consumption
🛠 Prerequisites
- Docker installed
- Docker Compose installed
- (Optional) GitHub personal access token for private repos
🚀 Setup & Run
# Clone this repo
git clone https://github.com/<your-username>/mcp-github-demo.git
cd mcp-github-demo
# Build and run containers
docker-compose up --build
🔍 Test Endpoints
List Octocat repositories:
http://localhost/github?user=octocat
List your repositories:
http://localhost/github?user=<your_github_username>
Sample Response
{
"service": "MCP-GitHub",
"repos": ["repo1", "repo2", "repo3"]
}
🛑 Stop Services
docker-compose down
📖 How It Works
- FastAPI handles
/
requests and calls GitHub API. - Nginx reverse proxies
/github
requests to the FastAPI container. - AI Agents or other apps call
http://<server>/github?user=username
to get structured JSON.
🔮 Future Scope
- Add more MCP servers (Jira, Y-Finance, etc.)
- Secure endpoints (Auth tokens)
- Deploy to AWS ECS/EKS
🧑💻 Author
Roshan Kumar Singh
📄 License
This project is licensed under the MIT License.