devflow-mcp
AIアシスタントに高度なGitHub開発者ツール(PR分析、コードレビュー、チェンジログ生成、依存関係監査、コミット要約、リファクタリング提案)を提供する、プロダクションレディなModel Context Protocolサーバーです。
特徴
6つのMCPツール:開発ワークフロー全体をカバー
ヒューリスティック分析:外部LLM呼び出しなし、高速かつ決定論的
OSV.dev統合:実際の脆弱性データ(npmおよびPyPI)を利用
LRUキャッシュ:TTL付きでGitHub API呼び出しを最小化
トークンバケットレートリミッター:GitHubの制限内に収めるための制御
Zero
any:TypeScriptで厳密に型定義≥80%のテストカバレッジ:MSWでモックされたHTTPテスト
要件
Node.js 18以上
repoスコープを持つGitHubパーソナルアクセストークン
インストール
npm install -g devflow-mcpまたはnpxで直接実行:
npx devflow-mcpまたはクローンしてビルド:
git clone https://github.com/yourorg/devflow-mcp
cd devflow-mcp
npm install
npm run buildClaude Desktopの設定
claude_desktop_config.jsonに追加してください:
{
"mcpServers": {
"devflow": {
"command": "npx",
"args": ["devflow-mcp"],
"env": {
"GITHUB_TOKEN": "ghp_your_token_here"
}
}
}
}設定ファイルの場所:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.json
ツール
analyze_pr
GitHubのプルリクエストを分析し、リスク、セキュリティ上の懸念、マージの準備状況を評価します。
パラメータ:
名前 | 型 | 必須 | 説明 |
| string | はい | リポジトリの所有者 |
| string | はい | リポジトリ名 |
| number | はい | プルリクエスト番号 |
| string[] | いいえ | 分析対象を制限: |
戻り値: risk_score (0-100), risk_level, findings[], change_summary, merge_recommendation
review_code
コードスニペットをレビューし、品質、セキュリティ上の問題、改善の機会を評価します。
パラメータ:
名前 | 型 | 必須 | 説明 |
| string | はい | レビュー対象のソースコード |
| string | はい | プログラミング言語 |
| string | いいえ | コードの動作に関するオプションのコンテキスト |
戻り値: overall_score (1-10), issues[] (重大度と修正案を含む), positive_observations[], refactor_priority
generate_changelog
コミット履歴から2つのGit参照間のチェンジログを生成します。
パラメータ:
名前 | 型 | 必須 | 説明 |
| string | はい | リポジトリの所有者 |
| string | はい | リポジトリ名 |
| string | はい | ベース参照 (タグ, SHA, ブランチ) |
| string | はい | ターゲット参照 |
| string | いいえ |
|
| string | いいえ |
|
| boolean | いいえ | 作成者名を含める (デフォルト: true) |
戻り値: changelog 文字列, commit_count, カテゴリごとの stats, breaking_changes[]
audit_dependencies
OSV脆弱性データベースに対してプロジェクトの依存関係を監査します。
パラメータ:
名前 | 型 | 必須 | 説明 |
| string | はい | リポジトリの所有者 |
| string | はい | リポジトリ名 |
| string | はい |
|
| string | いいえ | 報告する最小重大度: |
戻り値: vulnerabilities[] (CVE ID、修正バージョン、修正コマンドを含む), audit_passed, 重大度ごとの stats, osv_query_timestamp
summarize_commits
ブランチの最近のコミットを要約し、人間が読める形式のダイジェストを作成します。
パラメータ:
名前 | 型 | 必須 | 説明 |
| string | はい | リポジトリの所有者 |
| string | はい | リポジトリ名 |
| string | いいえ | ブランチ名 (デフォルト: リポジトリのデフォルト) |
| string | いいえ | ISO日付または相対時間 ( |
| number | いいえ | 最大コミット数 (デフォルト: 50) |
| string | いいえ |
|
戻り値: summary 文字列, categories (機能/修正/ドキュメント/リファクタリング/雑務/その他), authors[], commit_count
suggest_refactor
インパクトと労力の比率に基づいて、リファクタリングの機会を分析します。
パラメータ:
名前 | 型 | 必須 | 説明 |
| string | はい | 分析対象のソースコード |
| string | はい | プログラミング言語 |
| string[] | いいえ | 重点項目: |
戻り値: suggestions[] (根拠と労力見積もりを含む), priority_order[], original_complexity_score
開発
# 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プロジェクト構造
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テスト戦略
ユニットテスト: 各ツールハンドラーとライブラリを
vi.mockでモック化統合テスト:
InMemoryTransportを介したMCPクライアントとサーバー間のフルラウンドトリップ、MSWでHTTPをインターセプトHTTPモック: MSW v2 (
msw/node) — テスト中に実際のネットワーク呼び出しは行わないカバレッジ: ≥80%のブランチカバレッジを必須 (
npm run test:coverage)
貢献
リポジトリをフォーク
フィーチャーブランチを作成
新しい動作に対するテストを追加
npm run build && npm run test:coverage && npm run lintがすべてパスすることを確認プルリクエストを作成
ライセンス
MIT
This server cannot be installed
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/boranesn/devflow-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
