@utilix-tech/mcp 0.80.0 → 0.82.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,13 @@
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.82.0
6
+ - Add `generate_robots_txt` tool: build a robots.txt file from User-agent groups with Allow/Disallow rules and an optional Crawl-delay, plus a list of Sitemap URLs. The generator-side sibling of `validate_robots_txt`.
7
+
8
+ ## 0.81.0
9
+ - Add `validate_fence_language_tags` tool: scan a Markdown document's fenced code blocks and flag a missing, unknown, or inconsistently-cased language tag against a curated list of common syntax-highlighter identifiers.
10
+ - Add `count_sql_placeholders` tool: count positional (`?`, `$1`) and named (`:name`, `@name`) parameter placeholders in a SQL query, flagging mixed styles and numbered-sequence gaps or duplicates.
11
+
5
12
  ## 0.80.0
6
13
  - Add `diff_json_patch`, `apply_json_patch` tools: diff two JSON documents into an RFC 6902 JSON Patch operation list (add/remove/replace/move/copy/test), or apply a patch to a target document.
7
14
  - Add `parse_connection_string` tool: parse a database connection URI (postgres, mysql, mongodb, redis, amqp, and similar) into its scheme, credentials, hosts, database, and query parameters.
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @utilix-tech/mcp
2
2
 
