@utilix-tech/mcp 0.36.0 → 0.37.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.37.0
6
+ - Add `build_link_header` tool: build an HTTP Link response header from URL/rel pairs (preload, preconnect, prefetch, canonical, pagination, etc.), including the as/type/crossorigin attributes preload needs, plus a plain-English explanation of each entry and warnings for common mistakes like a preload missing `as`.
7
+
5
8
  ## 0.36.0
6
9
  - Add `calculate_roi` tool: return on investment percent from an initial and final value, plus the annualized (CAGR) return given an optional holding period in years.
7
10
  - Add `lookup_emoji` tool: search a curated table of ~280 common emoji by name, keyword, or GitHub-style shortcode, or look one up exactly by shortcode, character, or category.
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @utilix-tech/mcp
2
2
 
3
- MCP server exposing 158 developer utility tools to Claude, Cursor, VS Code Copilot, and any [Model Context Protocol](https://modelcontextprotocol.io) compatible AI assistant.
3
+ MCP server exposing 159 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
 
@@ -184,7 +184,7 @@ claude mcp add utilix -- npx -y @utilix-tech/mcp
184
184
  | `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 |
185
185
  | `calculate_roi` | Compute return on investment percent from an initial and final value, plus the annualized (CAGR) return given an optional holding period in years |
186
186
 
187
- ### API / Network (13 tools)
187
+ ### API / Network (14 tools)
188
188
  | Tool | Description |
189
189
  |------|-------------|
190
190
  | `decode_jwt` | Decode a JWT: header, payload, and expiry |
@@ -200,6 +200,7 @@ claude mcp add utilix -- npx -y @utilix-tech/mcp
200
200
  | `build_cache_control` | Build and explain an HTTP Cache-Control response header from directives (max-age, no-store, immutable, etc.) |
201
201
  | `build_referrer_policy` | Build and explain an HTTP Referrer-Policy header from one or more fallback-chain policy tokens |
202
202
  | `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 |
203
+ | `build_link_header` | Build and explain an HTTP Link response header from URL/rel pairs (preload, preconnect, prefetch, canonical, pagination, etc.) |
203
204
 
204
205
  ### Color (4 tools)
205
206
  | Tool | Description |
package/dist/index.js CHANGED
@@ -4217,6 +4217,88 @@ server.tool(
4217
4217
  return text(JSON.stringify(result, null, 2));
4218
4218
  }
4219
4219
  );
4220
+ var _LINK_REL_VALUES_MCP = [
4221
+ "preload",
4222
+ "preconnect",
4223
+ "prefetch",
4224
+ "prerender",
4225
+ "dns-prefetch",
4226
+ "canonical",
4227
+ "next",
4228
+ "prev",
4229
+ "alternate",
4230
+ "stylesheet",
4231
+ "icon",
4232
+ "modulepreload"
4233
+ ];
4234
+ var _LINK_REL_INFO_MCP = {
4235
+ preload: "Tells the browser to fetch this resource early, before the parser would otherwise discover it, without blocking rendering. Requires an `as` attribute so the browser applies the right request priority and Content-Security-Policy check; omitting it commonly causes the resource to be fetched twice.",
4236
+ preconnect: "Tells the browser to start the connection handshake (DNS, TCP, TLS) to this origin early, before any real request to it is made, so the first actual request lands faster.",
4237
+ prefetch: "Tells the browser to fetch this resource at low priority for a likely future navigation and cache it. Unlike preload, it does not affect the current page load.",
4238
+ prerender: "Tells the browser to fetch and render this page in the background so navigating to it feels instant, at a real bandwidth and CPU cost if the user never navigates there.",
4239
+ "dns-prefetch": "Tells the browser to resolve this origin's DNS early, a lighter-weight version of preconnect that skips the TCP/TLS handshake.",
4240
+ canonical: "Tells search engines which URL is the authoritative version of this page, used to consolidate duplicate-content signals across query-string or protocol variants.",
4241
+ next: "Marks the next page in a paginated sequence, a hint search engines and some browsers use for pagination.",
4242
+ prev: "Marks the previous page in a paginated sequence.",
4243
+ alternate: "Points to an alternate version of this resource, such as a different language or an RSS feed.",
4244
+ stylesheet: 'Loads an external stylesheet, the same effect as a `<link rel="stylesheet">` tag but delivered as a response header instead.',
4245
+ icon: 'Points to this resource\'s favicon, the same effect as a `<link rel="icon">` tag but delivered as a response header instead.',
4246
+ modulepreload: "Tells the browser to fetch and parse this JavaScript module early, ahead of when the module graph would otherwise discover it."
4247
+ };
4248
+ function _buildLinkHeaderMcp(links) {
4249
+ if (links.length === 0) return { error: "At least one link entry is required" };
4250
+ const entries = [];
4251
+ for (const link of links) {
4252
+ const url = link.url.trim();
4253
+ const rel = link.rel.trim();
4254
+ if (!url) return { error: "Each link entry requires a non-empty url" };
4255
+ if (!rel) return { error: "Each link entry requires a non-empty rel" };
4256
+ if (!_LINK_REL_VALUES_MCP.includes(rel)) {
4257
+ return { error: `'${rel}' is not a supported rel value. Supported values: ${_LINK_REL_VALUES_MCP.join(", ")}` };
4258
+ }
4259
+ const as = link.as?.trim() || void 0;
4260
+ const type = link.type?.trim() || void 0;
4261
+ const crossorigin = link.crossorigin === true;
4262
+ let value = `<${url}>; rel="${rel}"`;
4263
+ if (as) value += `; as="${as}"`;
4264
+ if (type) value += `; type="${type}"`;
4265
+ if (crossorigin) value += "; crossorigin";
4266
+ entries.push({ url, rel, as, type, crossorigin: crossorigin || void 0, value, explanation: _LINK_REL_INFO_MCP[rel] });
4267
+ }
4268
+ const warnings = [];
4269
+ for (const entry of entries) {
4270
+ if (entry.rel === "preload" && !entry.as) {
4271
+ warnings.push(`preload link for "${entry.url}" is missing an \`as\` attribute \u2014 the browser may fetch it twice or apply the wrong request priority.`);
4272
+ }
4273
+ if ((entry.rel === "preconnect" || entry.rel === "dns-prefetch") && (entry.as || entry.type)) {
4274
+ warnings.push(`${entry.rel} link for "${entry.url}" sets \`as\`/\`type\`, which it ignores since no specific resource is being fetched yet.`);
4275
+ }
4276
+ }
4277
+ const canonicalCount = entries.filter((e) => e.rel === "canonical").length;
4278
+ if (canonicalCount > 1) {
4279
+ warnings.push(`${canonicalCount} canonical links present \u2014 only one canonical URL should be declared per page.`);
4280
+ }
4281
+ const header = entries.map((e) => e.value).join(", ");
4282
+ return { header, headerName: "Link", snippet: `Link: ${header}`, links: entries, warnings };
4283
+ }
4284
+ server.tool(
4285
+ "build_link_header",
4286
+ "Build an HTTP Link response-header value from one or more URL/rel pairs (preload, preconnect, prefetch, canonical, pagination, etc.), including the as/type/crossorigin attributes preload needs, with a plain-English explanation of each entry and warnings for common mistakes like a preload missing `as`. Pure string assembly and lookup; it never fetches or validates that a URL exists.",
4287
+ {
4288
+ links: z.array(z.object({
4289
+ url: z.string().describe("The linked resource URL"),
4290
+ rel: z.enum(_LINK_REL_VALUES_MCP),
4291
+ as: z.string().optional().describe("Resource type hint, mainly used with preload/modulepreload"),
4292
+ type: z.string().optional().describe("MIME type of the linked resource"),
4293
+ crossorigin: z.boolean().optional()
4294
+ })).min(1).describe("One or more link entries")
4295
+ },
4296
+ async ({ links }) => {
4297
+ const result = _buildLinkHeaderMcp(links);
4298
+ if ("error" in result) return errText(result);
4299
+ return text(JSON.stringify(result, null, 2));
4300
+ }
4301
+ );
4220
4302
  function _isValidIpv6HexGroup(g) {
4221
4303
  return /^[0-9a-fA-F]{1,4}$/.test(g);
4222
4304
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@utilix-tech/mcp",
3
- "version": "0.36.0",
3
+ "version": "0.37.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",