Skip to main content
Glama
MCP GitHub Issue Priority Server

MCP GitHub Issue Priority Server

by steiner385

MCP GitHub Issue Priority Server

AIアシスタントが決定論的な優先順位スコアリングと同時実行セーフな選択機能を使用してGitHub Issueを管理できるようにするModel Context Protocol (MCP) サーバーです。

クイックスタート

# 1. Install from npm (recommended)
npm install -g mcp-git-issue-priority

# 2. Authenticate (if not already using GitHub CLI)
gh auth login

# 3. Add to Claude Code (~/.claude.json)
{
  "mcpServers": {
    "github-issue-priority": {
      "command": "mcp-git-issue-priority"
    }
  }
}
# 4. Restart Claude Code and verify
# The MCP tools should appear when you run /mcp

Related MCP server: Project Manager MCP

機能

  • 優先順位に基づくIssue選択: 決定論的なスコアリングアルゴリズムにより、セッション間で一貫したIssueの優先順位付けを保証

  • 同時実行セーフなロック: ファイルベースの原子的なロックにより、複数のAIセッションが同じIssueを選択することを防止

  • ガイド付きワークフロー: 8段階のワークフロー(選択 → 調査 → ブランチ作成 → 実装 → テスト → コミット → PR作成 → レビュー)と遷移の検証

  • 自動ラベル付け: 優先度(P0-P3)、タイプ(bug, feature, chore, docs)、ステータスのラベルを作成・管理

  • スタックロック検出: 停止したプロセスによるロックを自動的に検出し、クリーンアップ

  • 監査ログ: すべての操作をJSON Lines形式で記録し、30日間保持

インストール

前提条件

  • Node.js 20+ - ダウンロード

  • GitHub CLI (推奨) - インストール後、gh auth loginを実行

    • または: repoスコープを持つGitHubパーソナルアクセストークン

npmからインストール (推奨)

npm install -g mcp-git-issue-priority

特定のバージョンをインストール

npm install -g mcp-git-issue-priority@1.0.0

ソースからインストール

git clone https://github.com/steiner385/mcp-git-issue-priority.git
cd mcp-git-issue-priority
npm install && npm link

トラブルシューティング

問題

解決策

command not found: mcp-git-issue-priority

npmのグローバルbinがPATHに含まれているか確認してください: npm bin -g

GitHub authentication required

gh auth loginを実行するか、GITHUB_TOKENを設定してください

インストール中にビルドエラーが発生

Node.js 20+がインストールされているか確認してください: node --version

設定

GitHub認証

サーバーは2つの認証方法をサポートしています。

推奨: GitHub CLI (自動)

GitHub CLIがインストールされ、認証されている場合、サーバーは自動的にトークンを取得します。

# One-time setup
gh auth login

これが推奨される方法であり、手動でのトークン管理は不要です。

代替: 環境変数

repoスコープを持つパーソナルアクセストークンを使用してGITHUB_TOKENを設定します。

export GITHUB_TOKEN="ghp_your_personal_access_token"

または、MCP設定(下記参照)で構成します。

Claude Codeの設定

~/.claude.json (グローバル) または .claude/settings.json (プロジェクト) に追加します。

{
  "mcpServers": {
    "github-issue-priority": {
      "command": "mcp-git-issue-priority"
    }
  }
}

GitHub CLIの代わりにパーソナルアクセストークンを使用する場合: 設定にトークンを追加してください。

{
  "mcpServers": {
    "github-issue-priority": {
      "command": "mcp-git-issue-priority",
      "env": {
        "GITHUB_TOKEN": "ghp_your_personal_access_token"
      }
    }
  }
}

インストールの確認

Claude Codeを再起動した後:

  1. /mcpを実行して、利用可能なMCPサーバーを確認

  2. github-issue-priorityサーバーが13個のツールと共にリストされているはずです

  3. 任意のレポジトリでlist_backlogを実行し、動作を確認してください

利用可能なツール

create_issue

必須の優先度およびタイプラベルを指定して、新しいGitHub Issueを作成します。

