mustafaalkan64/GithubMCPDemo
If you are the rightful owner of GithubMCPDemo 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.
The Github MCP Demo is a sample implementation of a Model Context Protocol (MCP) server for GitHub, integrating with OpenAI to enable natural-language interactions with GitHub repositories.
Github MCP AI Integration and AI Agent
Github MCP Demo is a sample implementation of a Model Context Protocol (MCP) server for GitHub that integrates with OpenAI to enable natural-language interactions with GitHub repositories.
It demonstrates how to use MCP to bridge GitHub data (commits, pull requests, issues, repository content) with chat-based AI completion.
π Features
- MCP Server for GitHub β fetch repository data via MCP requests.
- Chat Completion with OpenAI β query and interact with GitHub data conversationally.
- Example Tools β list repositories, retrieve commits, read file contents, etc.
- Configurable β easily point the MCP server to different GitHub repos and models.
- Docker Support β run locally or in a container.
π Project Structure
GithubMCPDemo/
βββ GithubMCPDemo.csproj # Project file
βββ Program.cs # Entry point
βββ Services/ # MCP server logic
βββ Models/ # Data models for GitHub responses
βββ Dockerfile # Docker build instructions
βββ README.md # This file
π οΈ Requirements
- .NET 9 SDK
- GitHub Personal Access Token
- OpenAI API key
Demo
βοΈ Setup
1οΈβ£ Clone the Repository git clone https://github.com/mustafaalkan64/GithubMCPDemo.git cd GithubMCPDemo
2οΈβ£ Configure Environment Variables Create a .env file or export these variables: GITHUB_TOKEN=your_github_token OPENAI_API_KEY=your_openai_api_key
3οΈβ£ Run Locally dotnet restore dotnet run
4οΈβ£ Run with Docker
docker build -t github-mcp-demo .
docker run -e GITHUB_TOKEN=your_github_token
-e OPENAI_API_KEY=your_openai_api_key
-p 5000:5000 github-mcp-demo
π¬ Example Chat Queries
Once running, you can interact with the MCP server through your OpenAI client:
π§© How It Works MCP Server handles requests to GitHubβs REST API.
OpenAI processes natural language queries and translates them into MCP commands.
Responses are fed back to the user with context-aware explanations or summaries.
π License This project is licensed under the MIT License.
π€ Contributing Contributions, issues, and feature requests are welcome!