Relay MCP Server
Run any Relay model (image, video, audio, LLM), poll tasks, upload files and search Relay's docs.
Relay scores 69 (Good), licensed MIT and written in TypeScript. It can be reached as a remote MCP endpoint. It declares 7 tools. Filed under AI and memory. GitHub shows 0 stars. Package registries report about 316 downloads a week. Install configs are generated for 12 clients. Being listed in the registry is not the same as being vendor-official.
Good trust
69 of 100 from six public signals. Nobody can buy a point.
- Listed in the official MCP registry.
- OSI-style license: mit.
License, quality and maintenance
Quality: Grade A
92/100 for listing completeness. Lost points: 1 of 7 tools barely described, short summary.
How quality is graded
Where the 69 comes from
22 + 20 + 3 + 10 + 4 + 10 = 69. Each factor is capped, so no single signal can carry a listing.
Active in the official MCP registry, plus a known vendor namespace.
Registry: 22 of 30 points.How recently the repository saw a commit or release.
Maintenance: 20 of 20 points.GitHub stars and weekly downloads, on a log scale.
Popularity: 3 of 20 points.A clear, OSI-style open-source license.
License: 10 of 10 points.Not archived, a secure install path, a pinned version.
Security: 4 of 10 points.A real summary, a README with depth, listed tools.
Docs: 10 of 10 points.Install
Pick your client, copy the config, paste it in.
Remote auth: API key required. Get a key or token from the provider first, then add it as a header in your client config. How remote auth works
Needs Cursor or VS Code installed on this device. The button opens the app and asks you to confirm before it adds the server.
{ "mcpServers": { "opengpu-network-relaygpu-mcp": { "command": "npx", "args": [ "-y", "@relaygpu/mcp@0.1.9" ], "env": { "RELAY_API_KEY": "YOUR_RELAY_API_KEY" } } }}
Environment variables
| Name | Required | Notes |
|---|---|---|
RELAY_API_KEYSecret | Required | Your Relay API key (relay_sk_...) from dashboard.relaygpu.com/keys. |
Tools7Tool docs quality grade D
All capabilitiesCancel a run that is still in progress
get_creditstoolCredit balance, promos and consumption (JWT or custom-tier superkey)
get_usagetoolUsage analytics (JWT or custom-tier superkey)
list_workflowstoolList the workflow templates
run_modeltoolRun any model by name and wait up to 45 s; endpoint: "responses" runs a chat model on the Responses API
run_workflowtoolStart a workflow run, wait up to 45 s
upload_filetoolHost a file and get a URL for any url input (or an image editor's image), or a one-time upload slot for a local file on the hosted server
About
@relaygpu/mcp
Relay's MCP server. Your agent can find a Relay model, read its input schema, run it, poll long tasks, upload files, run workflows and search the Relay docs, all from Claude (claude.ai and Claude Desktop), Claude Code, Codex, Cursor or VS Code. It is built on @relaygpu/client. The tools are generic and take the model as a string, so a model added to Relay works without a new release.
Connect to the hosted server, or run it locally:
| How | Credential | |
|---|---|---|
| Hosted (Streamable HTTP) | https://mcp.relaygpu.com/mcp, nothing to install | Sign in with your Relay account (OAuth), or send X-API-Key: relay_sk_..., or Authorization: Bearer <relay key or dashboard JWT> |
| Local (stdio) | npx -y @relaygpu/mcp (Node ≥ 20) | RELAY_API_KEY=relay_sk_... in its environment; optional RELAY_BASE_URL (default https://relaygpu.com) |
The server never stores your key: the hosted one reads it from each request and uses it for that request only, the local one reads it from its environment.
Install
Every client below connects to the hosted server: no Node, no npx. How you sign in depends on the client:
- claude.ai and Claude Desktop add Relay as a connector and sign in with your Relay account. A connector cannot use an API key: Claude's connector form has no field for one.
- Claude Code takes either: the sign-in, or a key in a header.
- Codex, Cursor and VS Code send a key in a header.
Every client can also run the local server with a key; see Local server.
Claude (claude.ai and Claude Desktop)
- Sign in to dashboard.relaygpu.com in your browser.
- In Claude, open Settings → Connectors and click Add custom connector.
- Name it
Relayand pastehttps://mcp.relaygpu.com/mcpas the URL. Leave the OAuth Client ID and Client Secret fields empty: they are not for a Relay key. Click Add. - Click Connect. Your browser opens Relay's consent page. Click Allow.
- Start a new chat. A chat opened before you connected may still ask you to reconnect.
No API key is involved, and every tool works, get_credits and get_usage included. Usage is billed to your Relay account. The dashboard's Profile page lists the connection under Connected Apps, where you can set a spending cap or disconnect it; a disconnect takes effect within 5 minutes.
The sign-in request expires after 10 minutes, which is why step 1 comes first. Claude Desktop hands the sign-in to your browser, so the browser must be signed in to claude.ai too.
Want a key in Claude Desktop instead? Use the local bundle.
Claude Code
Terminal, in the CLI or the VS Code / JetBrains extension alike:
claude mcp add --transport http --scope user relay https://mcp.relaygpu.com/mcp --header "X-API-Key: relay_sk_..."
To sign in with your Relay account instead of a key, leave --header out, then run /mcp in a session, pick relay and choose Authenticate.
--scope user makes it available in every project; without it the server exists only in the directory you ran the command in. Check it with /mcp in a new session. If the terminal answers command not found: claude, the extension is installed but the CLI is not: install it with curl -fsSL https://claude.ai/install.sh | bash (or npm install -g @anthropic-ai/claude-code).
Codex
Codex sends the key as a Bearer token from an environment variable, so the key stays out of config.toml. Set RELAY_API_KEY in your shell profile, then:
codex mcp add relay --url https://mcp.relaygpu.com/mcp --bearer-token-env-var RELAY_API_KEY
Cursor
The button installs the entry below with a placeholder key; replace relay_sk_... in Cursor's MCP settings afterwards. By hand: ~/.cursor/mcp.json (all projects) or .cursor/mcp.json (one project).
{
"mcpServers": {
"relay": {
"url": "https://mcp.relaygpu.com/mcp",
"headers": { "X-API-Key": "relay_sk_..." }
}
}
}
VS Code (Copilot agent mode)
This installs the server for VS Code's own agent (Copilot Chat). Using Claude Code inside VS Code? Use the Claude Code command instead: the Claude Code extension does not read VS Code's MCP config.
VS Code asks for the key once and keeps it in its secret storage. By hand, in .vscode/mcp.json (one workspace) or with MCP: Open User Configuration (every workspace):
{
"inputs": [{ "type": "promptString", "id": "relay-key", "description": "Relay API key (relay_sk_...)", "password": true }],
"servers": {
"relay": {
"type": "http",
"url": "https://mcp.relaygpu.com/mcp",
"headers": { "X-API-Key": "${input:relay-key}" }
}
}
}
Claude Desktop with an API key
The connector above needs no key. To run Relay in Claude Desktop with a key, install the local bundle:
- Download
relay.mcpb. - Double-click it. Claude Desktop opens an install dialog: click Install.
- The extension installs switched off. Open Settings → Extensions → Relay → Configure.
- Paste your Relay key and click Save. The key stays in Claude Desktop's secure storage.
- Switch Relay on.
The bundle runs on Claude Desktop's built-in Node, so nothing else needs to be installed. get_credits and get_usage read the account, so they take a dashboard JWT or a custom-tier superkey, never a plain key; every other tool works with a plain key.
By hand instead: Settings → Developer → Edit Config opens claude_desktop_config.json in your default editor. That file takes local servers only: a url with headers (the Cursor block) does not work there. Add the block below at the top level, save, then quit Claude Desktop (⌘Q) and reopen it:
{
"mcpServers": {
"relay": {
"command": "npx",
"args": ["-y", "@relaygpu/mcp"],
"env": { "RELAY_API_KEY": "relay_sk_..." }
}
}
}
Local server (stdio)
Any client can run the server on your machine instead; it needs Node 20 or newer on the PATH the client sees (see Troubleshooting).
claude mcp add relay --scope user --env RELAY_API_KEY=relay_sk_... -- npx -y @relaygpu/mcp
codex mcp add relay --env RELAY_API_KEY=relay_sk_... -- npx -y @relaygpu/mcp
Cursor (~/.cursor/mcp.json) and VS Code take the same command / args / env entry as the Claude Desktop block above; VS Code adds "type": "stdio" and lists it under "servers".
Ready-to-copy files are in examples/.
Troubleshooting
- Claude asks you to sign in, and there is nowhere to paste a key (claude.ai, Claude Desktop connector). That is how connectors work: they sign in with your Relay account and cannot send a key. Follow Claude (claude.ai and Claude Desktop), or use the local bundle if you need a key.
- "Server disconnected", "spawn npx ENOENT" or "Executable not found: npx" (Claude Desktop, Cursor). Apps opened from the Dock or Start menu do not load your shell profile, so a Node installed with nvm, Volta or Homebrew is not on their PATH. Use the Claude Desktop bundle, or put the full path in
"command": runwhich npxin a terminal and paste the result (for example/Users/you/.nvm/versions/node/v22.22.0/bin/npx). TypeError: Relay: no global fetch: the client started Node 16 or older. Install Node 20 or newer, or point"command"at a newernpx.- Windows: if the client cannot start
npx, use"command": "cmd"with"args": ["/c", "npx", "-y", "@relaygpu/mcp"]. - The first start takes a few seconds:
npxdownloads the package once (about 5 s); later starts take about 1 s.
Tools
Tools marked keyless work without a credential on the local server. Keyless tools answer the public catalog; with a credential, search_models, get_model, get_pricing, estimate_cost and run_model's model lookup answer your account's: the models your tier and grants can run appear and run. The others are billed or account tools and need one. Relay's hosted server, which has the "Connect Relay" sign-in on, takes no request without a credential, keyless tools included.
| Tool | What it does | Example |
|---|---|---|
search_models keyless | Find models by tag and/or text; image-to-image also lists every image model that takes an input image (accepts: ["image"]) | "Find a text-to-video model from Kling" → {tag: "text-to-video", query: "kling"} |
get_model keyless | Route, request schema, example, pricing and status of one model; a chat model lists its API formats in endpoints, and endpoint: "responses" describes the Responses API route | {model: "black-forest-labs/FLUX-2-pro"} · {model: "openai/gpt-6.1-sol", endpoint: "responses"} |
get_pricing keyless | Prices (public; your account's with a credential) for one model or all of them, including the media_storage SKUs | {model: "KlingTeam/v3-T2V"} |
estimate_cost keyless | Estimate from the price list (public; your account's with a credential; not an invoice) | {model: "KlingTeam/v3-T2V", usage: {duration_seconds: 5, quality_mode: "std", sound: false}} |
run_model | Run any model by name and wait up to 45 s; endpoint: "responses" runs a chat model on the Responses API | {model: "black-forest-labs/FLUX-2-pro", input: {prompt: "a red fox", width: 512, height: 512}} · {model: "openai/gpt-6.1-sol", endpoint: "responses", input: {input: "Explain TCP vs UDP in two sentences."}} |
check_task keyless | Poll a task (waits up to 30 s) | {task_id: "direct:…", wait_seconds: 30} |
upload_file | Host a file and get a URL for any *_url input (or an image editor's image), or a one-time upload slot for a local file on the hosted server | {path: "./clip.mp4", retention: "relay1d"} · {slot: true} |
list_workflows | List the workflow templates | "Which workflows can I run?" |
run_workflow | Start a workflow run, wait up to 45 s | {workflow_id: "script-voiceover", inputs: {messages: [{role: "user", content: "a lighthouse at dusk"}], voice: "Cherry"}} |
check_workflow_run keyless | Poll a run (waits up to 30 s) | {run_id: "…", wait_seconds: 30} |
cancel_workflow_run | Cancel a run that is still in progress | {run_id: "…"} |
get_credits | Credit balance, promos and consumption (JWT or custom-tier superkey) | "How many credits do I have left?" |
get_usage | Usage analytics (JWT or custom-tier superkey) | {period: "7d"} |
search_docs keyless | Search the Relay docs | {query: "idempotency key"} |
Local files
The hosted server cannot read files on your computer. How a local file reaches a model, per client:
| Client | Local file → model |
|---|---|
| Claude Code, Cursor, VS Code, Codex (hosted server) | upload_file({slot: true}) returns a curl line; the agent runs it in your shell with the file's path (no key in the shell, single use, 10 minutes) and it prints the file's url; pass that url to run_model (for example as image). |
| claude.ai, Claude Desktop | upload_file({slot: true}) returns a link: open the link in your browser, pick the photo, and paste the link the page shows back into the chat; the model passes it to run_model. No key leaves the chat, single use, 10 minutes. A public URL of the file works too. |
| Local server (stdio), any client | upload_file({path: "./photo.png"}) uploads the file and returns its url. |
Image editors: search_models({tag: "image-to-image"}) lists every image model that takes an input image, each with accepts: ["image"].
Notes
- Auth. On the local server and on a self-hosted server,
tools/listand the keyless tools answer without a credential. Relay's hosted server answers every/mcprequest without a credential with401andWWW-Authenticate: Bearer resource_metadata="…", scope="relay", which is how clients start the "Connect Relay" sign-in;X-API-KeyandAuthorization: Bearer <relay key or dashboard JWT>work there too. A billed tool called without one returns aMISSING_CREDENTIALStool error that names what to set: theX-API-Keyheader (hosted) orRELAY_API_KEY(stdio). Errors from Relay come back as tool errors that include the error class,code,requestIdand the server's detail. Your key never appears in a tool result or a log line. - Long tasks.
run_modelwaits up to 45 s (wait_seconds, 0–45). If the task is still running after that, it returns thetask_idand the line "Do not resubmit: call check_task with this task_id". Every submit carries anIdempotency-Key, so a retry does not bill twice. Pass your ownidempotency_keyif your agent might send the same submit again. Since 0.1.7 every model whose input schema takesasync(image, video, audio) is submitted as a task, so a long image run returns atask_id, never a 524; chat models still answer inline. - Responses API. Some chat models are served on the OpenAI Responses API (
POST /v2/openai/v1/responses) as well as chat completions:get_modellists both inendpoints.get_model({model, endpoint: "responses"})returns that route, its request schema and an example, andrun_model({model, endpoint: "responses", input})runs it. The answer'soutputis the response exactly as Relay returned it (message, reasoning and function call items,usage,status), so its items can be sent back as they are. Withoutendpointa model runs on its own route, as before. The route is stateless: send the whole conversation ininputeach turn; to keep a reasoning model's reasoning, passinclude: ["reasoning.encrypted_content"]and send the returned reasoning items back. Relay refuses, before anything runs and unbilled, a model whoseendpointsdoes not listresponses,store: true,previous_response_id,conversation,background: true, tools other thanfunctionandincludevalues other thanreasoning.encrypted_content. The answer comes back whole (streamis dropped). - Expiry. Each result link comes with its expiry: 1 h after completion by default, unless
store_outputwas set. To keep results longer, passstore_outputwith amedia_storageSKU fromget_pricing(for examplerelay7d). That SKU adds a per-file fee. - Image links. The image routes that answer base64 (Gemini, gpt-image, FLUX-2-pro) also answer Relay's own links (
urls); the server returns those links in place of the base64, for 1 h by default or thestore_outputlifetime. A result that carries base64 without a Relay link is uploaded through/v2/files(at thestore_outputretention, elserelay1h, free within the daily quota for accounts that have topped up at least once or hold an active promo) and comes back as a URL and afile_id. Image content blocks are opt-in: passinline_images: true, which applies to images of 1 MB or less. - Uploads. On stdio,
upload_filestreams a localpathof up to 100 MB. The hosted server cannot read your disk: useslot: true(see Local files),base64(up to 4 MB) or a publicurl. Retention defaults torelay1h, which is free for accounts that have topped up at least once or hold an active promo; otherwise top up your account first.
Self-hosting
docker build -t relaygpu-mcp .
docker run -p 2300:2300 -e PORT=2300 -e RELAY_BASE_URL=https://relaygpu.com relaygpu-mcp
The server listens on PORT (default 2300) and calls Relay at RELAY_BASE_URL. Endpoints:
POST /mcp: Streamable HTTP, stateless.GET /healthz: returns{status, version}.GET /metrics: Prometheus text withmcp_tool_calls_total{tool,outcome}andmcp_tool_seconds{tool}.GET /.well-known/mcp/server-card.json: the server and its tools.GET /.well-known/oauth-protected-resource(and…/mcp): the RFC 9728 protected-resource metadata, only with OAuth on.
OAuth ("Connect Relay")
The "Connect Relay" sign-in is operated by Relay, on the hosted server at https://mcp.relaygpu.com/mcp. A self-hosted server runs without it: it takes an API key (X-API-Key or Authorization: Bearer), and keyless tools answer without a credential.
Logs are JSON lines on stderr, WARNING and above by default (LOG_LEVEL). Without Docker, run npm ci && npm run build && node dist/http.js.
License
MIT
Frequently asked questions
What is Relay MCP Server?
Run any Relay model (image, video, audio, LLM), poll tasks, upload files and search Relay's docs.
How do I install Relay MCP Server in Claude Desktop, Cursor, or VS Code?
Pick your client in the Install section on this page and copy the generated config into the client's config file. Step-by-step guides: Claude Desktop, Cursor, and VS Code. Relay MCP Server runs locally from the npm package @relaygpu/mcp with the command npx -y @relaygpu/mcp@0.1.9.
Is Relay MCP Server free and open source?
Yes. Relay MCP Server is released under the MIT license, an OSI-approved open-source license, so you can use, modify, and self-host it under those terms.
Does Relay MCP Server support remote (HTTP) connections?
Yes. Relay MCP Server offers a hosted endpoint over Streamable HTTP, so HTTP-capable clients can connect to it without running anything locally.
What tools does Relay MCP Server provide?
Relay MCP Server provides 7 tools, including cancel_workflow_run, get_credits, get_usage, and list_workflows. See the full tool list for descriptions and parameters.
How is Relay MCP Server's trust score calculated?
Relay MCP Server scores 69 out of 100 (Good). The score adds six capped public signals: registry status, maintenance, popularity, license, documentation, and security. Nobody can pay for points. Read the methodology for the full formula.
Reviews
No reviews yet—Be the first to review
No published reviews yet. Used it? Tell the next person how it went.
Sign inA verified email is required to review this server.
Add badge to your README
Paste either snippet into the repository README. The image links to this listing.