@jadchene/mcp-gateway-service 0.6.0 → 0.6.1
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/README.md +2 -2
- package/README_zh.md +2 -2
- package/dist/config.js +0 -3
- package/dist/http-server.js +1 -3
- package/dist/index.js +1 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@ English | [简体中文](./README_zh.md)
|
|
|
4
4
|
|
|
5
5
|
MCP Gateway is a token-efficient Model Context Protocol gateway. It exposes six stable routing tools instead of flattening every downstream tool into each client's startup context.
|
|
6
6
|
|
|
7
|
-
MCP Gateway v0.6.
|
|
7
|
+
MCP Gateway v0.6.1 uses the official TypeScript SDK v2.
|
|
8
8
|
|
|
9
9
|
> [!IMPORTANT]
|
|
10
10
|
> v0.6.0 and later support only MCP `2026-07-28` and `2025-06-18`, using standard newline-delimited stdio or single-endpoint Streamable HTTP. Compatibility with older protocol revisions, standalone HTTP+SSE (`/sse`), and `Content-Length` framing has been removed.
|
|
@@ -41,7 +41,7 @@ When HTTP is enabled, the process serves both stdio and HTTP. Use `--version` or
|
|
|
41
41
|
|
|
42
42
|
## Protocol Negotiation
|
|
43
43
|
|
|
44
|
-
Protocol selection is automatic. The gateway and its downstream clients negotiate MCP `2026-07-28` first and use `2025-06-18` when the peer supports only that standard revision. These are the only accepted protocol revisions.
|
|
44
|
+
Protocol selection is automatic. The gateway and its downstream clients negotiate MCP `2026-07-28` first and use `2025-06-18` when the peer supports only that standard revision. These are the only accepted protocol revisions. Inbound Streamable HTTP response shaping is selected automatically by the official SDK.
|
|
45
45
|
|
|
46
46
|
## Service Configuration
|
|
47
47
|
|
package/README_zh.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
MCP Gateway 是一个节省 token 的 Model Context Protocol 网关。它不把所有下游工具展开到每个客户端的启动上下文,而是通过 6 个稳定工具完成发现、管理和转发。
|
|
6
6
|
|
|
7
|
-
MCP Gateway v0.6.
|
|
7
|
+
MCP Gateway v0.6.1 使用官方 TypeScript SDK v2。
|
|
8
8
|
|
|
9
9
|
> [!IMPORTANT]
|
|
10
10
|
> v0.6.0 及后续版本仅支持 MCP `2026-07-28` 和 `2025-06-18`,传输方式仅支持标准换行分隔 stdio 和单端点 Streamable HTTP。已移除对更早协议版本、独立 HTTP+SSE(`/sse`)和 `Content-Length` framing 的兼容支持。
|
|
@@ -41,7 +41,7 @@ mcp-gateway-service --config ./config.json --http --host 127.0.0.1 --port 3100 -
|
|
|
41
41
|
|
|
42
42
|
## 协议协商
|
|
43
43
|
|
|
44
|
-
协议选择完全自动:网关及其下游客户端优先协商 MCP `2026-07-28`,对端仅支持 `2025-06-18`
|
|
44
|
+
协议选择完全自动:网关及其下游客户端优先协商 MCP `2026-07-28`,对端仅支持 `2025-06-18` 时使用该标准版本。只接受这两个协议版本。入站 Streamable HTTP 的响应形态由官方 SDK 自动选择。
|
|
45
45
|
|
|
46
46
|
## 服务配置
|
|
47
47
|
|
package/dist/config.js
CHANGED
|
@@ -134,9 +134,6 @@ function validateHttpTransportConfig(serviceId, input) {
|
|
|
134
134
|
if (input.mode !== undefined) {
|
|
135
135
|
throw new Error(`Service '${serviceId}' transport.mode is no longer supported; HTTP always uses Streamable HTTP.`);
|
|
136
136
|
}
|
|
137
|
-
if (input.enableJsonResponse !== undefined) {
|
|
138
|
-
throw new Error(`Service '${serviceId}' transport.enableJsonResponse is no longer supported.`);
|
|
139
|
-
}
|
|
140
137
|
if (input.protocolMode !== undefined) {
|
|
141
138
|
throw new Error(`Service '${serviceId}' transport.protocolMode is no longer supported; protocol negotiation is automatic.`);
|
|
142
139
|
}
|
package/dist/http-server.js
CHANGED
|
@@ -26,7 +26,6 @@ export class StreamableHttpGatewayServer {
|
|
|
26
26
|
this.logger = logger;
|
|
27
27
|
this.handler = createMcpHandler(() => createGatewayMcpServer(engine), {
|
|
28
28
|
legacy: "stateless",
|
|
29
|
-
responseMode: config.enableJsonResponse ? "json" : "auto",
|
|
30
29
|
onerror: (error) => {
|
|
31
30
|
this.logger.error("gateway.http_protocol_error", { message: error.message });
|
|
32
31
|
}
|
|
@@ -66,8 +65,7 @@ export class StreamableHttpGatewayServer {
|
|
|
66
65
|
this.logger.info("gateway.http_started", {
|
|
67
66
|
host: this.config.host,
|
|
68
67
|
port: this.config.port,
|
|
69
|
-
path: this.config.path
|
|
70
|
-
responseMode: this.config.enableJsonResponse ? "json" : "auto"
|
|
68
|
+
path: this.config.path
|
|
71
69
|
});
|
|
72
70
|
}
|
|
73
71
|
/**
|
package/dist/index.js
CHANGED
|
@@ -123,7 +123,6 @@ export function parseCliArgs(args) {
|
|
|
123
123
|
const host = readOption(args, "--host");
|
|
124
124
|
const path = readHttpPathOption(args);
|
|
125
125
|
const enableHttp = args.includes("--http");
|
|
126
|
-
const enableJsonResponse = args.includes("--json-response");
|
|
127
126
|
return {
|
|
128
127
|
configPath,
|
|
129
128
|
server: enableHttp
|
|
@@ -131,8 +130,7 @@ export function parseCliArgs(args) {
|
|
|
131
130
|
enable: true,
|
|
132
131
|
host: host ?? "127.0.0.1",
|
|
133
132
|
port: port ?? 3000,
|
|
134
|
-
path: path ?? "/mcp"
|
|
135
|
-
enableJsonResponse
|
|
133
|
+
path: path ?? "/mcp"
|
|
136
134
|
}
|
|
137
135
|
: undefined
|
|
138
136
|
};
|
package/package.json
CHANGED