{
  "markdown": "# mcp-udacity-commit\n\n[![npm version](https://img.shields.io/npm/v/mcp-udacity-commit)](https://www.npmjs.com/package/mcp-udacity-commit)\n[![npm downloads](https://img.shields.io/npm/dm/mcp-udacity-commit)](https://www.npmjs.com/package/mcp-udacity-commit)\n[![License: MIT](https://img.shields.io/npm/l/mcp-udacity-commit)](./LICENSE)\n[![MCP](https://img.shields.io/badge/MCP-server-blue)](https://modelcontextprotocol.io)\n\nAn [MCP](https://modelcontextprotocol.io) server that validates and formats git\ncommit messages according to the\n[Udacity Git Commit Message Style Guide](https://udacity.github.io/git-styleguide/).\n\n## Install\n\nOne line — paste it into your terminal:\n\n```bash\nclaude mcp add udacity-commit -- npx -y mcp-udacity-commit\n```\n\nFor Claude Desktop, add to `claude_desktop_config.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"udacity-commit\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"mcp-udacity-commit\"]\n    }\n  }\n}\n```\n\n<details>\n<summary>Install from source</summary>\n\n```bash\ngit clone https://github.com/qwertymuzaffar/mcp-udacity-commit\ncd mcp-udacity-commit\nnpm install\nnpm run build\nclaude mcp add udacity-commit -- node \"$(pwd)/build/index.js\"\n```\n\n</details>\n\n## What it exposes\n\n| Primitive | Name | Purpose |\n| --- | --- | --- |\n| Resource | `udacity://commit-styleguide` | The style-guide rules, as markdown |\n| Resource | `udacity://branch-naming` | The companion `type/kebab-case` branch-naming rules, as markdown |\n| Tool | `validate_commit_message` | Checks a message against every rule (type, ≤50-char subject, capitalization, no trailing period, blank line, ≤72-char body wrap) |\n| Tool | `format_commit_message` | Builds a compliant message from `type` + `subject` + optional `body`/`footer` |\n| Tool | `validate_branch_name` | Checks a branch name against the companion `type/kebab-case` convention (e.g. `feat/add-dark-mode`); `release/*` is a typed branch with a version-style description (`release/1.2.0`), and base branches like `main` are exempt |\n\n## Example\n\n`format_commit_message` turns loose parts into a compliant commit:\n\n```text\nin:  type=fix  subject=\"prevent duplicate auth token refresh.\"\n     body=\"The refresh timer could fire twice under load, minting two tokens…\"\n     footer=\"Resolves: #142\"\n\nout:\nfix: Prevent duplicate auth token refresh\n\nThe refresh timer could fire twice under load, minting two tokens and\nlogging the user out. Serialize refreshes behind a single in-flight\npromise so concurrent callers await the same request.\n\nResolves: #142\n```\n\n`validate_commit_message` flags every violation:\n\n```text\n\"Fixed the login bug.\"  →  ❌ Not compliant.\n  • Subject must follow \"type: Subject\".\n  • Subject must not end with a period.\n```\n\n`validate_branch_name` enforces the companion `type/kebab-case` convention:\n\n```text\n\"feat/add-dark-mode\"     →  ✅ Compliant branch name.\n\"release/1.2.0\"          →  ✅ Compliant branch name.\n\"Feature/Add_Dark_Mode\"  →  ❌ Not compliant.\n  • Unknown type \"Feature\". Use one of: feat, fix, docs, style, refactor, test, chore, release.\n  • Description must be lowercase kebab-case. Got: \"Add_Dark_Mode\".\n\"main\"                   →  ✅ (base branch — feature-branch rules don't apply)\n```\n\n## Develop\n\n```bash\nnpm install\nnpm run build          # → build/index.js\nnpm run test:client    # spawns the server and exercises the tools\n```\n\n## License\n\nMIT\n",
  "bytes": 3350,
  "sha": "d94baf5bf2377c6934d52ea271da9fbc439f4f481a0e08a8ce879b6af710fefa",
  "repo_slug": "qwertymuzaffar/mcp-udacity-commit",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_qwertymuzaffar_udacity_commit_3b74c3f4/readme"
}