Skip to content

Commit b423b09

Browse files
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).
1 parent 9ed62fe commit b423b09

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

.changeset/hono-peer-optional.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@modelcontextprotocol/node': patch
3+
---
4+
5+
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.

packages/middleware/node/package.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,11 @@
4949
"@modelcontextprotocol/server": "workspace:^",
5050
"hono": "catalog:runtimeServerOnly"
5151
},
52+
"peerDependenciesMeta": {
53+
"hono": {
54+
"optional": true
55+
}
56+
},
5257
"devDependencies": {
5358
"@modelcontextprotocol/server": "workspace:^",
5459
"@modelcontextprotocol/core": "workspace:^",

0 commit comments

Comments
 (0)