Arguments:
  - title (required): Issue title
  - body (optional): Issue description
  - priority (required): P0 (critical) | P1 (high) | P2 (medium) | P3 (low)
  - type (required): bug | feature | chore | docs
  - repository (required): "owner/repo" format

select_next_issue

バックログから最も優先度の高いIssueを選択してロックします。決定論的なスコアリングを使用して一貫した選択を保証します。

Arguments:
  - repository (required): "owner/repo" format
  - type (optional): Filter by issue type
  - maxPriority (optional): Only consider issues at or above this priority

list_backlog

ロックを取得せずに、優先順位順にすべてのオープンなIssueをリスト表示します(読み取り専用)。

Arguments:
  - repository (required): "owner/repo" format
  - type (optional): Filter by issue type
  - limit (optional): Maximum issues to return (default: 20)

advance_workflow

ロックされたIssueのワークフローを次のフェーズに進めます。

Arguments:
  - issueNumber (required): Issue number to advance
  - targetPhase (required): research | branch | implementation | testing | commit | pr | review
  - repository (required): "owner/repo" format
  - testsPassed (optional): Required when advancing to 'commit' phase
  - prTitle (optional): Required for 'pr' phase
  - prBody (optional): Required for 'pr' phase
  - skipJustification (optional): Required if skipping phases

get_workflow_status

ロックされたIssueの現在のワークフロー状況を取得します。

Arguments:
  - issueNumber (optional): Specific issue number
  - repository (optional): "owner/repo" format

release_lock

Issueのロックを解除します(完了、中断、またはマージ時)。

Arguments:
  - issueNumber (required): Issue number
  - reason (required): completed | abandoned | merged
  - repository (required): "owner/repo" format

force_claim

別のセッションによってロックされているIssueを強制的に取得します(確認が必要)。

Arguments:
  - issueNumber (required): Issue number to claim
  - confirmation (required): Must be exactly "I understand this may cause conflicts"
  - repository (required): "owner/repo" format

sync_backlog_labels

必要な優先度/タイプ/ステータスのラベルが欠落しているIssueを検出し、必要に応じて修正します。

Arguments:
  - repository (required): "owner/repo" format
  - mode (optional): "report" (default) to list issues, "update" to apply labels
  - defaultPriority (optional): P0 | P1 | P2 | P3 (defaults to P2)
  - defaultType (optional): bug | feature | chore | docs (defaults to feature)

レポートモードでは、ラベルが欠落しているすべてのIssueのリストと、何が欠落しているかの詳細を返します。

更新モードでは、Issueにデフォルトラベルを適用します:

  • 優先度が欠落 → priority:P2 (または指定されたデフォルト)

  • タイプが欠落 → type:feature (または指定されたデフォルト)

  • ステータスが欠落 → status:backlog

get_pr_status

プルリクエストのCIステータス、承認状態、マージ状態を確認します。

Arguments:
  - repository (required): "owner/repo" format
  - prNumber (required): Pull request number to check

bulk_update_issues

複数のIssueに対して、ラベルの追加/削除、およびクローズ/再オープンを一括で行います。

Arguments:
  - repository (required): "owner/repo" format
  - issues (required): Array of issue numbers (1-50)
  - addLabels (optional): Labels to add
  - removeLabels (optional): Labels to remove
  - state (optional): "open" | "closed"

implement_batch

優先順位順にN個のIssueのバッチ実装を開始します。実装する最初のIssueを返します。

Arguments:
  - repository (required): "owner/repo" format
  - count (required): Number of issues to implement (1-10)
  - includeTypes (optional): Only include these issue types
  - excludeTypes (optional): Exclude these issue types
  - maxPriority (optional): Only P0, P1, etc.

batch_continue

バッチ実装を継続します。PRのマージをポーリングし、次のIssueまたは完了を返します。

Arguments:
  - batchId (required): Batch ID from implement_batch
  - prNumber (optional): PR number for current issue

get_workflow_analytics

時間ベースのワークフロー分析(サイクルタイム、フェーズの内訳、エージングレポート)を取得します。

Arguments:
  - repository (required): "owner/repo" format
  - period (optional): "7d" | "30d" | "90d" | "all" (default: 30d)

