tiny-http-mcp-server 0.1.51 → 0.1.52
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/composition.json
CHANGED
|
@@ -22,6 +22,11 @@ console.log(result.structuredContent);
|
|
|
22
22
|
await client.close();
|
|
23
23
|
```
|
|
24
24
|
|
|
25
|
+
Omit `protocolVersion` for automatic modern discovery and legacy negotiation.
|
|
26
|
+
Set it to `"2025-03-26"` or `"2026-07-28"` to pin a protocol. A modern pin
|
|
27
|
+
rejects failed or timed-out discovery without sending legacy initialization.
|
|
28
|
+
Unsupported pins fail before connection setup.
|
|
29
|
+
|
|
25
30
|
`Tool` includes MCP `outputSchema` when a server advertises typed tool output.
|
|
26
31
|
`CallToolResult.structuredContent` preserves modern JSON values; legacy servers
|
|
27
32
|
require an object. Complete `content[]` blocks remain available in either case.
|
|
@@ -6685,6 +6685,8 @@ var McpClient = class {
|
|
|
6685
6685
|
}
|
|
6686
6686
|
async connect(transport, options = {}) {
|
|
6687
6687
|
options.signal?.throwIfAborted();
|
|
6688
|
+
if (this.options.protocolVersion !== void 0 && this.options.protocolVersion !== MCP_PROTOCOL_VERSION && this.options.protocolVersion !== "2026-07-28")
|
|
6689
|
+
throw new Error("Unsupported protocolVersion; use 2025-03-26 or 2026-07-28");
|
|
6688
6690
|
if (this.currentState !== "disconnected" && this.currentState !== "closed") {
|
|
6689
6691
|
throw new Error("MCP client is already connected");
|
|
6690
6692
|
}
|
|
@@ -6861,6 +6863,7 @@ var McpClient = class {
|
|
|
6861
6863
|
}, { signal: options.signal, timeoutMs: this.options.protocolVersion === "2026-07-28" ? this.options.requestTimeoutMs ?? 3e4 : Math.min(this.options.requestTimeoutMs ?? 3e4, 1e3) });
|
|
6862
6864
|
} catch (error) {
|
|
6863
6865
|
options.signal?.throwIfAborted();
|
|
6866
|
+
if (this.options.protocolVersion === "2026-07-28") throw error;
|
|
6864
6867
|
if (error instanceof McpError && [-32020, -32021, -32022].includes(error.code)) throw error;
|
|
6865
6868
|
}
|
|
6866
6869
|
if (discovery !== void 0) {
|