3
- MCP server exposing 255 developer utility tools to Claude, Cursor, VS Code Copilot, and any [Model Context Protocol](https://modelcontextprotocol.io) compatible AI assistant.
3
+ MCP server exposing 258 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
 
@@ -231,6 +231,7 @@ claude mcp add utilix -- npx -y @utilix-tech/mcp
231
231
  | `validate_sitemap` | Validate a sitemap.xml or sitemap index against the sitemaps.org protocol |
232
232
  | `split_sitemap` | Split a URL list exceeding the sitemaps.org 50,000-URL cap into multiple sitemap.xml files plus a sitemap index file |
233
233
  | `validate_robots_txt` | Validate a robots.txt file: User-agent groups, rules, and directive syntax |
234
+ | `generate_robots_txt` | Generate a robots.txt file from User-agent groups with Allow/Disallow rules and an optional Crawl-delay, plus Sitemap URLs |
234
235
  | `parse_user_agent` | Parse a browser User-Agent string into browser, engine, OS, and device type |
235
236
  | `build_cache_control` | Build and explain an HTTP Cache-Control response header from directives (max-age, no-store, immutable, etc.) |
236
237
  | `build_referrer_policy` | Build and explain an HTTP Referrer-Policy header from one or more fallback-chain policy tokens |
@@ -281,7 +282,7 @@ claude mcp add utilix -- npx -y @utilix-tech/mcp
281
282
  | `color_palette` | Generate a color palette from a base color |
282
283
  | `color_shades` | Generate shades or tints from a base color |
283
284
 
284
- ### Code (22 tools)
285
+ ### Code (24 tools)
285
286
  | Tool | Description |
286
287
  |------|-------------|
287
288
  | `format_sql` | Format a SQL query with proper indentation |
@@ -306,6 +307,8 @@ claude mcp add utilix -- npx -y @utilix-tech/mcp
306
307
  | `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 |
307
308
  | `validate_aria` | Parse an HTML snippet and check every role and aria-* attribute against a curated table of WAI-ARIA 1.2 roles: unknown role names, an aria-* attribute not permitted on the given role, and a widget role missing its required aria-* state |
308
309
  | `parse_connection_string` | Parse a database connection URI (postgres, mysql, mongodb, redis, amqp, and similar) into its scheme, credentials, hosts, database, and query parameters |
310
+ | `validate_fence_language_tags` | Scan a Markdown document's fenced code blocks and flag a missing, unknown, or inconsistently-cased language tag against a curated list of common syntax-highlighter identifiers |
311
+ | `count_sql_placeholders` | Count positional (`?`, `$1`) and named (`:name`, `@name`) parameter placeholders in a SQL query, flagging mixed styles and numbered-sequence gaps or duplicates |
309
312
 
310
313
  ### Data (16 tools)
311
314
  | Tool | Description |
package/dist/index.js CHANGED
@@ -1895,6 +1895,58 @@ server.tool(
1895
1895
  return text(JSON.stringify(result, null, 2));
1896
1896
  }
1897
1897
  );
1898
+ function _generateRobotsTxt(groups, sitemaps) {
1899
+ if (!Array.isArray(groups) || groups.length === 0) {
1900
+ return { error: "At least one group with a user-agent is required" };
1901
+ }
1902
+ const lines = [];
1903
+ for (const group of groups) {
1904
+ const userAgents = (group.userAgents ?? []).map((a) => a.trim()).filter(Boolean);
1905
+ if (userAgents.length === 0) return { error: "Each group needs at least one non-empty user-agent" };
1906
+ for (const ua of userAgents) lines.push(`User-agent: ${ua}`);
1907
+ const disallow = group.disallow ?? [];
1908
+ const allow = group.allow ?? [];
1909
+ if (disallow.length === 0 && allow.length === 0) {
1910
+ lines.push("Disallow:");
1911
+ } else {
1912
+ for (const value of disallow) lines.push(`Disallow: ${value}`);
1913
+ for (const value of allow) lines.push(`Allow: ${value}`);
1914
+ }
1915
+ if (group.crawlDelay !== void 0) {
1916
+ if (!Number.isFinite(group.crawlDelay) || group.crawlDelay < 0) {
1917
+ return { error: "crawlDelay must be a non-negative number" };
1918
+ }
1919
+ lines.push(`Crawl-delay: ${group.crawlDelay}`);
1920
+ }
1921
+ lines.push("");
1922
+ }
1923
+ for (const sitemap of sitemaps ?? []) {
1924
+ if (!/^https?:\/\//i.test(sitemap)) {
1925
+ return { error: `Sitemap URL "${sitemap}" must be absolute (start with http:// or https://)` };
1926
+ }
1927
+ lines.push(`Sitemap: ${sitemap}`);
1928
+ }
1929
+ while (lines.length > 0 && lines[lines.length - 1] === "") lines.pop();
1930
+ return { text: lines.join("\n") + "\n" };
1931
+ }
1932
+ server.tool(
1933
+ "generate_robots_txt",
1934
+ "Generate a robots.txt file from one or more User-agent groups (each with Allow/Disallow rules and an optional Crawl-delay) plus a list of Sitemap URLs. The inverse of validate_robots_txt: a group with no Allow or Disallow rules gets an explicit empty Disallow line, the standard way to allow crawling everything.",
1935
+ {
1936
+ groups: z.array(z.object({
1937
+ userAgents: z.array(z.string()).describe('User-agent tokens for this group, e.g. ["*"] or ["Googlebot"]'),
1938
+ allow: z.array(z.string()).optional().describe('Allow rule paths, e.g. ["/admin/public"]'),
1939
+ disallow: z.array(z.string()).optional().describe('Disallow rule paths, e.g. ["/admin"]'),
1940
+ crawlDelay: z.number().optional().describe("Crawl-delay in seconds for this group")
1941
+ })).describe("User-agent groups to emit, in order"),
1942
+ sitemaps: z.array(z.string()).optional().describe("Absolute sitemap URLs to append as Sitemap directives")
1943
+ },
1944
+ async ({ groups, sitemaps }) => {
1945
+ const result = _generateRobotsTxt(groups, sitemaps);
1946
+ if ("error" in result) return errText(result);
1947
+ return text(JSON.stringify(result, null, 2));
1948
+ }
1949
+ );
1898
1950
  var _CARD_NETWORK_RULES = [
1899
1951
  { name: "American Express", lengths: [15], test: (d) => /^3[47]/.test(d) },
1900
1952
  { name: "Diners Club", lengths: [14], test: (d) => /^3(?:0[0-5]|[68])/.test(d) },
@@ -12744,5 +12796,368 @@ server.tool(
12744
12796
  return text(JSON.stringify(result, null, 2));
12745
12797
  }
12746
12798
  );
