@utilix-tech/mcp 0.34.0 → 0.35.0
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/CHANGELOG.md +4 -0
- package/README.md +5 -3
- package/dist/index.js +130 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Full release notes for all Utilix surfaces (browser tools, REST API, SDKs, MCP server) live at [utilix.tech/changelog](https://utilix.tech/changelog). This file tracks just this package.
|
|
4
4
|
|
|
5
|
+
## 0.35.0
|
|
6
|
+
- Add `build_referrer_policy` tool: build a Referrer-Policy header value from one or more policy tokens with a plain-English explanation of each and warnings for risky choices like unsafe-url.
|
|
7
|
+
- Add `generate_markdown_toc` tool: scan a Markdown document's ATX headings and build a nested table of contents with GitHub-style anchor slugs, disambiguating duplicates.
|
|
8
|
+
|
|
5
9
|
## 0.34.0
|
|
6
10
|
- Add `lint_conventional_commit` tool: lint a git commit message against the Conventional Commits v1.0.0 spec, checking header format, blank-line separation, footer tokens, and BREAKING CHANGE casing.
|
|
7
11
|
- Add `calculate_savings_goal` tool: solve for months to reach a savings goal at a fixed monthly contribution, or the monthly contribution required to hit a goal by a target month count.
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @utilix-tech/mcp
|
|
2
2
|
|
|
3
|
-
MCP server exposing
|
|
3
|
+
MCP server exposing 156 developer utility tools to Claude, Cursor, VS Code Copilot, and any [Model Context Protocol](https://modelcontextprotocol.io) compatible AI assistant.
|
|
4
4
|
|
|
5
5
|
No API key required. All tools run locally. Requires Node.js 18 or later.
|
|
6
6
|
|
|
@@ -182,7 +182,7 @@ claude mcp add utilix -- npx -y @utilix-tech/mcp
|
|
|
182
182
|
| `calculate_emi` | Compute the Equated Monthly Installment for a loan from principal, annual rate, and tenure in years or months, with a year-by-year principal/interest breakdown |
|
|
183
183
|
| `calculate_savings_goal` | Solve for months to reach a savings goal at a fixed monthly contribution, or the monthly contribution required to hit a goal by a target month count |
|
|
184
184
|
|
|
185
|
-
### API / Network (
|
|
185
|
+
### API / Network (13 tools)
|
|
186
186
|
| Tool | Description |
|
|
187
187
|
|------|-------------|
|
|
188
188
|
| `decode_jwt` | Decode a JWT: header, payload, and expiry |
|
|
@@ -196,6 +196,7 @@ claude mcp add utilix -- npx -y @utilix-tech/mcp
|
|
|
196
196
|
| `validate_robots_txt` | Validate a robots.txt file: User-agent groups, rules, and directive syntax |
|
|
197
197
|
| `parse_user_agent` | Parse a browser User-Agent string into browser, engine, OS, and device type |
|
|
198
198
|
| `build_cache_control` | Build and explain an HTTP Cache-Control response header from directives (max-age, no-store, immutable, etc.) |
|
|
199
|
+
| `build_referrer_policy` | Build and explain an HTTP Referrer-Policy header from one or more fallback-chain policy tokens |
|
|
199
200
|
| `parse_ipv6_address` | Expand an IPv6 address to its full 8-group form or compress it to its RFC 5952 canonical shortest form, classify its address type, and handle an embedded IPv4 suffix or zone ID |
|
|
200
201
|
|
|
201
202
|
### Color (4 tools)
|
|
@@ -221,7 +222,7 @@ claude mcp add utilix -- npx -y @utilix-tech/mcp
|
|
|
221
222
|
| `detect_redos` | Statically flag catastrophic-backtracking (ReDoS) risk in a regex: nested quantifiers, overlapping alternation, adjacent overlapping quantifiers |
|
|
222
223
|
| `lint_conventional_commit` | Lint a commit message against the Conventional Commits v1.0.0 spec: header format, blank-line separation, footer tokens, and BREAKING CHANGE casing |
|
|
223
224
|
|
|
224
|
-
### Data (
|
|
225
|
+
### Data (8 tools)
|
|
225
226
|
| Tool | Description |
|
|
226
227
|
|------|-------------|
|
|
227
228
|
| `validate_yaml` | Validate YAML syntax |
|
|
@@ -231,6 +232,7 @@ claude mcp add utilix -- npx -y @utilix-tech/mcp
|
|
|
231
232
|
| `format_ndjson` | Validate and pretty-print newline-delimited JSON (NDJSON) |
|
|
232
233
|
| `diff_env_example` | Diff a .env file against its .env.example template: flags keys missing from either side, plus empty placeholder values |
|
|
233
234
|
| `parse_markdown_front_matter` | Split a Markdown document into its YAML front matter fields and body content |
|
|
235
|
+
| `generate_markdown_toc` | Scan a Markdown document's ATX headings and build a nested table of contents with GitHub-style anchor slugs |
|
|
234
236
|
|
|
235
237
|
### CSS (2 tools)
|
|
236
238
|
| Tool | Description |
|
package/dist/index.js
CHANGED
|
@@ -4157,6 +4157,66 @@ server.tool(
|
|
|
4157
4157
|
return text(JSON.stringify(result, null, 2));
|
|
4158
4158
|
}
|
|
4159
4159
|
);
|
|
4160
|
+
var _REFERRER_POLICY_VALUES_MCP = [
|
|
4161
|
+
"no-referrer",
|
|
4162
|
+
"no-referrer-when-downgrade",
|
|
4163
|
+
"origin",
|
|
4164
|
+
"origin-when-cross-origin",
|
|
4165
|
+
"same-origin",
|
|
4166
|
+
"strict-origin",
|
|
4167
|
+
"strict-origin-when-cross-origin",
|
|
4168
|
+
"unsafe-url"
|
|
4169
|
+
];
|
|
4170
|
+
var _REFERRER_POLICY_INFO_MCP = {
|
|
4171
|
+
"no-referrer": { explanation: "Never sends the Referer header, on any request. The strictest option; the destination learns nothing about where the request came from.", leaksPathAndQuery: false, sentOnDowngrade: false },
|
|
4172
|
+
"no-referrer-when-downgrade": { explanation: "Sends the full URL (origin, path, and query string) for same-security-level or upgrading requests, but omits the header entirely when navigating from HTTPS to HTTP. This was the legacy browser default before strict-origin-when-cross-origin.", leaksPathAndQuery: true, sentOnDowngrade: false },
|
|
4173
|
+
origin: { explanation: "Sends only the origin (scheme, host, and port) on every request, same-origin or cross-origin, including on a downgrade. The path and query string are always stripped.", leaksPathAndQuery: false, sentOnDowngrade: true },
|
|
4174
|
+
"origin-when-cross-origin": { explanation: "Sends the full URL for same-origin requests, but only the origin for cross-origin requests. Still sends the origin on a downgrade.", leaksPathAndQuery: true, sentOnDowngrade: true },
|
|
4175
|
+
"same-origin": { explanation: "Sends the full URL for same-origin requests, and no Referer header at all for cross-origin requests.", leaksPathAndQuery: true, sentOnDowngrade: false },
|
|
4176
|
+
"strict-origin": { explanation: "Sends only the origin, and only when the security level stays the same or improves (HTTPS to HTTPS, or HTTP to anything). Nothing is sent on a downgrade from HTTPS to HTTP.", leaksPathAndQuery: false, sentOnDowngrade: false },
|
|
4177
|
+
"strict-origin-when-cross-origin": { explanation: "Sends the full URL for same-origin requests, only the origin for cross-origin requests at the same or better security level, and nothing at all on a downgrade. This is the current browser default when no policy is set.", leaksPathAndQuery: true, sentOnDowngrade: false },
|
|
4178
|
+
"unsafe-url": { explanation: "Always sends the full URL, including path and query string, on every request, even on a downgrade from HTTPS to HTTP. Generally discouraged: query strings can carry session tokens or other sensitive data that then leaks to third-party destinations and to the network on an insecure connection.", leaksPathAndQuery: true, sentOnDowngrade: true }
|
|
4179
|
+
};
|
|
4180
|
+
function _buildReferrerPolicyMcp(policies) {
|
|
4181
|
+
const trimmed = policies.map((p) => p.trim()).filter((p) => p !== "");
|
|
4182
|
+
if (trimmed.length === 0) return { error: "At least one policy value is required" };
|
|
4183
|
+
const entries = [];
|
|
4184
|
+
for (const value of trimmed) {
|
|
4185
|
+
if (!_REFERRER_POLICY_VALUES_MCP.includes(value)) {
|
|
4186
|
+
return { error: `'${value}' is not a valid Referrer-Policy value. Valid values: ${_REFERRER_POLICY_VALUES_MCP.join(", ")}` };
|
|
4187
|
+
}
|
|
4188
|
+
entries.push({ value, ..._REFERRER_POLICY_INFO_MCP[value] });
|
|
4189
|
+
}
|
|
4190
|
+
const warnings = [];
|
|
4191
|
+
const last = entries[entries.length - 1];
|
|
4192
|
+
if (last.value === "unsafe-url") {
|
|
4193
|
+
warnings.push("unsafe-url sends the full URL, including query strings, on every request, even over an insecure downgrade. Prefer strict-origin-when-cross-origin unless you have a specific reason to leak full URLs.");
|
|
4194
|
+
}
|
|
4195
|
+
if (entries.length > 1 && entries.some((e, i) => i !== entries.length - 1 && e.value === last.value)) {
|
|
4196
|
+
warnings.push("The same policy value appears more than once in the fallback chain, which has no effect beyond the first occurrence.");
|
|
4197
|
+
}
|
|
4198
|
+
const header = entries.map((e) => e.value).join(", ");
|
|
4199
|
+
return {
|
|
4200
|
+
header,
|
|
4201
|
+
headerName: "Referrer-Policy",
|
|
4202
|
+
snippet: `Referrer-Policy: ${header}`,
|
|
4203
|
+
metaTag: `<meta name="referrer" content="${last.value}">`,
|
|
4204
|
+
policies: entries,
|
|
4205
|
+
warnings
|
|
4206
|
+
};
|
|
4207
|
+
}
|
|
4208
|
+
server.tool(
|
|
4209
|
+
"build_referrer_policy",
|
|
4210
|
+
"Build an HTTP Referrer-Policy response-header value from one or more policy tokens (a fallback chain per the Referrer Policy spec), with a plain-English explanation of each token and warnings for risky choices like unsafe-url. Pure string assembly and lookup, not validated against live request traffic.",
|
|
4211
|
+
{
|
|
4212
|
+
policies: z.array(z.enum(_REFERRER_POLICY_VALUES_MCP)).min(1).describe('One or more Referrer-Policy tokens forming a fallback chain, e.g. ["strict-origin-when-cross-origin"]')
|
|
4213
|
+
},
|
|
4214
|
+
async ({ policies }) => {
|
|
4215
|
+
const result = _buildReferrerPolicyMcp(policies);
|
|
4216
|
+
if ("error" in result) return errText(result);
|
|
4217
|
+
return text(JSON.stringify(result, null, 2));
|
|
4218
|
+
}
|
|
4219
|
+
);
|
|
4160
4220
|
function _isValidIpv6HexGroup(g) {
|
|
4161
4221
|
return /^[0-9a-fA-F]{1,4}$/.test(g);
|
|
4162
4222
|
}
|
|
@@ -5638,6 +5698,76 @@ server.tool(
|
|
|
5638
5698
|
return text(JSON.stringify(result, null, 2));
|
|
5639
5699
|
}
|
|
5640
5700
|
);
|
|
5701
|
+
function _stripInlineMarkdownMcp(text2) {
|
|
5702
|
+
return text2.replace(/(\*\*\*|___)(.+?)\1/g, "$2").replace(/(\*\*|__)(.+?)\1/g, "$2").replace(/(\*|_)(.+?)\1/g, "$2").replace(/`([^`]+)`/g, "$1").replace(/!\[([^\]]*)\]\([^)]*\)/g, "$1").replace(/\[([^\]]+)\]\([^)]*\)/g, "$1").trim();
|
|
5703
|
+
}
|
|
5704
|
+
function _slugifyHeadingMcp(text2, seen) {
|
|
5705
|
+
let slug = text2.toLowerCase().trim().replace(/[^\p{L}\p{N}\s_-]/gu, "").replace(/\s/g, "-");
|
|
5706
|
+
const count = seen.get(slug) ?? 0;
|
|
5707
|
+
seen.set(slug, count + 1);
|
|
5708
|
+
if (count > 0) slug = `${slug}-${count}`;
|
|
5709
|
+
return slug;
|
|
5710
|
+
}
|
|
5711
|
+
function _generateMarkdownTocMcp(markdown, minLevel, maxLevel, ordered) {
|
|
5712
|
+
if (typeof markdown !== "string" || markdown.trim() === "") return { error: "markdown is required" };
|
|
5713
|
+
if (!Number.isInteger(minLevel) || !Number.isInteger(maxLevel) || minLevel < 1 || minLevel > 6 || maxLevel < 1 || maxLevel > 6 || minLevel > maxLevel) {
|
|
5714
|
+
return { error: "minLevel and maxLevel must be integers between 1 and 6, with minLevel <= maxLevel" };
|
|
5715
|
+
}
|
|
5716
|
+
const lines = markdown.replace(/\r\n/g, "\n").split("\n");
|
|
5717
|
+
const entries = [];
|
|
5718
|
+
const seen = /* @__PURE__ */ new Map();
|
|
5719
|
+
let inFence = false;
|
|
5720
|
+
let fenceMarker = "";
|
|
5721
|
+
for (const line of lines) {
|
|
5722
|
+
const fenceMatch = line.match(/^\s*(```+|~~~+)/);
|
|
5723
|
+
if (fenceMatch) {
|
|
5724
|
+
if (!inFence) {
|
|
5725
|
+
inFence = true;
|
|
5726
|
+
fenceMarker = fenceMatch[1][0];
|
|
5727
|
+
} else if (fenceMatch[1][0] === fenceMarker) {
|
|
5728
|
+
inFence = false;
|
|
5729
|
+
}
|
|
5730
|
+
continue;
|
|
5731
|
+
}
|
|
5732
|
+
if (inFence) continue;
|
|
5733
|
+
const headingMatch = line.match(/^(#{1,6})\s+(.+?)\s*#*\s*$/);
|
|
5734
|
+
if (!headingMatch) continue;
|
|
5735
|
+
const level = headingMatch[1].length;
|
|
5736
|
+
const text2 = _stripInlineMarkdownMcp(headingMatch[2]);
|
|
5737
|
+
if (text2 === "") continue;
|
|
5738
|
+
const slug = _slugifyHeadingMcp(text2, seen);
|
|
5739
|
+
if (level < minLevel || level > maxLevel) continue;
|
|
5740
|
+
entries.push({ level, text: text2, slug });
|
|
5741
|
+
}
|
|
5742
|
+
if (entries.length === 0) return { error: "No headings found in the given level range" };
|
|
5743
|
+
const baseLevel = Math.min(...entries.map((e) => e.level));
|
|
5744
|
+
const counters = [0, 0, 0, 0, 0, 0, 0];
|
|
5745
|
+
const tocLines = entries.map((e) => {
|
|
5746
|
+
const indent = " ".repeat(e.level - baseLevel);
|
|
5747
|
+
if (ordered) {
|
|
5748
|
+
counters[e.level] = (counters[e.level] ?? 0) + 1;
|
|
5749
|
+
for (let l = e.level + 1; l < counters.length; l++) counters[l] = 0;
|
|
5750
|
+
return `${indent}${counters[e.level]}. [${e.text}](#${e.slug})`;
|
|
5751
|
+
}
|
|
5752
|
+
return `${indent}- [${e.text}](#${e.slug})`;
|
|
5753
|
+
});
|
|
5754
|
+
return { toc: tocLines.join("\n"), entries };
|
|
5755
|
+
}
|
|
5756
|
+
server.tool(
|
|
5757
|
+
"generate_markdown_toc",
|
|
5758
|
+
"Scan a Markdown document's ATX headings (# through ######) and build a nested table of contents with GitHub-style anchor slugs, disambiguating duplicate headings with -1, -2, ... suffixes. Setext-style headings are not recognized, and headings inside fenced code blocks are ignored.",
|
|
5759
|
+
{
|
|
5760
|
+
markdown: z.string().describe("The Markdown document to scan for headings"),
|
|
5761
|
+
minLevel: z.number().int().min(1).max(6).optional().describe("Shallowest heading level to include, defaults to 1"),
|
|
5762
|
+
maxLevel: z.number().int().min(1).max(6).optional().describe("Deepest heading level to include, defaults to 6"),
|
|
5763
|
+
ordered: z.boolean().optional().describe("Render as a numbered list instead of a bullet list, defaults to false")
|
|
5764
|
+
},
|
|
5765
|
+
async ({ markdown, minLevel, maxLevel, ordered }) => {
|
|
5766
|
+
const result = _generateMarkdownTocMcp(markdown, minLevel ?? 1, maxLevel ?? 6, ordered ?? false);
|
|
5767
|
+
if ("error" in result) return errText(result);
|
|
5768
|
+
return text(JSON.stringify(result, null, 2));
|
|
5769
|
+
}
|
|
5770
|
+
);
|
|
5641
5771
|
var _COMMIT_DEFAULT_TYPES_MCP = ["build", "chore", "ci", "docs", "feat", "fix", "perf", "refactor", "revert", "style", "test"];
|
|
5642
5772
|
var _COMMIT_HEADER_RE_MCP = /^([A-Za-z][A-Za-z0-9-]*)(\(([^()]*)\))?(!)?: (.+)$/;
|
|
5643
5773
|
var _COMMIT_FOOTER_LINE_RE_MCP = /^([A-Za-z][A-Za-z0-9-]*|BREAKING CHANGE)(: ?| #)(.*)$/;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@utilix-tech/mcp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.35.0",
|
|
4
4
|
"description": "MCP server exposing 152 Utilix developer tools to Claude, Cursor, VS Code Copilot, and any MCP-compatible AI assistant.",
|
|
5
5
|
"author": "Utilix <hello@utilix.tech>",
|
|
6
6
|
"license": "MIT",
|