@utilix-tech/mcp 0.67.0 → 0.69.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 CHANGED
@@ -2,6 +2,14 @@
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.69.0
6
+ - Add `parse_commit_trailers` tool: parse a commit message's trailer block (Co-authored-by, Signed-off-by, Fixes, Reviewed-by, etc.) per git's RFC 822-style trailer convention, returning each trailer's key and value plus the body with the trailer block removed.
7
+ - Add `extract_markdown_footnotes` tool: extract every Markdown-Extra-style footnote reference and definition from a document, flagging references with no matching definition and definitions that are never referenced.
8
+
9
+ ## 0.68.0
10
+ - Add `build_robots_meta_tag`, `parse_robots_meta_tag` tools: build a `<meta name="robots" content="...">` tag from the same directive vocabulary as X-Robots-Tag, optionally scoped to a crawler via the name attribute, or parse an existing tag into the same shape.
11
+ - Add `extract_svg_sprite_symbols` tool: parse an SVG sprite sheet's `<symbol>` definitions and list each one's id, viewBox, width, and height, alongside a ready-to-paste `<use href="#id"></use>` usage snippet.
12
+
5
13
  ## 0.67.0
6
14
  - Add `analyze_regex_groups` tool: parse a regex pattern's capture groups (numbered and named) and backreferences, flagging any backreference pointing at a group that doesn't exist or hasn't finished being defined yet at that point in the pattern.
7
15
 
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @utilix-tech/mcp
2
2
 
3
- MCP server exposing 228 developer utility tools to Claude, Cursor, VS Code Copilot, and any [Model Context Protocol](https://modelcontextprotocol.io) compatible AI assistant.
3
+ MCP server exposing 233 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
 
@@ -205,7 +205,7 @@ claude mcp add utilix -- npx -y @utilix-tech/mcp
205
205
  | `plan_debt_payoff` | Simulate paying off a list of debts under both the snowball (smallest balance first) and avalanche (highest rate first) strategies given a fixed extra monthly payment, and compare months to payoff and total interest |
206
206
  | `calculate_loan_refinance` | Compare a current loan's remaining payments against a new refinanced loan on the same outstanding balance, and compute the monthly savings and the break-even month where cumulative savings recoup the closing costs |
207
207
 
208
- ### API / Network (44 tools)
208
+ ### API / Network (48 tools)
209
209
  | Tool | Description |
210
210
  |------|-------------|
211
211
  | `decode_jwt` | Decode a JWT: header, payload, and expiry |
@@ -254,6 +254,8 @@ claude mcp add utilix -- npx -y @utilix-tech/mcp
254
254
  | `parse_x_robots_tag` | Parse an existing X-Robots-Tag header value into the same shape |
255
255
  | `lookup_websocket_opcode` | Look up what a WebSocket frame opcode means, per RFC 6455's 4-bit opcode space |
256
256
  | `list_websocket_opcodes` | List every WebSocket frame opcode (0x0-0xF) |
257
+ | `build_robots_meta_tag` | Build a `<meta name="robots" content="...">` tag from directives (noindex, nofollow, max-snippet, etc.), the same vocabulary as X-Robots-Tag, optionally scoped to a crawler via the name attribute |
258
+ | `parse_robots_meta_tag` | Parse an existing robots meta tag (or bare content value) into the same shape |
257
259
 
258
260
  ### Color (4 tools)
259
261
  | Tool | Description |
@@ -263,7 +265,7 @@ claude mcp add utilix -- npx -y @utilix-tech/mcp
263
265
  | `color_palette` | Generate a color palette from a base color |
264
266
  | `color_shades` | Generate shades or tints from a base color |
265
267
 
266
- ### Code (16 tools)
268
+ ### Code (20 tools)
267
269
  | Tool | Description |
268
270
  |------|-------------|
269
271
  | `format_sql` | Format a SQL query with proper indentation |
@@ -283,6 +285,9 @@ claude mcp add utilix -- npx -y @utilix-tech/mcp
283
285
  | `validate_tsconfig` | Validate a tsconfig.json file (JSONC-aware): unknown keys, unknown compilerOptions, and type mismatches |
284
286
  | `validate_package_exports` | Validate a package.json "exports" field: dual-package (ESM/CJS) misconfigurations like a missing default fallback or a require/import pointing at the wrong extension |
285
287
  | `audit_dependency_ranges` | Classify each package.json dependency's version range type and flag wildcard ranges, the "latest" tag, git/URL/file/link dependencies, and packages listed with conflicting or redundant ranges across sections |
288
+ | `extract_svg_sprite_symbols` | Parse an SVG sprite sheet's `<symbol>` definitions and list each one's id, viewBox, width, and height, alongside a ready-to-paste `<use href="#id"></use>` usage snippet |
289
+ | `parse_commit_trailers` | Parse a commit message's trailer block (Co-authored-by, Signed-off-by, Fixes, Reviewed-by, etc.) per git's RFC 822-style trailer convention, returning each trailer's key/value plus the body with the trailer block removed |
290
+ | `extract_markdown_footnotes` | Extract every Markdown-Extra-style footnote reference and definition from a document, flagging references with no matching definition and definitions that are never referenced |
286
291
 
287
292
  ### Data (16 tools)
288
293
  | Tool | Description |
package/dist/index.js CHANGED
@@ -10868,5 +10868,257 @@ server.tool(
10868
10868
  return text(JSON.stringify(result, null, 2));
10869
10869
  }
10870
10870
  );
