Skip to content

docs: design v0.4.0 HTTP MCP transport and auth#23

Merged
marmar9615-cloud merged 1 commit intomainfrom
feature/v040-http-transport-design
Apr 28, 2026
Merged

docs: design v0.4.0 HTTP MCP transport and auth#23
marmar9615-cloud merged 1 commit intomainfrom
feature/v040-http-transport-design

Conversation

@marmar9615-cloud
Copy link
Copy Markdown
Owner

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

What this PR is not

  • No HTTP server implementation. The runtime stdio behavior
    is bit-for-bit unchanged.
  • No package version bump. Per the design's migration plan,
    versions move to 0.4.0 in the follow-up implementation PR
    series — not now.
  • No npm publish. No tag. No GitHub release.
  • Dependabot PRs untouched. No merges, no edits.
  • No safety regression. Confirmation gate, origin pinning,
    target-origin allowlist, audit redaction, loopback default,
    simulated destructive demo actions — all unchanged.

Verification commands

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

Test plan

  • npm run typecheck:clean passes 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; no
    file-count changes (the source-tree
    apps/mcp-server/src/transports/README.md is correctly
    excluded from the published tarball per the package's
    files allowlist).
  • CI (Node 20.x and 22.x) green on this PR.
  • Main CI green after merge.

Recommended follow-ups (not part of this PR)

Per the migration plan in the design doc:

  1. Implementation PR 1 — transport abstraction. Extract a
    createMcpServer() factory in apps/mcp-server/src/server.ts
    and refactor the stdio entry to call it. Zero behavior change.
  2. Implementation PR 2 — HTTP transport + bearer auth. Wire
    StreamableHTTPServerTransport from
    @modelcontextprotocol/sdk behind auth + Origin + bind
    checks; add the AGENTBRIDGE_HTTP_* env vars.
  3. Implementation PR 3 — docs / examples / smoke tests.
    examples/http-client-config/, security-configuration table,
    updated mcp-client-setup recipes.

🤖 Generated with Claude Code

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>
@marmar9615-cloud marmar9615-cloud merged commit c38dd17 into main Apr 28, 2026
2 checks passed
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment on lines +296 to +297
anything outside `{127.0.0.1, ::1, localhost, 0.0.0.0}` as
potentially public. `0.0.0.0` is conservatively treated as
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Comment on lines +41 to +42
fail hard. Public bind without an Origin allowlist must warn or
fail depending on mode.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant