An open API service indexing awesome lists of open source software.

https://github.com/mustafaalkan64/githubmcpdemo


https://github.com/mustafaalkan64/githubmcpdemo

github-mcp-server mcp-server open-ai

Last synced: 10 months ago
JSON representation

Awesome Lists containing this project

README

          

# 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](https://dotnet.microsoft.com/en-us/download)
- GitHub **Personal Access Token**
- OpenAI API key

---

## Demo

![Demo](https://github.com/mustafaalkan64/GithubMCPDemo/blob/master/DotnetCoreMCPDemo/SS/8.png)
![Demo](https://github.com/mustafaalkan64/GithubMCPDemo/blob/master/DotnetCoreMCPDemo/SS/1.png)
![Demo](https://github.com/mustafaalkan64/GithubMCPDemo/blob/master/DotnetCoreMCPDemo/SS/3.png)
![Demo](https://github.com/mustafaalkan64/GithubMCPDemo/blob/master/DotnetCoreMCPDemo/SS/5.png)
![Demo](https://github.com/mustafaalkan64/GithubMCPDemo/blob/master/DotnetCoreMCPDemo/SS/6.png)
![Demo](https://github.com/mustafaalkan64/GithubMCPDemo/blob/master/DotnetCoreMCPDemo/SS/7.png)

## βš™οΈ 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!