From f22b26c881eb724d69f8713588b7a83fc7155e44 Mon Sep 17 00:00:00 2001 From: Felix Weinberger <3823880+felixweinberger@users.noreply.github.com> Date: Fri, 23 Oct 2026 15:25:57 +0000 Subject: [PATCH 1/2] chore(node): accept @hono/node-server 1.x or 2.x Fixes #3022. `@modelcontextprotocol/node` imports one function from `@hono/node-server`, `getRequestListener`. The range widens from `^1.19.9` to `^1.19.9 || ^2.1.3`: a new install resolves 2.x, and an install that cannot get 2.x keeps 1.x, so no minimum moves. v1.x already accepts both majors. The lockfile moves to 2.1.5. The node adapter tests pass on 1.19.11 and on 2.1.5; the integration and e2e suites pass on 2.1.5. --- .changeset/node-hono-node-server-range.md | 5 ++ pnpm-lock.yaml | 60 +++++++++++++---------- pnpm-workspace.yaml | 2 +- 3 files changed, 41 insertions(+), 26 deletions(-) create mode 100644 .changeset/node-hono-node-server-range.md diff --git a/.changeset/node-hono-node-server-range.md b/.changeset/node-hono-node-server-range.md new file mode 100644 index 0000000000..64b1959d3e --- /dev/null +++ b/.changeset/node-hono-node-server-range.md @@ -0,0 +1,5 @@ +--- +'@modelcontextprotocol/node': patch +--- + +The `@hono/node-server` dependency range widens from `^1.19.9` to `^1.19.9 || ^2.1.3`, so a new install resolves to 2.x and an install that cannot get 2.x keeps 1.x. diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 5369810c7c..efa371d234 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -96,8 +96,8 @@ catalogs: version: 6.2.2 runtimeServerOnly: '@hono/node-server': - specifier: ^1.19.9 - version: 1.19.11 + specifier: ^1.19.9 || ^2.1.3 + version: 2.1.5 cors: specifier: ^2.8.5 version: 2.8.6 @@ -306,7 +306,7 @@ importers: dependencies: '@hono/node-server': specifier: catalog:runtimeServerOnly - version: 1.19.11(hono@4.12.9) + version: 2.1.5(hono@4.12.9) '@mcp-examples/shared': specifier: workspace:^ version: link:shared @@ -432,7 +432,7 @@ importers: dependencies: '@hono/node-server': specifier: catalog:runtimeServerOnly - version: 1.19.11(hono@4.12.9) + version: 2.1.5(hono@4.12.9) '@mcp-examples/shared': specifier: workspace:* version: link:../shared @@ -504,7 +504,7 @@ importers: dependencies: '@hono/node-server': specifier: catalog:runtimeServerOnly - version: 1.19.11(hono@4.12.9) + version: 2.1.5(hono@4.12.9) '@mcp-examples/shared': specifier: workspace:* version: link:../shared @@ -529,7 +529,7 @@ importers: dependencies: '@hono/node-server': specifier: catalog:runtimeServerOnly - version: 1.19.11(hono@4.12.9) + version: 2.1.5(hono@4.12.9) '@mcp-examples/shared': specifier: workspace:* version: link:../shared @@ -551,7 +551,7 @@ importers: dependencies: '@hono/node-server': specifier: catalog:runtimeServerOnly - version: 1.19.11(hono@4.12.9) + version: 2.1.5(hono@4.12.9) '@mcp-examples/shared': specifier: workspace:* version: link:../shared @@ -598,7 +598,7 @@ importers: dependencies: '@hono/node-server': specifier: catalog:runtimeServerOnly - version: 1.19.11(hono@4.12.9) + version: 2.1.5(hono@4.12.9) '@mcp-examples/shared': specifier: workspace:* version: link:../shared @@ -642,7 +642,7 @@ importers: dependencies: '@hono/node-server': specifier: catalog:runtimeServerOnly - version: 1.19.11(hono@4.12.9) + version: 2.1.5(hono@4.12.9) '@mcp-examples/shared': specifier: workspace:* version: link:../shared @@ -667,7 +667,7 @@ importers: dependencies: '@hono/node-server': specifier: catalog:runtimeServerOnly - version: 1.19.11(hono@4.12.9) + version: 2.1.5(hono@4.12.9) '@mcp-examples/shared': specifier: workspace:* version: link:../shared @@ -726,7 +726,7 @@ importers: dependencies: '@hono/node-server': specifier: catalog:runtimeServerOnly - version: 1.19.11(hono@4.12.9) + version: 2.1.5(hono@4.12.9) '@mcp-examples/shared': specifier: workspace:* version: link:../shared @@ -810,7 +810,7 @@ importers: dependencies: '@hono/node-server': specifier: catalog:runtimeServerOnly - version: 1.19.11(hono@4.12.9) + version: 2.1.5(hono@4.12.9) '@mcp-examples/shared': specifier: workspace:* version: link:../shared @@ -835,7 +835,7 @@ importers: dependencies: '@hono/node-server': specifier: catalog:runtimeServerOnly - version: 1.19.11(hono@4.12.9) + version: 2.1.5(hono@4.12.9) '@mcp-examples/shared': specifier: workspace:* version: link:../shared @@ -894,7 +894,7 @@ importers: dependencies: '@hono/node-server': specifier: catalog:runtimeServerOnly - version: 1.19.11(hono@4.12.9) + version: 2.1.5(hono@4.12.9) '@mcp-examples/shared': specifier: workspace:* version: link:../shared @@ -916,7 +916,7 @@ importers: dependencies: '@hono/node-server': specifier: catalog:runtimeServerOnly - version: 1.19.11(hono@4.12.9) + version: 2.1.5(hono@4.12.9) '@mcp-examples/shared': specifier: workspace:* version: link:../shared @@ -941,7 +941,7 @@ importers: dependencies: '@hono/node-server': specifier: catalog:runtimeServerOnly - version: 1.19.11(hono@4.12.9) + version: 2.1.5(hono@4.12.9) '@mcp-examples/shared': specifier: workspace:* version: link:../shared @@ -1092,7 +1092,7 @@ importers: dependencies: '@hono/node-server': specifier: catalog:runtimeServerOnly - version: 1.19.11(hono@4.12.9) + version: 2.1.5(hono@4.12.9) '@mcp-examples/shared': specifier: workspace:* version: link:../shared @@ -1170,7 +1170,7 @@ importers: dependencies: '@hono/node-server': specifier: catalog:runtimeServerOnly - version: 1.19.11(hono@4.12.9) + version: 2.1.5(hono@4.12.9) '@mcp-examples/shared': specifier: workspace:* version: link:../shared @@ -1195,7 +1195,7 @@ importers: dependencies: '@hono/node-server': specifier: catalog:runtimeServerOnly - version: 1.19.11(hono@4.12.9) + version: 2.1.5(hono@4.12.9) '@mcp-examples/shared': specifier: workspace:* version: link:../shared @@ -1220,7 +1220,7 @@ importers: dependencies: '@hono/node-server': specifier: catalog:runtimeServerOnly - version: 1.19.11(hono@4.12.9) + version: 2.1.5(hono@4.12.9) '@mcp-examples/shared': specifier: workspace:* version: link:../shared @@ -1245,7 +1245,7 @@ importers: dependencies: '@hono/node-server': specifier: catalog:runtimeServerOnly - version: 1.19.11(hono@4.12.9) + version: 2.1.5(hono@4.12.9) '@mcp-examples/shared': specifier: workspace:* version: link:../shared @@ -1270,7 +1270,7 @@ importers: dependencies: '@hono/node-server': specifier: catalog:runtimeServerOnly - version: 1.19.11(hono@4.12.9) + version: 2.1.5(hono@4.12.9) '@mcp-examples/shared': specifier: workspace:* version: link:../shared @@ -1292,7 +1292,7 @@ importers: dependencies: '@hono/node-server': specifier: catalog:runtimeServerOnly - version: 1.19.11(hono@4.12.9) + version: 2.1.5(hono@4.12.9) '@mcp-examples/shared': specifier: workspace:* version: link:../shared @@ -1753,7 +1753,7 @@ importers: dependencies: '@hono/node-server': specifier: catalog:runtimeServerOnly - version: 1.19.11(hono@4.12.9) + version: 2.1.5(hono@4.12.9) hono: specifier: catalog:runtimeServerOnly version: 4.12.9 @@ -2017,7 +2017,7 @@ importers: devDependencies: '@hono/node-server': specifier: catalog:runtimeServerOnly - version: 1.19.11(hono@4.12.9) + version: 2.1.5(hono@4.12.9) '@modelcontextprotocol/client': specifier: workspace:^ version: link:../../packages/client @@ -3059,6 +3059,12 @@ packages: peerDependencies: hono: ^4 + '@hono/node-server@2.1.5': + resolution: {integrity: sha512-MgP/I06GdvsilDspMk/qmRzpk8LOUStP6jFAbSRi40W09DhoyUn+Mj7eyKICPqeYKybOjVFLVIAQzvu1bfIa7Q==} + engines: {node: '>=20'} + peerDependencies: + hono: ^4 || ^5.0.0-0 + '@humanfs/core@0.19.1': resolution: {integrity: sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==} engines: {node: '>=18.18.0'} @@ -7732,6 +7738,10 @@ snapshots: dependencies: hono: 4.12.9 + '@hono/node-server@2.1.5(hono@4.12.9)': + dependencies: + hono: 4.12.9 + '@humanfs/core@0.19.1': {} '@humanfs/node@0.16.7': diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 73c94daf91..64875347ec 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -40,7 +40,7 @@ catalogs: eventsource-parser: ^3.0.8 jose: ^6.1.3 runtimeServerOnly: - '@hono/node-server': ^1.19.9 + '@hono/node-server': ^1.19.9 || ^2.1.3 cors: ^2.8.5 express: ^5.2.1 fastify: ^5.2.0 From 21b40a76924293ce26dcfb01bbb0924b290c6c7f Mon Sep 17 00:00:00 2001 From: Felix Weinberger <3823880+felixweinberger@users.noreply.github.com> Date: Fri, 23 Oct 2026 16:33:00 +0000 Subject: [PATCH 2/2] docs: let a runtime range span two majors in the dependency policy --- DEPENDENCY_POLICY.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPENDENCY_POLICY.md b/DEPENDENCY_POLICY.md index 6be03850f3..1d74b5b7de 100644 --- a/DEPENDENCY_POLICY.md +++ b/DEPENDENCY_POLICY.md @@ -30,6 +30,6 @@ Dependencies are only updated when there is a concrete reason, not simply becaus ## Pinning and Ranges -Ranges shared by more than one package live in the pnpm workspace catalogs (`pnpm-workspace.yaml`), so a version is declared once. Runtime dependencies use caret ranges (`^`) to allow compatible updates within a major version; exact versions of third-party runtime dependencies are pinned only when necessary to work around a specific issue. Dependencies between the SDK's own packages (`workspace:*`) publish as exact pins by design, so a released `client` or `server` always resolves the `core` it was built against. Framework integrations (`express`, `hono`, `fastify`) declare the framework as a peer dependency rather than bundling a copy. +Ranges shared by more than one package live in the pnpm workspace catalogs (`pnpm-workspace.yaml`), so a version is declared once. Runtime dependencies use caret ranges (`^`) to allow compatible updates within a major version, and a range may span two majors when the SDK works on both; exact versions of third-party runtime dependencies are pinned only when necessary to work around a specific issue. Dependencies between the SDK's own packages (`workspace:*`) publish as exact pins by design, so a released `client` or `server` always resolves the `core` it was built against. Framework integrations (`express`, `hono`, `fastify`) declare the framework as a peer dependency rather than bundling a copy. Runtime dependencies of published packages are kept to a minimum; adding one is a significant change under the discuss-before-you-code rule in `CONTRIBUTING.md`.