Skip to content

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

Draft
felixweinberger wants to merge 1 commit intomainfrom
fweinberger/v2-bc-hono-peer
Draft

fix(node): make hono an optional peer dependency#1896
felixweinberger wants to merge 1 commit intomainfrom
fweinberger/v2-bc-hono-peer

Conversation

@felixweinberger
Copy link
Copy Markdown
Contributor

Part of the v2 backwards-compatibility series — see reviewer guide.

@modelcontextprotocol/node peers on hono but doesn't import it directly (@hono/node-server does). Making it optional removes the unmet-peer warning for the common case.

Motivation and Context

@modelcontextprotocol/node peers on hono but doesn't import it directly (@hono/node-server does). Making it optional removes the unmet-peer warning for the common case.

v1 vs v2 pattern & evidence

v1 pattern:

n/a  `/node` package is new in v2

v2-native:

Same

Evidence: Confirmed getRequestListener works without hono installed.

How Has This Been Tested?

  • Existing /node tests (74/74)
  • Integration: validated bump-only against 5 OSS repos via the v2-bc-integration validation branch
  • pnpm typecheck:all && pnpm lint:all && pnpm test:all green

Breaking Changes

None — additive @deprecated shim. Removed in v3.

Types of changes

  • New feature (non-breaking change which adds functionality)

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added or updated documentation as needed

Additional context

Stacks on: none

@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).
@felixweinberger felixweinberger added the v2-bc v2 backwards-compatibility series label Apr 15, 2026
@felixweinberger felixweinberger added this to the v2.0.0-bc milestone Apr 15, 2026
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Apr 15, 2026

Open in StackBlitz

@modelcontextprotocol/client

npm i https://pkg.pr.new/@modelcontextprotocol/client@1896

@modelcontextprotocol/server

npm i https://pkg.pr.new/@modelcontextprotocol/server@1896

@modelcontextprotocol/express

npm i https://pkg.pr.new/@modelcontextprotocol/express@1896

@modelcontextprotocol/fastify

npm i https://pkg.pr.new/@modelcontextprotocol/fastify@1896

@modelcontextprotocol/hono

npm i https://pkg.pr.new/@modelcontextprotocol/hono@1896

@modelcontextprotocol/node

npm i https://pkg.pr.new/@modelcontextprotocol/node@1896

commit: b423b09

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

v2-bc v2 backwards-compatibility series

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant