github-devhub-mcp

github-devhub-mcp

An MCP server that brings GitHub workflow tools (repo, PR, issue, CI) and cost-free LLM-powered engineering tools (PR review, issue triage, commit messages) to any MCP client via the Groq free tier.

Category
访问服务器

README

github-devhub-mcp

A Model Context Protocol server (built on the official Python MCP SDK) that brings GitHub workflow tools and cost-free LLM-powered engineering tools to any MCP client (Claude Desktop, Claude Code, Cursor, …).

Two halves, one server:

  • github.* — read/write tools over the GitHub REST API (typed, rate-limit-aware, paginated).
  • ai.* — LLM tools powered by the Groq free tier (no billing setup): PR review, PR summary, issue summary, issue triage, commit messages, and repo onboarding briefs.

Built to demonstrate MCP SDK integration, third-party API integration, and careful tool design — the three things this project is for.

What it can do

Tool What it does
github.get_repo Repo metadata (stars, language, default branch, archived…)
github.list_repos Paginated, sorted repo list for an owner
github.list_prs PRs filtered by state, with stats
github.get_pr Full PR detail incl. head/base refs
github.ci_status Check runs + combined commit status for a PR or ref
github.code_search Code search across GitHub
github.list_issues Issues filtered by state / labels / sort
github.get_issue Single issue detail
github.create_issue Create an issue (supports dry_run preview)
github.add_issue_comment Comment on an issue/PR thread (supports dry_run)
ai.review_pr Groq-powered code review of a PR diff
ai.summarize_pr Concise "what/why/how/risks" PR summary
ai.summarize_issue Issue + comment-thread summary
ai.triage_issue Classify issue type/priority/labels with reasoning
ai.gen_commit_message Conventional commit message from a PR
ai.explain_repo Onboarding brief from README + file tree
meta.health Connectivity + rate-limit + LLM ping check

Architecture

┌─────────────────────────┐         stdio (Claude Desktop / Code)
│        MCP client       │ ◄────── or streamable HTTP (--http)
└─────────────────────────┘
              │  JSON-RPC (MCPServer)
              ▼
┌────────────────────────────────────────────┐
│  github_devhub (server.py)                 │
│  ┌──────────────┐  ┌──────────────┐  ┌─────┴───┐
│  │ github.*     │  │ ai.*         │  │ meta.*  │
│  │ tools        │  │ tools        │  │ health  │
│  └──────┬───────┘  └──────┬───────┘  └─────────┘
│         ▼                 ▼
│  GithubClient      LLMProvider (Protocol)
│  (httpx,           GroqProvider (free tier)
│   rate-limit,      swap for Ollama / vLLM / any
│   structured       OpenAI-compatible endpoint)
│   errors)
└────────────────────────────────────────────┘

Quickstart

# 1. Python 3.10+; install the package (with dev deps for testing)
python -m pip install -e ".[dev]"

# 2. Configure
cp .env.example .env        # fill in GITHUB_TOKEN and GROQ_API_KEY

# 3. Run — the MCP Inspector is the easiest interactive demo
npx @modelcontextprotocol/inspector python -m github_devhub

# No Node.js installed? Same things work through the Python SDK client:
python scripts/smoke_client.py

Run with a client:

# Claude Desktop — claude_desktop_config.json
{
  "mcpServers": {
    "github-devhub": {
      "command": "python",
      "args": ["-m", "github_devhub"],
      "env": {
        "GITHUB_TOKEN": "ghp_...",
        "GROQ_API_KEY": "gsk_..."
      }
    }
  }
}

Or over HTTP:

python -m github_devhub --http   # streamable HTTP on http://localhost:8787/mcp

Getting the two free keys

  1. GitHub — a classic personal access token (repo scope) or a fine-grained token with read access to contents/pulls/issues. → https://github.com/settings/tokens
  2. Groq — free API key, no card required. → https://console.groq.com/keys

Design decisions (the resume part)

These are deliberate, and each maps to a thing engineering teams screen for:

  1. LLM-actionable errors — every failure carries a stable code, a recoverable flag, and a plain-language remediation hint (errors.py). Tool errors are returned as structured JSON the calling agent can parse and self-correct (e.g. GITHUB_404 → verify the owner/repo and retry; GROQ_429 → back off). Opaque errors are the #1 agent-killer; this server never returns one.
  2. Safety-first tool design — write tools (github.create_issue, github.add_issue_comment) default to a dry_run preview so an agent can show intent before mutating anything. Reads are read-only; page sizes are capped.
  3. Rate-limit awareness — the GitHub client parses x-ratelimit-remaining on every call, surfaces it in results, and converts an exhausted quota into a dedicated recoverable error instead of a generic 403. The health tool reports current headroom.
  4. Provider abstraction — tools depend on an LLMProvider protocol, not on Groq. Groq (free tier) is the default implementation; pointing the same server at a local Ollama or vLLM OpenAI-compatible endpoint is a config change. See llm/provider.py.
  5. Context-budget guard — every prompt is truncated to a configurable char budget before hitting the LLM, so huge diffs can't blow a model's context window (LLM_MAX_INPUT_CHARS).
  6. Protocol-level tests — the test suite drives the server through a real in-process MCP Client, so tool registration, arguments, dry-run behavior, and error serialization are verified over the protocol, not just as unit functions.
  7. Two transports — stdio for local clients, streamable HTTP for remote tools.

Testing

python -m pip install -e ".[dev]"
python -m pytest          # or just: pytest

Try these prompts

List open PRs in octocat/Hello-World, then review PR #1 for me.

Triage issue #5 in octocat/Hello-World and propose labels.

Explain the architecture of facebook/react to a new contributor.

Summarize PR #3 in octocat/Hello-World and draft a commit message for it.

Check health, then show me open issues labeled bug in octocat/Hello-World.

See DEMO.md for a scripted walkthrough.

Resume bullets

  • Built an MCP server on the official Python SDK exposing 17 typed tools across GitHub API integration and LLM-powered analysis, with stdio + streamable HTTP transports.
  • Integrated the Groq free-tier API behind a swappable LLM provider abstraction with config-bounded context budgets.
  • Designed LLM-actionable error protocol (stable codes + recoverable + remediation hints) and dry_run-safe write tools, validated by protocol-level tests over the MCP wire.

Roadmap

  • OAuth device flow instead of a static token
  • Webhook → MCP notifications for live PR/CI events
  • Per-session session pools on the HTTP transport
  • Cached embeddings for repo-wide semantic search

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选