GitHub MCP Server
Enables natural language interaction with GitHub through an MCP server. Supports reading repos, issues, and PRs, as well as creating and editing issues with user confirmation.
README
GitHub MCP Project
This is a learning project built in two parts:
- A GitHub MCP server — a program that knows how to talk to GitHub (list your repos, read issues, create issues, and so on).
- An MCP client — a chatbot that connects to that server and lets you ask for things in plain English, like "which of my repos have open issues?" The chatbot figures out on its own which GitHub action to run.
What is MCP?
MCP stands for Model Context Protocol. It's a standard way for an AI chatbot to talk to a separate program that knows how to do things (like call GitHub's API). Instead of teaching the chatbot everything about GitHub directly, we built a small server that knows GitHub, and a client that connects an AI model (in this project, Groq) to that server. The AI decides what to do; the server actually does it.
Think of it like this: the server is a toolbox, and the client is a person who's smart enough to pick the right tool for the job, without you having to tell them exactly which tool to use.
What can it do?
Read things (safe, no confirmation needed):
- List your repositories
- Get details about a specific repository
- List issues on a repository
- Get full details of one issue
- List pull requests on a repository
- Search for issues across all your repositories at once
- Read a repository's README
Change things on GitHub (asks you to confirm first):
- Create a new issue
- Add a comment to an issue
- Close or reopen an issue
- Edit an issue's title/body
- Create a brand-new repository
Other:
- Turn a plain-language bug description into a well-structured GitHub issue draft (title + Steps to Reproduce / Expected Behavior / Actual Behavior)
Anything that actually changes something on GitHub always shows you a confirmation box first and waits for you to click Approve or Decline — nothing happens on your real GitHub account without your say-so.
Project layout
src/
github_mcp/ # Phase 1: the server that knows how to talk to GitHub
server.py # Defines every tool/resource/prompt
github_client.py # Handles GitHub login and shared error handling
mcp_client/ # Phase 2: the chatbot that connects to the server
client.py # Run this for a terminal-based chat
web.py # Run this for a browser-based chat
groq_llm.py # The logic that lets the AI decide what to do
guard.py # Safety check before any "changes something" action runs
.env # Your secret keys (never share this file)
requirements.txt # The list of Python packages this project needs
Setup
- Make sure the virtual environment is set up (it already is, in
.venv). - Add two secret keys to a
.envfile in the project folder:GITHUB_TOKEN=your_github_personal_access_token GROQ_API_KEY=your_groq_api_keyGITHUB_TOKEN: a GitHub personal access token. For it to be able to do everything above (including creating repositories), use a classic token with thereposcope, fromgithub.com/settings/tokens.GROQ_API_KEY: a free API key fromconsole.groq.com— this is what powers the AI's decision-making.
Running it
Option A — Chat in your browser (recommended):
./.venv/Scripts/python.exe src/mcp_client/web.py
Then open http://127.0.0.1:8000 in your browser and start typing questions.
Option B — Chat in the terminal:
./.venv/Scripts/python.exe src/mcp_client/client.py
Type your question when prompted; type exit or quit to stop.
Both options talk to the exact same server and understand the exact same questions — the only difference is where you type and read the conversation.
Example questions to try
- "List my repositories"
- "Which of my repositories have open issues?"
- "What is the [some-repo] repo built with, based on its README?"
- "Create an issue on [owner/repo] titled 'Sample issue' with body 'testing'"
- "Close issue #1 on [owner/repo]"
- "Draft a GitHub issue for this bug: the login button doesn't respond when clicked"
Where to read more
This README covers the basics. The full, detailed step-by-step story of how this project was built — every decision, every bug found and fixed, and why — is recorded in two files:
.claude/agents/doc-writer.md— the server's build history.claude/agents/client-doc-writer.md— the client's build history
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。