Transports

How Relay communicates with MCP servers.

The Model Context Protocol (MCP) defines "transports" as the communication details for exchanging JSON-RPC messages between clients and servers. Relay currently supports the standard Stdio transport and validates SSE (Server-Sent Events).

1. Stdio (Standard Input/Output)

This is the most common transport for local servers. Relay spawns the server as a child process (e.g., `node server.js` or `python server.py`) and communicates via `stdin` and `stdout`.

  • Speed: Extremely fast, no network overhead.
  • Security: Runs locally on your machine.
  • Configuration: Requires a command (executable) and args (arguments).

2. SSE (Server-Sent Events)

SSE is used for remote servers or servers running over HTTP.

  • Use Case: Connecting to a server running on a Docker container or a remote cloud instance.
  • Configuration: Requires a URL (e.g., `http://localhost:8000/sse`).
  • Note: SSE support in Relay's UI is currently in beta via the Inspector.