10871
+ function _buildRobotsMetaTagMcp(options) {
10872
+ const built = _buildXRobotsTagMcp({
10873
+ flags: options?.flags,
10874
+ maxSnippet: options?.maxSnippet,
10875
+ maxImagePreview: options?.maxImagePreview,
10876
+ maxVideoPreview: options?.maxVideoPreview,
10877
+ unavailableAfter: options?.unavailableAfter
10878
+ });
10879
+ if ("error" in built) return built;
10880
+ const name = (typeof options?.name === "string" ? options.name.trim() : "") || "robots";
10881
+ return {
10882
+ content: built.header,
10883
+ name,
10884
+ tag: `<meta name="${name}" content="${built.header}">`,
10885
+ directives: built.directives,
10886
+ notes: built.notes,
10887
+ warnings: built.warnings
10888
+ };
10889
+ }
10890
+ var _ROBOTS_META_TAG_REGEX_MCP = /<meta\b[^>]*>/i;
10891
+ var _ROBOTS_META_NAME_ATTR_REGEX_MCP = /\bname\s*=\s*["']([^"']*)["']/i;
10892
+ var _ROBOTS_META_CONTENT_ATTR_REGEX_MCP = /\bcontent\s*=\s*["']([^"']*)["']/i;
10893
+ function _parseRobotsMetaTagMcp(raw) {
10894
+ if (!raw || raw.trim() === "") return { error: "Input is empty" };
10895
+ const trimmed = raw.trim();
10896
+ let name = "robots";
10897
+ let content = trimmed;
10898
+ const tagMatch = trimmed.match(_ROBOTS_META_TAG_REGEX_MCP);
10899
+ if (tagMatch) {
10900
+ const nameMatch = tagMatch[0].match(_ROBOTS_META_NAME_ATTR_REGEX_MCP);
10901
+ const contentMatch = tagMatch[0].match(_ROBOTS_META_CONTENT_ATTR_REGEX_MCP);
10902
+ if (!contentMatch) return { error: "Meta tag is missing a content attribute" };
10903
+ if (nameMatch) name = nameMatch[1].trim() || "robots";
10904
+ content = contentMatch[1];
10905
+ }
10906
+ const tokens = content.split(",").map((t) => t.trim()).filter((t) => t !== "");
10907
+ if (tokens.length === 0) return { error: "No directives found" };
10908
+ const flags = [];
10909
+ let maxSnippet;
10910
+ let maxImagePreview;
10911
+ let maxVideoPreview;
10912
+ let unavailableAfter;
10913
+ for (const token of tokens) {
10914
+ const eq = token.indexOf(":");
10915
+ const directiveName = (eq === -1 ? token : token.slice(0, eq)).trim().toLowerCase();
10916
+ const value = eq === -1 ? "" : token.slice(eq + 1).trim();
10917
+ if (eq === -1) {
10918
+ if (!_isXRobotsTagFlagMcp(directiveName)) return { error: `Unrecognized directive "${token}"` };
10919
+ flags.push(directiveName);
10920
+ continue;
10921
+ }
10922
+ if (directiveName === "max-snippet") {
10923
+ const n = Number(value);
10924
+ if (value === "" || !Number.isInteger(n) || n < -1) return { error: `max-snippet value "${value}" is not a valid integer >= -1` };
10925
+ maxSnippet = n;
10926
+ } else if (directiveName === "max-image-preview") {
10927
+ if (!["none", "standard", "large"].includes(value)) return { error: `max-image-preview value "${value}" must be one of "none", "standard", "large"` };
10928
+ maxImagePreview = value;
10929
+ } else if (directiveName === "max-video-preview") {
10930
+ const n = Number(value);
10931
+ if (value === "" || !Number.isInteger(n) || n < -1) return { error: `max-video-preview value "${value}" is not a valid integer >= -1` };
10932
+ maxVideoPreview = n;
10933
+ } else if (directiveName === "unavailable_after") {
10934
+ if (value === "" || Number.isNaN(Date.parse(value))) return { error: `unavailable_after value "${value}" is not a valid, parseable date` };
10935
+ unavailableAfter = value;
10936
+ } else {
10937
+ return { error: `Unrecognized directive "${token}"` };
10938
+ }
10939
+ }
10940
+ return _buildRobotsMetaTagMcp({ flags, maxSnippet, maxImagePreview, maxVideoPreview, unavailableAfter, name });
10941
+ }
10942
+ server.tool(
10943
+ "build_robots_meta_tag",
10944
+ 'Build a <meta name="robots" content="..."> tag from flag directives (noindex, nofollow, noarchive, nosnippet, notranslate, noimageindex, none, all, indexifembedded) plus optional max-snippet, max-image-preview, max-video-preview, and unavailable_after value directives, the exact same directive vocabulary as the X-Robots-Tag header. Scope the tag to a single crawler with name (e.g. "googlebot") instead of the default "robots".',
10945
+ {
10946
+ flags: z.array(z.enum(["noindex", "nofollow", "noarchive", "nosnippet", "notranslate", "noimageindex", "none", "all", "indexifembedded"])).optional().describe("Flag directives to include"),
10947
+ maxSnippet: z.number().int().min(-1).optional().describe("Max text snippet length in characters; 0 shows no snippet, -1 means no limit"),
10948
+ maxImagePreview: z.enum(["none", "standard", "large"]).optional().describe("Max image preview size shown in search results"),
10949
+ maxVideoPreview: z.number().int().min(-1).optional().describe("Max video preview length in seconds; 0 shows no preview, -1 means no limit"),
10950
+ unavailableAfter: z.string().optional().describe("Stop showing this page in search results after this date/time"),
10951
+ name: z.string().optional().describe('Optional crawler name to scope the tag to via its name attribute, e.g. "googlebot" (default "robots")')
10952
+ },
10953
+ async ({ flags, maxSnippet, maxImagePreview, maxVideoPreview, unavailableAfter, name }) => {
10954
+ const result = _buildRobotsMetaTagMcp({ flags, maxSnippet, maxImagePreview, maxVideoPreview, unavailableAfter, name });
10955
+ if ("error" in result) return errText(result);
10956
+ return text(JSON.stringify(result, null, 2));
10957
+ }
10958
+ );
10959
+ server.tool(
10960
+ "parse_robots_meta_tag",
10961
+ 'Parse an existing <meta name="..." content="..."> robots tag (or a bare content attribute value on its own) into the same shape build_robots_meta_tag returns.',
10962
+ {
10963
+ tag: z.string().min(1).describe("The meta tag (or bare content value) to parse")
10964
+ },
10965
+ async ({ tag }) => {
10966
+ const result = _parseRobotsMetaTagMcp(tag);
10967
+ if ("error" in result) return errText(result);
10968
+ return text(JSON.stringify(result, null, 2));
10969
+ }
10970
+ );
10971
+ var _SVG_SYMBOL_TAG_REGEX_MCP = /<symbol\b([^>]*)>/gi;
10972
+ function _extractSvgAttrMcp(attrs, name) {
10973
+ const match = attrs.match(new RegExp(`\\s${name}\\s*=\\s*["']([^"']*)["']`, "i"));
10974
+ return match ? match[1] : null;
10975
+ }
10976
+ function _extractSvgSpriteSymbolsMcp(svg) {
10977
+ const trimmed = svg.trim();
10978
+ if (!trimmed) return { error: "Empty input" };
10979
+ const symbols = [];
10980
+ let skippedCount = 0;
10981
+ for (const match of trimmed.matchAll(_SVG_SYMBOL_TAG_REGEX_MCP)) {
10982
+ const attrs = match[1];
10983
+ const id = _extractSvgAttrMcp(attrs, "id");
10984
+ if (!id) {
10985
+ skippedCount++;
10986
+ continue;
10987
+ }
10988
+ symbols.push({
10989
+ id,
10990
+ viewBox: _extractSvgAttrMcp(attrs, "viewBox"),
10991
+ width: _extractSvgAttrMcp(attrs, "width"),
10992
+ height: _extractSvgAttrMcp(attrs, "height"),
10993
+ usageSnippet: `<svg><use href="#${id}"></use></svg>`
10994
+ });
10995
+ }
10996
+ if (symbols.length === 0 && skippedCount === 0) {
10997
+ return { error: "No <symbol> elements found" };
10998
+ }
10999
+ return { symbolCount: symbols.length, symbols, skippedCount };
11000
+ }
11001
+ server.tool(
11002
+ "extract_svg_sprite_symbols",
11003
+ `Parse an SVG sprite sheet's <symbol> definitions and list each one's id, viewBox, width, and height, alongside a ready-to-paste <use href="#id"></use> usage snippet. A symbol with no id is skipped (counted in skippedCount) since it can't be referenced by a <use> element at all.`,
11004
+ {
11005
+ svg: z.string().min(1).describe("The SVG sprite sheet markup")
11006
+ },
11007
+ async ({ svg }) => {
11008
+ const result = _extractSvgSpriteSymbolsMcp(svg);
11009
+ if ("error" in result) return errText(result);
11010
+ return text(JSON.stringify(result, null, 2));
11011
+ }
11012
+ );
11013
+ var _TRAILER_LINE_REGEX_MCP = /^([A-Za-z][A-Za-z0-9-]*): (.+)$/;
11014
+ var _TRAILER_CONTINUATION_REGEX_MCP = /^[ \t]+\S/;
11015
+ function _parseCommitTrailersMcp(message) {
11016
+ const lines = message.replace(/\r\n/g, "\n").split("\n");
11017
+ while (lines.length > 0 && lines[lines.length - 1].trim() === "") lines.pop();
11018
+ if (lines.length === 0) return { error: "Empty input" };
11019
+ let start = 0;
11020
+ for (let i = lines.length - 1; i >= 0; i--) {
11021
+ if (lines[i].trim() === "") {
11022
+ start = i + 1;
11023
+ break;
11024
+ }
11025
+ }
11026
+ const paragraph = lines.slice(start);
11027
+ const trailers = [];
11028
+ let valid = true;
11029
+ for (const line of paragraph) {
11030
+ const m = line.match(_TRAILER_LINE_REGEX_MCP);
11031
+ if (m) {
11032
+ trailers.push({ key: m[1], value: m[2].trim() });
11033
+ } else if (_TRAILER_CONTINUATION_REGEX_MCP.test(line) && trailers.length > 0) {
11034
+ trailers[trailers.length - 1].value += " " + line.trim();
11035
+ } else {
11036
+ valid = false;
11037
+ break;
11038
+ }
11039
+ }
11040
+ if (!valid || trailers.length === 0) {
11041
+ return { trailers: [], body: lines.join("\n").trim(), hasTrailers: false };
11042
+ }
11043
+ const body = lines.slice(0, start).join("\n").trim();
11044
+ return { trailers, body, hasTrailers: true };
11045
+ }
11046
+ server.tool(
11047
+ "parse_commit_trailers",
11048
+ `Parse a commit message's trailer block (Co-authored-by, Signed-off-by, Fixes, Reviewed-by, etc.) per git's RFC 822-style trailer convention (git-interpret-trailers): the last paragraph of the message, where every line is either a "Key: value" pair or an indented continuation of the previous trailer's value. Returns the trailers plus the message body with the trailer block removed.`,
11049
+ {
11050
+ message: z.string().min(1).describe("The full commit message")
11051
+ },
11052
+ async ({ message }) => {
11053
+ const result = _parseCommitTrailersMcp(message);
11054
+ return text(JSON.stringify(result, null, 2));
11055
+ }
11056
+ );
11057
+ var _FOOTNOTE_DEFINITION_LINE_REGEX_MCP = /^\[\^([^\]]+)\]:\s?(.*)$/;
11058
+ var _FOOTNOTE_CONTINUATION_REGEX_MCP = /^(?: {4}|\t)/;
11059
+ var _FOOTNOTE_REFERENCE_REGEX_MCP = /\[\^([^\]]+)\]/g;
11060
+ function _extractMarkdownFootnotesMcp(markdown) {
11061
+ const trimmed = markdown.trim();
11062
+ if (!trimmed) return { error: "Empty input" };
11063
+ if (!trimmed.includes("[^")) return { error: "No footnote references or definitions found" };
11064
+ const lines = markdown.replace(/\r\n/g, "\n").split("\n");
11065
+ const definitions = [];
11066
+ const definedLabels = /* @__PURE__ */ new Set();
11067
+ const consumed = new Array(lines.length).fill(false);
11068
+ let i = 0;
11069
+ while (i < lines.length) {
11070
+ const match = lines[i].match(_FOOTNOTE_DEFINITION_LINE_REGEX_MCP);
11071
+ if (!match) {
11072
+ i++;
11073
+ continue;
11074
+ }
11075
+ const label = match[1];
11076
+ const textLines = [match[2]];
11077
+ consumed[i] = true;
11078
+ let j = i + 1;
11079
+ while (j < lines.length && (_FOOTNOTE_CONTINUATION_REGEX_MCP.test(lines[j]) || lines[j].trim() === "" && j + 1 < lines.length && _FOOTNOTE_CONTINUATION_REGEX_MCP.test(lines[j + 1]))) {
11080
+ textLines.push(lines[j].trim() === "" ? "" : lines[j].replace(_FOOTNOTE_CONTINUATION_REGEX_MCP, ""));
11081
+ consumed[j] = true;
11082
+ j++;
11083
+ }
11084
+ if (!definedLabels.has(label)) {
11085
+ definedLabels.add(label);
11086
+ definitions.push({ label, text: textLines.join("\n").trim() });
11087
+ }
11088
+ i = j;
11089
+ }
11090
+ const referenceScanText = lines.filter((_, idx) => !consumed[idx]).join("\n");
11091
+ const refOrder = [];
11092
+ const refCounts = /* @__PURE__ */ new Map();
11093
+ for (const m of referenceScanText.matchAll(_FOOTNOTE_REFERENCE_REGEX_MCP)) {
11094
+ const label = m[1];
11095
+ if (!refCounts.has(label)) {
11096
+ refCounts.set(label, 0);
11097
+ refOrder.push(label);
11098
+ }
11099
+ refCounts.set(label, (refCounts.get(label) ?? 0) + 1);
11100
+ }
11101
+ const references = refOrder.map((label) => ({ label, count: refCounts.get(label) ?? 0 }));
11102
+ const referencedSet = new Set(refOrder);
11103
+ const unresolvedReferences = refOrder.filter((label) => !definedLabels.has(label));
11104
+ const unusedDefinitions = definitions.filter((d) => !referencedSet.has(d.label)).map((d) => d.label);
11105
+ const referenceCount = refOrder.reduce((sum, label) => sum + (refCounts.get(label) ?? 0), 0);
11106
+ if (definitions.length === 0 && references.length === 0) {
11107
+ return { error: "No footnote references or definitions found" };
11108
+ }
11109
+ return { definitionCount: definitions.length, referenceCount, definitions, references, unresolvedReferences, unusedDefinitions };
11110
+ }
11111
+ server.tool(
11112
+ "extract_markdown_footnotes",
11113
+ "Extract every Markdown-Extra-style footnote reference ([^label]) and definition ([^label]: text, with 4-space/tab-indented continuation lines) from a document, then flag references with no matching definition and definitions that are never referenced.",
11114
+ {
11115
+ markdown: z.string().min(1).describe("The Markdown document text")
11116
+ },
11117
+ async ({ markdown }) => {
11118
+ const result = _extractMarkdownFootnotesMcp(markdown);
11119
+ if ("error" in result) return errText(result);
11120
+ return text(JSON.stringify(result, null, 2));
11121
+ }
11122
+ );
10871
11123
  var transport = new StdioServerTransport();
10872
11124
  await server.connect(transport);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@utilix-tech/mcp",
3
- "version": "0.67.0",
3
+ "version": "0.69.0",
4
4
  "description": "MCP server exposing 198 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",