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:^",