From b423b09f326d210782ba5ba1c9c2a0f9c1275d1f Mon Sep 17 00:00:00 2001 From: Felix Weinberger Date: Wed, 15 Apr 2026 11:57:35 +0000 Subject: [PATCH] fix(node): mark hono peer dependency as optional @modelcontextprotocol/node only uses getRequestListener from @hono/node-server, which does not require the hono framework at runtime. Consumers no longer need to install hono to use NodeStreamableHTTPServerTransport. @hono/node-server itself still hard-peers on hono, so a warning may remain (upstream). --- .changeset/hono-peer-optional.md | 5 +++++ packages/middleware/node/package.json | 5 +++++ 2 files changed, 10 insertions(+) create mode 100644 .changeset/hono-peer-optional.md diff --git a/.changeset/hono-peer-optional.md b/.changeset/hono-peer-optional.md new file mode 100644 index 000000000..2f6a3ef5f --- /dev/null +++ b/.changeset/hono-peer-optional.md @@ -0,0 +1,5 @@ +--- +'@modelcontextprotocol/node': patch +--- + +Mark `hono` peer dependency as optional. `@modelcontextprotocol/node` only uses `getRequestListener` from `@hono/node-server` (Node HTTP ↔ Web Standard conversion), which does not require the `hono` framework at runtime. Consumers no longer need to install `hono` to use `NodeStreamableHTTPServerTransport`. Note: `@hono/node-server` itself still declares `hono` as a hard peer, so package managers may emit a warning; this is upstream and harmless for `getRequestListener`-only usage. diff --git a/packages/middleware/node/package.json b/packages/middleware/node/package.json index 7fcaf9106..17a17f083 100644 --- a/packages/middleware/node/package.json +++ b/packages/middleware/node/package.json @@ -49,6 +49,11 @@ "@modelcontextprotocol/server": "workspace:^", "hono": "catalog:runtimeServerOnly" }, + "peerDependenciesMeta": { + "hono": { + "optional": true + } + }, "devDependencies": { "@modelcontextprotocol/server": "workspace:^", "@modelcontextprotocol/core": "workspace:^",