mcp-udacity-commit 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Muzaffar Qosimov
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,18 +1,17 @@
1
1
  # mcp-udacity-commit
2
2
 
3
+ [![npm version](https://img.shields.io/npm/v/mcp-udacity-commit)](https://www.npmjs.com/package/mcp-udacity-commit)
4
+ [![npm downloads](https://img.shields.io/npm/dm/mcp-udacity-commit)](https://www.npmjs.com/package/mcp-udacity-commit)
5
+ [![License: MIT](https://img.shields.io/npm/l/mcp-udacity-commit)](./LICENSE)
6
+ [![MCP](https://img.shields.io/badge/MCP-server-blue)](https://modelcontextprotocol.io)
7
+
3
8
  An [MCP](https://modelcontextprotocol.io) server that validates and formats git
4
9
  commit messages according to the
5
10
  [Udacity Git Commit Message Style Guide](https://udacity.github.io/git-styleguide/).
6
11
 
7
- ## What it exposes
8
-
9
- | Primitive | Name | Purpose |
10
- | --- | --- | --- |
11
- | Resource | `udacity://commit-styleguide` | The style-guide rules, as markdown |
12
- | Tool | `validate_commit_message` | Checks a message against every rule (type, ≤50-char subject, capitalization, no trailing period, blank line, ≤72-char body wrap) |
13
- | Tool | `format_commit_message` | Builds a compliant message from `type` + `subject` + optional `body`/`footer` |
12
+ ## Install
14
13
 
15
- ## Install (published package)
14
+ One line paste it into your terminal:
16
15
 
17
16
  ```bash
18
17
  claude mcp add udacity-commit -- npx -y mcp-udacity-commit
@@ -31,7 +30,8 @@ For Claude Desktop, add to `claude_desktop_config.json`:
31
30
  }
32
31
  ```
33
32
 
34
- ## Install from source
33
+ <details>
34
+ <summary>Install from source</summary>
35
35
 
36
36
  ```bash
37
37
  git clone https://github.com/qwertymuzaffar/mcp-udacity-commit
@@ -41,6 +41,43 @@ npm run build
41
41
  claude mcp add udacity-commit -- node "$(pwd)/build/index.js"
42
42
  ```
43
43
 
44
+ </details>
45
+
46
+ ## What it exposes
47
+
48
+ | Primitive | Name | Purpose |
49
+ | --- | --- | --- |
50
+ | Resource | `udacity://commit-styleguide` | The style-guide rules, as markdown |
51
+ | Tool | `validate_commit_message` | Checks a message against every rule (type, ≤50-char subject, capitalization, no trailing period, blank line, ≤72-char body wrap) |
52
+ | Tool | `format_commit_message` | Builds a compliant message from `type` + `subject` + optional `body`/`footer` |
53
+
54
+ ## Example
55
+
56
+ `format_commit_message` turns loose parts into a compliant commit:
57
+
58
+ ```text
59
+ in: type=fix subject="prevent duplicate auth token refresh."
60
+ body="The refresh timer could fire twice under load, minting two tokens…"
61
+ footer="Resolves: #142"
62
+
63
+ out:
64
+ fix: Prevent duplicate auth token refresh
65
+
66
+ The refresh timer could fire twice under load, minting two tokens and
67
+ logging the user out. Serialize refreshes behind a single in-flight
68
+ promise so concurrent callers await the same request.
69
+
70
+ Resolves: #142
71
+ ```
72
+
73
+ `validate_commit_message` flags every violation:
74
+
75
+ ```text
76
+ "Fixed the login bug." → ❌ Not compliant.
77
+ • Subject must follow "type: Subject".
78
+ • Subject must not end with a period.
79
+ ```
80
+
44
81
  ## Develop
45
82
 
46
83
  ```bash
@@ -49,17 +86,6 @@ npm run build # → build/index.js
49
86
  npm run test:client # spawns the server and exercises the tools
50
87
  ```
51
88
 
52
- ## Publish
53
-
54
- ```bash
55
- # 1. npm
56
- npm publish --access public
57
-
58
- # 2. MCP Registry (after npm publish)
59
- mcp-publisher login github
60
- mcp-publisher publish
61
- ```
62
-
63
89
  ## License
64
90
 
65
91
  MIT
package/build/index.js CHANGED
@@ -111,7 +111,7 @@ function validate(message) {
111
111
  }
112
112
  return { valid: problems.length === 0, problems, warnings };
113
113
  }
114
- const server = new McpServer({ name: "udacity-commit", version: "1.0.0" });
114
+ const server = new McpServer({ name: "udacity-commit", version: "1.0.1" });
115
115
  server.registerResource("styleguide", "udacity://commit-styleguide", {
116
116
  title: "Udacity Git Commit Style Guide",
117
117
  description: "The commit-message rules (types, subject, body, footer).",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mcp-udacity-commit",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "MCP server that validates and formats git commit messages per the Udacity Git Commit Message Style Guide.",
5
5
  "type": "module",
6
6
  "license": "MIT",