udacity-commit について
udacity-commitは、Udacity Git Commit Message Style Guideに沿ってGitコミットメッセージを検証・整形するMCPサーバーです。関連するブランチ命名規則の検証と、両方の規則をリソースとして提供します。
主な機能
- 01コミットメッセージの検証
- 02規則に沿ったメッセージの整形
- 03ブランチ名の検証
- 04コミット・ブランチ規則の公開
活用シーン
- 01コミット前のメッセージ形式確認
- 02種類と件名からのメッセージ作成
- 03フィーチャーブランチ名の確認
MCP 対応
コミットの検証・整形とブランチ名の検証を行うツールに加え、コミットおよびブランチの規則をリソースとしてMCPクライアントに公開します。
設定
ローカルサーバーの設定はどのクライアントでも共通です。コピーしてクライアントの MCP 設定ファイルに貼り付けてください。
ツール
3掲載時のツール一覧 · 2 週間前に更新
| パラメーター | 型 | 必須 | 説明 |
|---|---|---|---|
| message | string | はい | 確認するコミットメッセージ全体 |
詳細
mcp-udacity-commit
Udacity Git Commit Message Style Guideに従って、git のコミットメッセージを検証し、フォーマットするMCP サーバーです。
インストール
1 行でインストールできます。ターミナルに貼り付けてください。
claude mcp add udacity-commit -- npx -y mcp-udacity-commit
Claude Desktop の場合は、claude_desktop_config.jsonに追加します。
{
"mcpServers": {
"udacity-commit": {
"command": "npx",
"args": ["-y", "mcp-udacity-commit"]
}
}
}
ソースからインストール
git clone https://github.com/qwertymuzaffar/mcp-udacity-commit
cd mcp-udacity-commit
npm install
npm run build
claude mcp add udacity-commit -- node "$(pwd)/build/index.js"
提供する機能
| プリミティブ | 名前 | 目的 |
|---|---|---|
| リソース | udacity://commit-styleguide | スタイルガイドのルールを Markdown 形式で提供します |
| リソース | udacity://branch-naming | 付随する type/kebab-case のブランチ命名規則を Markdown 形式で提供します |
| ツール | validate_commit_message | すべてのルール(type、50 文字以下の件名、大文字と小文字の使い分け、末尾にピリオドを付けない、空行、本文を 72 文字以下で折り返す)に照らしてメッセージを確認します |
| ツール | format_commit_message | type と subject に、任意の body/footer を組み合わせて、規則に準拠したメッセージを作成します |
| ツール | validate_branch_name | 付随する type/kebab-case の規則に照らしてブランチ名を確認します(例:feat/add-dark-mode)。release/* はバージョン形式の説明を伴う型付きブランチです(release/1.2.0)。main のようなベースブランチは対象外です |
例
format_commit_message は、形式が整っていない要素から規則に準拠したコミットを作成します。
in: type=fix subject="prevent duplicate auth token refresh."
body="The refresh timer could fire twice under load, minting two tokens…"
footer="Resolves: #142"
out:
fix: Prevent duplicate auth token refresh
The refresh timer could fire twice under load, minting two tokens and
logging the user out. Serialize refreshes behind a single in-flight
promise so concurrent callers await the same request.
Resolves: #142
validate_commit_message は、すべての違反を指摘します。
"Fixed the login bug." → ❌ Not compliant.
• Subject must follow "type: Subject".
• Subject must not end with a period.
validate_branch_name は、付随する type/kebab-case の規則を適用します。
"feat/add-dark-mode" → ✅ Compliant branch name.
"release/1.2.0" → ✅ Compliant branch name.
"Feature/Add_Dark_Mode" → ❌ Not compliant.
• Unknown type "Feature". Use one of: feat, fix, docs, style, refactor, test, chore, release.
• Description must be lowercase kebab-case. Got: "Add_Dark_Mode".
"main" → ✅ (base branch — feature-branch rules don't apply)
開発
npm install
npm run build # → build/index.js
npm run test:client # spawns the server and exercises the tools
ライセンス
MIT
コメント
Markdown 対応
AI アプリケーションが外部のツールやデータソースに統一的な方法で接続するためのオープンなプロトコルです。クライアントはモデルとの対話を担い、MCP サーバーはツール・リソース・プロンプトテンプレートを提供します。標準メッセージでやり取りするため、1 つのサーバーを複数のクライアントで再利用できます。