Skip to content

Add MCP Comms Relay specification and research - #217

Draft
nsheaps wants to merge 3 commits into
mainfrom
claude/sweet-babbage-m3Hjr
Draft

Add MCP Comms Relay specification and research#217
nsheaps wants to merge 3 commits into
mainfrom
claude/sweet-babbage-m3Hjr

Conversation

@nsheaps

@nsheaps nsheaps commented May 30, 2026

Copy link
Copy Markdown
Owner

Summary

This PR introduces the specification and research documentation for the MCP Comms Relay — a publicly reachable relay service that enables two AI agents on opposite sides of a network boundary to exchange messages without either running a public server.

Changes

  • docs/specs/draft/mcp-comms-relay.md — Complete specification (v0.1.0) covering:

    • Problem statement: enabling message exchange between claude.ai and local Claude Code agents without public exposure
    • Design architecture: symmetric MCP client topology with a central dial-out relay behind cloudflared
    • Five core MCP tools: advertise, discover, handshake, send, receive (long-poll)
    • OAuth 2.1 + PKCE S256 requirements for claude.ai custom connector integration
    • Docker + docker-compose deployment pattern mirroring portainer-stacks conventions
    • Acceptance criteria (8 scenarios covering OAuth discovery, peer handshake, message flow, presence expiry, and stack deployment)
    • Four-phase implementation roadmap (scaffold → relay core → OAuth layer → containerization, with optional Phase 4 connector helper)
  • docs/research/mcp-comms-relay-requirements.md — Research grounding document covering:

    • claude.ai custom connector requirements (Streamable HTTP, OAuth 2.1 + PKCE S256, callback URL)
    • MCP authorization flow and required endpoints (PRM, AS metadata, DCR, token)
    • Practical limits (tool result size, timeouts) that shape the relay design
    • MCP TypeScript SDK guidance (@modelcontextprotocol/sdk v1.x, StreamableHTTPServerTransport)
    • Deployment decision rationale (self-hosted container + cloudflared vs. Cloudflare Workers)
    • Open design questions resolved in the spec

Implementation Notes

  • Scope: MVP is single-user, single-room, in-memory broker; file sharing, multi-user, and persistence are explicitly deferred
  • Audience: Handler (Nate) and engineers implementing the relay
  • Phasing: Phase 0 (this PR) establishes the spec; Phase 1 builds the authless relay core; Phase 2 adds OAuth; Phase 3 containerizes and deploys
  • Location: Service will be authored in nsheaps/agents at services/mcp-comms-relay/ with a droppable docker-compose stack

https://claude.ai/code/session_01746yPFhHs256Qvnp54hEH3

claude and others added 3 commits May 30, 2026 01:24
Grounding research for a self-hosted MCP comms relay (Docker + cloudflared)
to be added to claude.ai as a custom connector. Captures the OAuth 2.1/PKCE
Streamable-HTTP requirements, the RFC 8414/9728/7591 discovery chain, tool
result/timeout limits, MCP TS SDK notes, and the deployment decision.

https://claude.ai/code/session_01746yPFhHs256Qvnp54hEH3
Adds the design spec for a publicly-reachable MCP rendezvous + broker that
two AI agents (claude.ai custom connector + local Claude Code) dial out to
in order to advertise, discover, handshake, and exchange messages. Covers
OAuth 2.1 + PKCE for connector compatibility, the relay tool protocol, and
a cloudflared + 1Password deployment that mirrors the portainer-stacks
pattern. File sharing is explicitly deferred. Phased for incremental
sign-off before any implementation code.

https://claude.ai/code/session_01746yPFhHs256Qvnp54hEH3
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.

2 participants