@utilix-tech/mcp 0.81.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,9 @@
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
+
5
8
  ## 0.81.0
6
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.
7
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.
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @utilix-tech/mcp
2
2
 
3
- MCP server exposing 257 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 |
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) },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@utilix-tech/mcp",
3
- "version": "0.81.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",