12799
+ var _KNOWN_LANGUAGE_TAGS_MCP = /* @__PURE__ */ new Set([
12800
+ "js",
12801
+ "jsx",
12802
+ "mjs",
12803
+ "cjs",
12804
+ "javascript",
12805
+ "ts",
12806
+ "tsx",
12807
+ "typescript",
12808
+ "json",
12809
+ "json5",
12810
+ "jsonc",
12811
+ "jsonl",
12812
+ "ndjson",
12813
+ "yaml",
12814
+ "yml",
12815
+ "toml",
12816
+ "ini",
12817
+ "cfg",
12818
+ "conf",
12819
+ "properties",
12820
+ "env",
12821
+ "dotenv",
12822
+ "html",
12823
+ "htm",
12824
+ "xml",
12825
+ "svg",
12826
+ "xhtml",
12827
+ "css",
12828
+ "scss",
12829
+ "sass",
12830
+ "less",
12831
+ "stylus",
12832
+ "styl",
12833
+ "markdown",
12834
+ "md",
12835
+ "mdx",
12836
+ "bash",
12837
+ "sh",
12838
+ "shell",
12839
+ "zsh",
12840
+ "fish",
12841
+ "console",
12842
+ "powershell",
12843
+ "ps1",
12844
+ "bat",
12845
+ "cmd",
12846
+ "python",
12847
+ "py",
12848
+ "py3",
12849
+ "ipynb",
12850
+ "ruby",
12851
+ "rb",
12852
+ "erb",
12853
+ "php",
12854
+ "java",
12855
+ "kotlin",
12856
+ "kt",
12857
+ "kts",
12858
+ "groovy",
12859
+ "gradle",
12860
+ "swift",
12861
+ "objectivec",
12862
+ "objc",
12863
+ "go",
12864
+ "golang",
12865
+ "rust",
12866
+ "rs",
12867
+ "c",
12868
+ "h",
12869
+ "cpp",
12870
+ "cc",
12871
+ "cxx",
12872
+ "hpp",
12873
+ "c++",
12874
+ "csharp",
12875
+ "cs",
12876
+ "fsharp",
12877
+ "fs",
12878
+ "perl",
12879
+ "pl",
12880
+ "lua",
12881
+ "r",
12882
+ "matlab",
12883
+ "m",
12884
+ "scala",
12885
+ "nim",
12886
+ "zig",
12887
+ "julia",
12888
+ "jl",
12889
+ "haskell",
12890
+ "hs",
12891
+ "elixir",
12892
+ "ex",
12893
+ "exs",
12894
+ "erlang",
12895
+ "erl",
12896
+ "clojure",
12897
+ "clj",
12898
+ "cljs",
12899
+ "dart",
12900
+ "ocaml",
12901
+ "ml",
12902
+ "sql",
12903
+ "mysql",
12904
+ "postgresql",
12905
+ "plsql",
12906
+ "sqlite",
12907
+ "graphql",
12908
+ "gql",
12909
+ "dockerfile",
12910
+ "docker",
12911
+ "makefile",
12912
+ "make",
12913
+ "cmake",
12914
+ "nginx",
12915
+ "apache",
12916
+ "diff",
12917
+ "patch",
12918
+ "git",
12919
+ "http",
12920
+ "proto",
12921
+ "protobuf",
12922
+ "csv",
12923
+ "tsv",
12924
+ "vim",
12925
+ "viml",
12926
+ "tex",
12927
+ "latex",
12928
+ "bibtex",
12929
+ "plaintext",
12930
+ "text",
12931
+ "txt",
12932
+ "nohighlight",
12933
+ "none",
12934
+ "asciidoc",
12935
+ "adoc",
12936
+ "rst",
12937
+ "vue",
12938
+ "svelte",
12939
+ "astro",
12940
+ "wasm",
12941
+ "wat",
12942
+ "handlebars",
12943
+ "hbs",
12944
+ "pug",
12945
+ "jade",
12946
+ "coffee",
12947
+ "coffeescript",
12948
+ "actionscript",
12949
+ "terraform",
12950
+ "tf",
12951
+ "hcl",
12952
+ "puppet",
12953
+ "ansible"
12954
+ ]);
12955
+ function _parseFenceLineMcp(line) {
12956
+ const match = line.match(/^( {0,3})(`{3,}|~{3,})(.*)$/);
12957
+ if (!match) return null;
12958
+ const [, , marker, rest] = match;
12959
+ const char = marker[0];
12960
+ if (char === "`" && rest.includes("`")) return null;
12961
+ return { char, length: marker.length, infoString: rest.trim() };
12962
+ }
12963
+ function _isClosingFenceMcp(line, fenceChar, fenceLength) {
12964
+ const match = line.match(/^ {0,3}(`+|~+)\s*$/);
12965
+ if (!match) return false;
12966
+ const marker = match[1];
12967
+ return marker[0] === fenceChar && marker.length >= fenceLength;
12968
+ }
12969
+ function _validateFenceLanguageTagsMcp(markdown) {
12970
+ const lines = markdown.split("\n");
12971
+ const issues = [];
12972
+ let totalFences = 0;
12973
+ let open = null;
12974
+ for (let i = 0; i < lines.length; i++) {
12975
+ const lineNumber = i + 1;
12976
+ const line = lines[i];
12977
+ if (open) {
12978
+ if (_isClosingFenceMcp(line, open.char, open.length)) open = null;
12979
+ continue;
12980
+ }
12981
+ const fence = _parseFenceLineMcp(line);
12982
+ if (!fence) continue;
12983
+ totalFences++;
12984
+ const tag = fence.infoString.split(/\s+/)[0] ?? "";
12985
+ open = { char: fence.char, length: fence.length };
12986
+ if (tag === "") {
12987
+ issues.push({ line: lineNumber, tag, issue: "missing" });
12988
+ continue;
12989
+ }
12990
+ const lower = tag.toLowerCase();
12991
+ if (!_KNOWN_LANGUAGE_TAGS_MCP.has(lower)) {
12992
+ issues.push({ line: lineNumber, tag, issue: "unknown" });
12993
+ continue;
12994
+ }
12995
+ if (tag !== lower) {
12996
+ issues.push({ line: lineNumber, tag, issue: "inconsistent-case", suggestion: lower });
12997
+ }
12998
+ }
12999
+ return { totalFences, issues };
13000
+ }
13001
+ server.tool(
13002
+ "validate_fence_language_tags",
13003
+ "Scan a Markdown document's fenced code blocks (``` or ~~~) and flag ones with a missing, unknown, or inconsistently-cased language tag, checked against a curated list of common syntax-highlighter language identifiers.",
13004
+ {
13005
+ markdown: z.string().describe("The Markdown document to scan")
13006
+ },
13007
+ async ({ markdown }) => {
13008
+ const result = _validateFenceLanguageTagsMcp(markdown);
13009
+ return text(JSON.stringify(result, null, 2));
13010
+ }
13011
+ );
13012
+ var _SQL_IDENT_START_MCP = /[A-Za-z_]/;
13013
+ var _SQL_IDENT_CHAR_MCP = /[A-Za-z0-9_]/;
13014
+ function _readSqlIdentifierMcp(sql, start) {
13015
+ let end = start;
13016
+ while (end < sql.length && _SQL_IDENT_CHAR_MCP.test(sql[end])) end++;
13017
+ return sql.slice(start, end);
13018
+ }
13019
+ function _countSqlPlaceholdersMcp(sql) {
13020
+ const placeholders = [];
13021
+ let state = "normal";
13022
+ let i = 0;
13023
+ while (i < sql.length) {
13024
+ const ch = sql[i];
13025
+ const next = sql[i + 1];
13026
+ if (state === "single") {
13027
+ if (ch === "'" && next === "'") {
13028
+ i += 2;
13029
+ continue;
13030
+ }
13031
+ if (ch === "'") {
13032
+ state = "normal";
13033
+ i++;
13034
+ continue;
13035
+ }
13036
+ i++;
13037
+ continue;
13038
+ }
13039
+ if (state === "double") {
13040
+ if (ch === '"' && next === '"') {
13041
+ i += 2;
13042
+ continue;
13043
+ }
13044
+ if (ch === '"') {
13045
+ state = "normal";
13046
+ i++;
13047
+ continue;
13048
+ }
13049
+ i++;
13050
+ continue;
13051
+ }
13052
+ if (state === "line-comment") {
13053
+ if (ch === "\n") state = "normal";
13054
+ i++;
13055
+ continue;
13056
+ }
13057
+ if (state === "block-comment") {
13058
+ if (ch === "*" && next === "/") {
13059
+ state = "normal";
13060
+ i += 2;
13061
+ continue;
13062
+ }
13063
+ i++;
13064
+ continue;
13065
+ }
13066
+ if (ch === "'") {
13067
+ state = "single";
13068
+ i++;
13069
+ continue;
13070
+ }
13071
+ if (ch === '"') {
13072
+ state = "double";
13073
+ i++;
13074
+ continue;
13075
+ }
13076
+ if (ch === "-" && next === "-") {
13077
+ state = "line-comment";
13078
+ i += 2;
13079
+ continue;
13080
+ }
13081
+ if (ch === "/" && next === "*") {
13082
+ state = "block-comment";
13083
+ i += 2;
13084
+ continue;
13085
+ }
13086
+ if (ch === "?") {
13087
+ placeholders.push({ style: "anonymous", raw: "?", index: i });
13088
+ i++;
13089
+ continue;
13090
+ }
13091
+ if (ch === "$" && /[0-9]/.test(next ?? "")) {
13092
+ let end = i + 1;
13093
+ while (end < sql.length && /[0-9]/.test(sql[end])) end++;
13094
+ const raw = sql.slice(i, end);
13095
+ placeholders.push({ style: "numbered", raw, index: i, number: parseInt(raw.slice(1), 10) });
13096
+ i = end;
13097
+ continue;
13098
+ }
13099
+ if (ch === ":") {
13100
+ if (next === ":") {
13101
+ i += 2;
13102
+ continue;
13103
+ }
13104
+ if (next && _SQL_IDENT_START_MCP.test(next)) {
13105
+ const name = _readSqlIdentifierMcp(sql, i + 1);
13106
+ placeholders.push({ style: "named-colon", raw: `:${name}`, index: i, name });
13107
+ i += 1 + name.length;
13108
+ continue;
13109
+ }
13110
+ i++;
13111
+ continue;
13112
+ }
13113
+ if (ch === "@") {
13114
+ if (next === "@") {
13115
+ i += 2;
13116
+ continue;
13117
+ }
13118
+ if (next && _SQL_IDENT_START_MCP.test(next)) {
13119
+ const name = _readSqlIdentifierMcp(sql, i + 1);
13120
+ placeholders.push({ style: "named-at", raw: `@${name}`, index: i, name });
13121
+ i += 1 + name.length;
13122
+ continue;
13123
+ }
13124
+ i++;
13125
+ continue;
13126
+ }
13127
+ i++;
13128
+ }
13129
+ const counts = { anonymous: 0, numbered: 0, "named-colon": 0, "named-at": 0 };
13130
+ for (const p of placeholders) counts[p.style]++;
13131
+ const stylesUsed = ["anonymous", "numbered", "named-colon", "named-at"].filter((s) => counts[s] > 0);
13132
+ const numbers = placeholders.filter((p) => p.style === "numbered").map((p) => p.number);
13133
+ const maxNumber = numbers.length > 0 ? Math.max(...numbers) : 0;
13134
+ const seen = new Set(numbers);
13135
+ const numberedGaps = [];
13136
+ for (let n = 1; n < maxNumber; n++) {
13137
+ if (!seen.has(n)) numberedGaps.push(n);
13138
+ }
13139
+ const countedMap = /* @__PURE__ */ new Map();
13140
+ for (const n of numbers) countedMap.set(n, (countedMap.get(n) ?? 0) + 1);
13141
+ const numberedDuplicates = [...countedMap.entries()].filter(([, c]) => c > 1).map(([n]) => n).sort((a, b) => a - b);
13142
+ return {
13143
+ placeholders,
13144
+ counts,
13145
+ stylesUsed,
13146
+ mixedStyles: stylesUsed.length > 1,
13147
+ numberedGaps,
13148
+ numberedDuplicates
13149
+ };
13150
+ }
13151
+ server.tool(
13152
+ "count_sql_placeholders",
13153
+ "Count and list positional (?, $1) and named (:name, @name) parameter placeholders in a SQL query string, flagging a mix of placeholder styles in the same query and, for numbered placeholders, a gap or duplicate in the sequence. String literals and comments are skipped.",
13154
+ {
13155
+ sql: z.string().describe("The SQL query string to scan")
13156
+ },
13157
+ async ({ sql }) => {
13158
+ const result = _countSqlPlaceholdersMcp(sql);
13159
+ return text(JSON.stringify(result, null, 2));
13160
+ }
13161
+ );
12747
13162
  var transport = new StdioServerTransport();
12748
13163
  await server.connect(transport);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@utilix-tech/mcp",
3
- "version": "0.80.0",
3
+ "version": "0.82.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",