You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add hosted HTTP MCP service as separate package #147
Add a separate hosted MCP service/package for remote Streamable HTTP MCP, e.g. deployed at mcp.relaycast.dev, instead of mounting MCP inside @relaycast/engine.
Proposed Shape
Create a package such as @relaycast/mcp-hosted.
Own the MCP Streamable HTTP transport/session handling in that package/service.
Use @relaycast/sdk underneath to call the Relaycast API, matching the local @relaycast/mcp behavior.
Deploy it as its own service/subdomain, e.g. https://mcp.relaycast.dev/mcp.
Why
The engine should stay focused on Relaycast API/realtime behavior. Not every engine consumer wants or needs MCP, and importing MCP transport/server code from the engine bloats Worker bundles and couples unrelated deployment surfaces.
A hosted MCP layer is still useful for Smithery-style remote MCP, marketplace distribution, OAuth/setup flows, analytics, and clientless install, but it should be composed outside the core engine.
Tradeoffs
This introduces an extra hop for tool calls:
MCP client -> hosted MCP service -> Relaycast API
That is acceptable initially because it keeps boundaries clean and dogfoods the public SDK/API. Later optimizations can use an internal Relaycast base URL or colocated deployment without moving MCP into the engine.
Closing as implemented — validated against current main (v6.0.5, f7e86a3). The two load-bearing asks are satisfied, with different packaging than proposed:
Hosted Streamable HTTP MCP exists: packages/mcp/src/transports.ts provides createHttpHandler(...), creating a StreamableHTTPServerTransport per session with a SessionLifecycle hook for multi-machine session registries (landed in v5.0.8, 0e1dadb). Deployed at https://cast.agentrelay.com/mcp and published to Smithery via deploy.yml.
SDK underneath: the MCP layer talks to the engine exclusively through @relaycast/sdk (createInternalRelayCast), never engine internals — the dogfooding boundary this issue asked for.
Engine stays clean: zero MCP/Streamable code in packages/engine — MCP was kept out of the engine as argued here.
Deviations from the exact proposal: the HTTP transport was folded into @relaycast/mcp alongside stdio rather than a separate @relaycast/mcp-hosted package, and it's served from the engine gateway host (cast.agentrelay.com/mcp) rather than a dedicated mcp.relaycast.dev subdomain. Extracting it into its own package/domain remains possible later since the transport already sits behind the SDK boundary, but the architectural goal here is met.
Activity
willwashburn commentedon Jul 13, 2026
Closing as implemented — validated against current
main(v6.0.5,f7e86a3). The two load-bearing asks are satisfied, with different packaging than proposed:packages/mcp/src/transports.tsprovidescreateHttpHandler(...), creating aStreamableHTTPServerTransportper session with aSessionLifecyclehook for multi-machine session registries (landed in v5.0.8,0e1dadb). Deployed athttps://cast.agentrelay.com/mcpand published to Smithery viadeploy.yml.@relaycast/sdk(createInternalRelayCast), never engine internals — the dogfooding boundary this issue asked for.packages/engine— MCP was kept out of the engine as argued here.Deviations from the exact proposal: the HTTP transport was folded into
@relaycast/mcpalongside stdio rather than a separate@relaycast/mcp-hostedpackage, and it's served from the engine gateway host (cast.agentrelay.com/mcp) rather than a dedicatedmcp.relaycast.devsubdomain. Extracting it into its own package/domain remains possible later since the transport already sits behind the SDK boundary, but the architectural goal here is met.Generated by Claude Code