fix(node): make hono an optional peer dependency (#1896)

This commit is contained in:
Felix Weinberger 2026-04-28 14:47:38 +01:00 • committed by GitHub
commit 5433f40597
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 10 additions and 0 deletions

View file

@ -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.

View file

@ -49,6 +49,11 @@
"@modelcontextprotocol/server": "workspace:^",
"hono": "catalog:runtimeServerOnly"
},
"peerDependenciesMeta": {
"hono": {
"optional": true
}
},
"devDependencies": {
"@modelcontextprotocol/server": "workspace:^",
"@modelcontextprotocol/core": "workspace:^",