優先順位スコアリングアルゴリズム

Issueは決定論的な式を使用してスコアリングされます:

score = (basePoints + ageBonus) * blockingMultiplier * blockedPenalty
  • 基本ポイント: P0=1000, P1=100, P2=10, P3=1

  • 経過ボーナス: 作成からの経過日数につき+1ポイント(最大365)

  • ブロック乗数: "blocking"ラベルが付いたIssueは1.5倍

  • ブロックペナルティ: オープンな親IssueによってブロックされているIssueは0.1倍(GitHubのサブIssue機能経由)

  • タイブレーカー: 作成日時が早い方が優先(FIFO)

依存関係の検出

オープンな親Issueを持つIssue(GitHubのサブIssue機能を使用)は、0.1倍のペナルティで自動的に優先度が下げられます。これにより、依存関係が解決されるまで、ブロックされた作業はバックログの最下位に沈みます。親Issueがクローズされると、子Issueの優先度は通常に戻ります。

ワークフローフェーズ

  1. selection: Issueが選択され、ロックされる

  2. research: 問題の理解

  3. branch: フィーチャーブランチの作成

  4. implementation: コード変更の進行中

  5. testing: テストと検証の実行

  6. commit: 変更のコミット

  7. pr: プルリクエストの作成

  8. review: レビュー/マージ待ち

データストレージ

すべてのデータはローカルの ~/.mcp-git-issue-priority/ に保存されます:

~/.mcp-git-issue-priority/
├── locks/          # Active lock files (.lockdata)
├── workflow/       # Workflow state files (.json)
└── logs/           # Audit logs (JSON Lines format)

開発

ビルド

npm run build

テスト

npm test

リント

npm run lint

型チェック

npm run typecheck

リリース (メンテナ向け)

初回セットアップ

  1. https://www.npmjs.com/ でnpmアカウントを作成

  2. https://www.npmjs.com/settings/tokens にアクセス

  3. "Publish"権限を持つ"Automation"トークンを作成

  4. GitHubに追加: Settings → Secrets → Actions → NPM_TOKEN という名前の新しいシークレットを作成

リリースの作成

# Patch release (bug fixes): 1.0.0 → 1.0.1
npm version patch -m "Release v%s"
git push && git push --tags

# Minor release (new features): 1.0.0 → 1.1.0
npm version minor -m "Release v%s"
git push && git push --tags

# Major release (breaking changes): 1.0.0 → 2.0.0
npm version major -m "Release v%s"
git push && git push --tags

タグをプッシュするとリリースワークフローがトリガーされ、以下が実行されます:

  • リント、ビルド、テストの実行

  • tarballを添付したGitHubリリースの作成

  • npmレジストリへの公開

ダウンロード追跡

ライセンス

MITライセンス - 詳細は LICENSE を参照してください。

貢献

貢献を歓迎します!ガイドラインについては CONTRIBUTING.md を参照してください。

フィードバックとサポート

皆様からのご意見をお待ちしております!フィードバックは、このツールをすべての人にとってより良いものにするために役立ちます。

  • 質問やアイデア? ディスカッション を開始してください

  • バグを見つけましたか? Issueを作成 してください

  • 機能リクエスト? タイトルに [Feature] を含めて Issueを作成 してください

  • 簡単なフィードバック? mcp-git-issue-priority --feedback を実行してフィードバックページを開いてください

新しいIssueを作成する前に、既存のIssueを確認してください。

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • -
      license
      B
      quality
      Not graded
      maintenance
      Enables AI-driven orchestration of GitHub development workflows including automated issue analysis, code generation, code review, and PR creation through multiple specialized agents. Integrates with GitHub Actions to automate the complete development process from issue to pull request.
      7
      -
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables multiple AI coding agents to collaborate on the same Git repository without conflicts through isolated worktrees, file locking, automated test verification, and a serialized merge queue.
      8
      MIT
    • A
      license
      Not graded
      quality
      A
      maintenance
      Enables deterministic GitHub issue and pull request delivery workflows, including issue creation, development, verification, PR publication, review, and merge, with strict configuration and admission controls.
      198 npm
      MIT