docs: make DNS rebinding protection more prominent in server.md#1586
Merged
docs: make DNS rebinding protection more prominent in server.md#1586
Conversation
- Add WARNING callout after the first Streamable HTTP example noting that NodeStreamableHTTPServerTransport does not include DNS rebinding protection - Link to createMcpExpressApp()/createMcpHonoApp() as recommended alternatives - Expand the DNS rebinding section with context on the attack vector - Mention createMcpHonoApp() for Web Standard runtimes - Add guidance for custom framework users to implement Host header validation Closes PCP-57
|
@modelcontextprotocol/client
@modelcontextprotocol/server
@modelcontextprotocol/express
@modelcontextprotocol/hono
@modelcontextprotocol/node
commit: |
felixweinberger
previously approved these changes
Feb 25, 2026
Replace the minimal stateful example (which wasn't self-contained anyway) with a minimal stateless example using createMcpExpressApp(), which includes DNS rebinding protection by default. Link to simpleStreamableHttp.ts for the full stateful pattern.
jenn-newton
reviewed
Feb 25, 2026
pcarleton
commented
Feb 26, 2026
jenn-newton
approved these changes
Feb 26, 2026
felixweinberger
approved these changes
Feb 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Make DNS rebinding protection guidance more prominent in
docs/server.mdto help developers secure localhost MCP servers.Changes
Added WARNING callout after the first Streamable HTTP example (
NodeStreamableHTTPServerTransport) with links to the recommended alternatives.Expanded DNS rebinding section with:
createMcpHonoApp()for Hono/Web Standard runtimes alongside the existing Express example