@wrongstack/mcp 1.1.1 → 1.1.4

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/dist/index.js CHANGED
@@ -2785,7 +2785,7 @@ async function readBodyCapped(res, maxBytes = MAX_MCP_HTTP_BODY_BYTES) {
2785
2785
  } finally {
2786
2786
  reader.releaseLock?.();
2787
2787
  }
2788
- return Buffer.concat(chunks).toString("utf8");
2788
+ return new TextDecoder().decode(Buffer.concat(chunks));
2789
2789
  }
2790
2790
 
2791
2791
  // src/sse-reader.ts
@@ -7805,6 +7805,7 @@ var MCPRegistry = class extends MCPRegistryRuntime {
7805
7805
  // src/server-http.ts
7806
7806
  import { timingSafeEqual as timingSafeEqual2 } from "node:crypto";
7807
7807
  import { createServer as createServer2 } from "node:http";
7808
+ import { isIP as isIP3 } from "node:net";
7808
7809
  import { toErrorMessage as toErrorMessage5 } from "@wrongstack/core/utils";
7809
7810
 
7810
7811
  // src/server-stdio.ts
@@ -8036,7 +8037,7 @@ async function handleHttpRequest(server, req, res, token, log, boundHost) {
8036
8037
  }
8037
8038
  function isLoopbackHostname(hostname2) {
8038
8039
  const bare = hostname2.toLowerCase().replace(/^\[(.*)\]$/, "$1");
8039
- return bare === "localhost" || bare === "::1" || bare === "127.0.0.1" || bare.startsWith("127.");
8040
+ return bare === "localhost" || bare === "::1" || isIP3(bare) === 4 && bare.startsWith("127.");
8040
8041
  }
8041
8042
  function originIsAcceptable(req, boundHost) {
8042
8043
  const origin = req.headers.origin;
@@ -24,6 +24,12 @@ export interface MCPServerTool {
24
24
  * hint in this object.
25
25
  */
26
26
  annotations?: MCPToolAnnotations | undefined;
27
+ /**
28
+ * Client-specific extensions, published verbatim. E.g. Claude Code reads
29
+ * `"anthropic/alwaysLoad": true` to load a tool upfront instead of behind
30
+ * its tool search.
31
+ */
32
+ _meta?: Record<string, unknown> | undefined;
27
33
  }
28
34
  /** The result of a `tools/call`, as the host produces it. */
29
35
  export interface MCPServerCallResult {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wrongstack/mcp",
3
- "version": "1.1.1",
3
+ "version": "1.1.4",
4
4
  "license": "MIT",
5
5
  "description": "WrongStack Model Context Protocol client and registry: stdio, SSE, and streamable HTTP transports.",
6
6
  "repository": {
@@ -32,7 +32,7 @@
32
32
  "clean": "bun -e \"require('node:fs').rmSync('dist',{recursive:true,force:true})\""
33
33
  },
34
34
  "dependencies": {
35
- "@wrongstack/core": "1.1.0",
35
+ "@wrongstack/core": "1.1.2",
36
36
  "undici": "^8.10.2"
37
37
  },
38
38
  "devDependencies": {