Agent Relay — Claude Code MCP server: what it does, how to install
This MCP server lets an agent place files in an encrypted inbox and wait for human approval. Use it for reviewed deliveries and email drafts.
claude mcp add --env ARELAY_TOKEN=<ARELAY_TOKEN> --env ARELAY_URL=<ARELAY_URL> --transport stdio agent-relay -- npx -y @arelay/cliWhat Agent Relay does
Agent Relay gives Claude Code an MCP connection to a private inbox. The available tools can deliver files, list inbox sessions, and submit an email draft for review. A person approves actions that should send or charge before they proceed.
Set up encryption in the portal and create an agent token under Account → Agent tokens. The MCP process runs with npx -y @arelay/cli; a self-hosted deployment also needs ARELAY_URL. Without ARELAY_TOKEN, the server cannot access the inbox.
Encrypted deliveries are opened in the browser. Email review is different: the server handles the approved draft for delivery, and the recipient’s mail provider can access the message content.
What it helps with
- deliver a report to an agent inbox
- ask for approval before sending an email
- list current inbox sessions
- route an agent action through human review
Example prompts for the agent
- Send
report.mdto the inbox with the title “Q2 revenue report”. - List the current inbox sessions.
- Submit this email draft for human approval before sending it.
How to install Agent Relay
Platform CLI
claude mcp add --env ARELAY_TOKEN=<ARELAY_TOKEN> --env ARELAY_URL=<ARELAY_URL> --transport stdio agent-relay -- npx -y @arelay/cliReplace <…> with your own values
Platform CLI
codex mcp add agent-relay --env ARELAY_TOKEN=<ARELAY_TOKEN> --env ARELAY_URL=<ARELAY_URL> -- npx -y @arelay/cliReplace <…> with your own values
Config file
{
"mcpServers": {
"agent-relay": {
"command": "npx",
"args": [
"-y",
"@arelay/cli"
],
"env": {
"ARELAY_TOKEN": "<ARELAY_TOKEN>",
"ARELAY_URL": "<ARELAY_URL>"
}
}
}
}Replace <…> with your own values
Config file
{
"servers": {
"agent-relay": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@arelay/cli"
],
"env": {
"ARELAY_TOKEN": "<ARELAY_TOKEN>",
"ARELAY_URL": "<ARELAY_URL>"
}
}
}
}Replace <…> with your own values
Platform CLI
gemini mcp add -e ARELAY_TOKEN=<ARELAY_TOKEN> -e ARELAY_URL=<ARELAY_URL> agent-relay npx -y @arelay/cliReplace <…> with your own values
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about Agent Relay
How do I install Agent Relay in Claude Code?
Set your token and run claude mcp add arelay -e ARELAY_TOKEN=<ARELAY_TOKEN> -- npx -y @arelay/cli.
What does Agent Relay do?
It adds MCP tools for delivering files, viewing inbox sessions, and submitting email drafts for human approval.
What is required for the MCP server to work?
You need a portal account with encryption configured and a token from Account → Agent tokens. Self-hosted setups also use ARELAY_URL.