devflow-mcp
A production-ready MCP server that provides AI assistants with comprehensive GitHub developer tooling including PR analysis, code review, changelog generation, dependency auditing, commit summarization, and refactoring suggestions.
README
devflow-mcp
A production-ready Model Context Protocol server that gives AI assistants deep GitHub developer tooling — PR analysis, code review, changelog generation, dependency auditing, commit summarization, and refactoring suggestions.
Features
- 6 MCP tools covering the full developer workflow
- Heuristic analysis — no external LLM calls, fast and deterministic
- OSV.dev integration for real vulnerability data (npm and PyPI)
- LRU cache with TTL to minimize GitHub API calls
- Token-bucket rate limiter to stay within GitHub's limits
- Zero
any— strict TypeScript throughout - ≥80% test coverage with MSW-mocked HTTP
Requirements
- Node.js 18+
- A GitHub Personal Access Token with
reposcope
Installation
npm install -g devflow-mcp
Or run directly with npx:
npx devflow-mcp
Or clone and build:
git clone https://github.com/yourorg/devflow-mcp
cd devflow-mcp
npm install
npm run build
Claude Desktop Configuration
Add to your claude_desktop_config.json:
{
"mcpServers": {
"devflow": {
"command": "npx",
"args": ["devflow-mcp"],
"env": {
"GITHUB_TOKEN": "ghp_your_token_here"
}
}
}
}
Config file locations:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
Tools
analyze_pr
Analyzes a GitHub pull request for risk, security findings, and merge readiness.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
owner |
string | yes | Repository owner |
repo |
string | yes | Repository name |
pr_number |
number | yes | Pull request number |
focus |
string[] | no | Limit analysis to: security, performance, logic, style |
Returns: risk_score (0-100), risk_level, findings[], change_summary, merge_recommendation
review_code
Reviews a code snippet for quality, security issues, and improvement opportunities.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
code |
string | yes | Source code to review |
language |
string | yes | Programming language |
context |
string | no | Optional context about what the code does |
Returns: overall_score (1-10), issues[] with severity + fix suggestions, positive_observations[], refactor_priority
generate_changelog
Generates a changelog between two Git refs from commit history.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
owner |
string | yes | Repository owner |
repo |
string | yes | Repository name |
from_ref |
string | yes | Base ref (tag, SHA, branch) |
to_ref |
string | yes | Target ref |
format |
string | no | markdown (default), json, plain |
group_by |
string | no | type (default), author, date |
include_authors |
boolean | no | Include author names (default: true) |
Returns: changelog string, commit_count, stats per category, breaking_changes[]
audit_dependencies
Audits project dependencies against the OSV vulnerability database.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
owner |
string | yes | Repository owner |
repo |
string | yes | Repository name |
ecosystem |
string | yes | npm, pypi, or auto |
severity_threshold |
string | no | Minimum severity to report: low (default), moderate, high, critical |
Returns: vulnerabilities[] with CVE IDs, fix versions, and fix commands; audit_passed, stats per severity level, osv_query_timestamp
summarize_commits
Summarizes recent commits on a branch into a human-readable digest.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
owner |
string | yes | Repository owner |
repo |
string | yes | Repository name |
branch |
string | no | Branch name (default: repo default) |
since |
string | no | ISO date or relative (7d, 24h, 2w, 1m) |
limit |
number | no | Max commits (default: 50) |
output_style |
string | no | digest (default), standup, detailed |
Returns: summary string, categories (features/fixes/docs/refactors/chores/other), authors[], commit_count
suggest_refactor
Analyzes code for refactoring opportunities ranked by impact-to-effort ratio.
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
code |
string | yes | Source code to analyze |
language |
string | yes | Programming language |
goals |
string[] | no | Focus areas: readability, performance, testability, maintainability |
Returns: suggestions[] with rationale and effort estimates, priority_order[], original_complexity_score
Development
# Install dependencies
npm install
# Run tests
npm test
# Run tests with coverage
npm run test:coverage
# Type-check and build
npm run build
# Lint
npm run lint
# Format
npm run format
# Start the server (after build)
npm start
Project Structure
src/
index.ts # Entry point
server.ts # MCP server registration
tools/ # Tool handlers (one per tool)
github/ # GitHub API clients
lib/ # Shared utilities
cache.ts # LRU cache with TTL
rate-limiter.ts # Token-bucket rate limiter
commit-parser.ts # Conventional commit parser
diff-parser.ts # Git diff parser
risk-scorer.ts # PR risk scoring heuristics
errors.ts # Typed MCP errors
providers/
osv.ts # OSV.dev vulnerability API
tests/
integration/ # Full MCP server tests via InMemoryTransport
tools/ # Unit tests per tool handler
lib/ # Unit tests for utilities
Test Strategy
- Unit tests: each tool handler and library mocked with
vi.mock - Integration tests: full MCP client↔server round-trip via
InMemoryTransport, HTTP intercepted with MSW - HTTP mocking: MSW v2 (
msw/node) — no real network calls in tests - Coverage: ≥80% branches required (
npm run test:coverage)
Contributing
- Fork the repository
- Create a feature branch
- Add tests for new behavior
- Ensure
npm run build && npm run test:coverage && npm run lintall pass - Open a pull request
License
MIT
推荐服务器
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 模型以安全和受控的方式获取实时的网络信息。