docs: design v0.4.0 HTTP MCP transport and auth#23
Conversation
First step toward v0.4.0 (HTTP MCP transport + auth). Docs only — no runtime change. Stdio remains the default. All v0.3.0 safety behavior is unchanged: confirmation gate, origin pinning, target- origin allowlist, audit redaction, loopback default, simulated destructive demo actions. Adds: - docs/designs/http-mcp-transport-auth.md — full design doc covering transport modes, env vars, bearer-auth model, Origin validation, host binding, shared dispatcher architecture, audit-event extension, testing plan, migration plan, decision log. - docs/adr/0001-http-mcp-transport.md — companion ADR. - docs/issues/v0.4.0-http-transport-auth.md — in-tree mirror of the GitHub tracking issue (#22) so future PRs can link to a stable path. - apps/mcp-server/src/transports/README.md — empty landing pad for the implementation PRs. Not imported anywhere; tsup does not pick it up; the published mcp-server tarball is unchanged (verified via npm run pack:dry-run). Updates: - docs/roadmap.md — v0.3.0 marked shipped; v0.4.0 design line marked in flight. - docs/v1-readiness.md — status block reflects v0.3.0 published + v0.4.0 in flight; criteria #8 and #9 marked design complete. - docs/threat-model.md — T14 ("Future HTTP transport risks") links to the design and lists the concrete mitigations the design commits to. - docs/production-readiness.md — "MCP HTTP mode (planned)" becomes "designed; implementation pending" with headline properties. - docs/security-configuration.md — adds a forthcoming-env-vars section for AGENTBRIDGE_HTTP_*; keeps the v0.3.0 table intact. - README.md / AGENTS.md / CLAUDE.md — status reflects v0.3.0 shipped + v0.4.0 design in flight; references to the new design doc and ADR added. Verification: - npm run typecheck:clean — green - npm test — 121/121 green on Node 24 - npm run build — all six packages OK - npm run pack:dry-run — all six tarballs OK at 0.3.0; no file- count changes (the source-tree transports/README.md is excluded from the published tarball) No package versions bumped: this is a design PR. Versions move to 0.4.0 in the follow-up implementation PR series per the design's migration plan. Refs #22. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0c43aba3af
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| anything outside `{127.0.0.1, ::1, localhost, 0.0.0.0}` as | ||
| potentially public. `0.0.0.0` is conservatively treated as |
There was a problem hiding this comment.
Clarify 0.0.0.0 handling in public-bind predicate
This rule is internally inconsistent: it first describes hosts outside {127.0.0.1, ::1, localhost, 0.0.0.0} as potentially public, then immediately says 0.0.0.0 is treated as public. If implementation follows the set membership literally, wildcard bind can be misclassified and skip the startup fail-hard checks for auth/origin. Please rewrite this as an unambiguous predicate (e.g., loopback-only allowlist, with 0.0.0.0 explicitly non-loopback/public).
Useful? React with 👍 / 👎.
| fail hard. Public bind without an Origin allowlist must warn or | ||
| fail depending on mode. |
There was a problem hiding this comment.
Align public-bind Origin requirement with ADR/design
This requirement says missing AGENTBRIDGE_HTTP_ALLOWED_ORIGINS on public bind may "warn or fail," but the new ADR/design in this same commit commit to fail-hard behavior for public bind without an Origin allowlist. Keeping a weaker requirement in the tracking issue creates conflicting guidance for implementation PRs and can lead to shipping a warning-only path that weakens the intended security posture.
Useful? React with 👍 / 👎.
First step toward v0.4.0 — opt-in HTTP MCP transport with
authentication and Origin validation. Docs only. No runtime
change. stdio remains the default.
Refs #22.
Summary
docs/designs/http-mcp-transport-auth.mdcovering transport modes, env vars, bearer-auth model, Origin /
CORS rules, host binding, the shared dispatcher architecture
(
createMcpServer()factory), audit-event extension, testingplan, migration plan, decision log, and open questions.
docs/adr/0001-http-mcp-transport.md.docs/issues/v0.4.0-http-transport-auth.mdso future PRs can link to a stable path even if issue v0.4.0 — HTTP MCP transport + auth #22 ever
gets renumbered.
apps/mcp-server/src/transports/README.md— empty landing pad for the implementation PRs. Not imported
anywhere; tsup does not pick it up; the published tarball is
unchanged (verified via
npm run pack:dry-run).docs/roadmap.md— v0.3.0 markedshipped; v0.4.0 design line marked in flight.
docs/v1-readiness.md—status block reflects v0.3.0 published + v0.4.0 in flight;
criteria build(deps): bump zod from 3.25.76 to 4.3.6 #8 and build(deps): bump marked from 14.1.4 to 18.0.2 #9 marked design-complete.
docs/threat-model.md— T14("Future HTTP transport risks") links to the design and lists
the concrete mitigations the design commits to.
docs/production-readiness.md— "MCP HTTP mode (planned)" becomes "designed; implementation
pending" with headline properties.
docs/security-configuration.md— adds a forthcoming-env-vars section for
AGENTBRIDGE_HTTP_*;keeps the v0.3.0 table intact.
README.md/AGENTS.md/CLAUDE.md— status reflects v0.3.0 shipped +v0.4.0 design in flight; references to the new design doc and
ADR added.
What this PR is not
is bit-for-bit unchanged.
versions move to
0.4.0in the follow-up implementation PRseries — not now.
target-origin allowlist, audit redaction, loopback default,
simulated destructive demo actions — all unchanged.
Verification commands
Test plan
npm run typecheck:cleanpasses locally.npm test— 121/121 tests pass locally.npm run build— all six publishable packages build.npm run pack:dry-run— all six tarballs OK at 0.3.0; nofile-count changes (the source-tree
apps/mcp-server/src/transports/README.mdis correctlyexcluded from the published tarball per the package's
filesallowlist).Recommended follow-ups (not part of this PR)
Per the migration plan in the design doc:
createMcpServer()factory inapps/mcp-server/src/server.tsand refactor the stdio entry to call it. Zero behavior change.
StreamableHTTPServerTransportfrom@modelcontextprotocol/sdkbehind auth + Origin + bindchecks; add the
AGENTBRIDGE_HTTP_*env vars.examples/http-client-config/, security-configuration table,updated mcp-client-setup recipes.
🤖 Generated with Claude Code