Skip to content

Add resilient Streamable HTTP MCP transport - #9

Merged
wrightpt merged 1 commit into
mainfrom
agent/streamable-http-mcp-v1
Jul 14, 2026
Merged

wrightpt merged 1 commit into
mainfrom
agent/streamable-http-mcp-v1

Conversation

@wrightpt

Copy link
Copy Markdown
Owner

What changed

  • Add a stateless Streamable HTTP MCP endpoint at /mcp that proxies the existing AgentMemory engine instead of creating a fallback memory store.
  • Keep the default listener loopback-only, validate Host and Origin headers, support an optional listener bearer token, and require both explicit opt-in and authentication for remote binds.
  • Expose the transport through the AgentMemory CLI and MCP shim, package dist/http.mjs, document configuration, and cover the protocol with the official MCP SDK client.

Why

A Codex process can remain alive after its stdio MCP transport has closed, but that connection cannot be rebuilt inside the same process. A supervised stateless HTTP endpoint gives a forked or newly started client a clean reconnect path while preserving the single shared AgentMemory engine.

Validation

  • npm run build
  • npm test - 141 files, 1,475 tests passed
  • npm pack --dry-run --json --ignore-scripts - includes dist/http.mjs
  • Official MCP SDK client exercised list/call and a read-only memory_next request against the live engine
  • Disposable real-Codex fork completed memory_next through this endpoint without Transport closed

@wrightpt
wrightpt marked this pull request as ready for review July 14, 2026 02:58
@wrightpt
wrightpt merged commit 32b1ad8 into main Jul 14, 2026
@wrightpt
wrightpt deleted the agent/streamable-http-mcp-v1 branch July 14, 2026 03:05
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