MCP Servers

Servers are the bridge between your AI and your data.

In the Model Context Protocol (MCP) architecture, a Server is a standalone process that provides tools, resources, or prompts to a Client (like Claude).

Types of Servers

  • Stdio Servers: These run as local processes/commands (e.g., `npx`, `python`, `docker`). Relay runs these directly on your machine. This is the most common type.
  • SSE Servers: These run over HTTP using Server-Sent Events. Useful for remote servers. (Relay validates these via the Inspector).

Configuration

Relay stores the configuration for each server locally in a SQLite database. A server configuration consists of:

  • Command: The executable to run (e.g., `node`, `python`, `uv`).
  • Arguments: List of flags and script paths (e.g., `build/index.js`, `--verbose`).
  • Environment Variables: Key-value pairs like `API_KEY` or `DATABASE_URL`.

Security Model

Relay prioritizes security by ensuring environment variables marked as Secret are never stored in plain text. When you run a server, Relay fetches the secret from your OS keychain and injects it into the process memory only for the duration of the session.