MCP Relay
MCP Relay lets a cloud AI agent monitor the relay chain and discover MCP servers via the official registry.
relay_status: Check connectivity and health of the Relay Server, connected Client, and its local MCP servers, including tool counts, client state, heartbeat, and cached status when busy.relay_registry_search: Search the official MCP Registry for new MCP servers to add, with filters for version, update date, deleted entries, pagination, and metadata like packages and repository URL.Overall, the server relays calls to your configured local MCP servers, exposing their tools as
<alias>_<tool>(e.g.,localtools_read_file), and allows server management if admin mode is enabled.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MCP Relayconnect to my local MCP servers"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MCP Relay
Your AI in the cloud. Your MCP servers on your computer.
Connect your cloud AI agent to the local MCP servers you choose, through a single remote endpoint.
Windows, macOS & Linux · Outbound connection · Your choice of MCP servers
How it works · Get started · Why MCP Relay? · Guides
A real local run: Server, Client and a small stdio MCP server on one machine, called from a Python MCP client.
Your local MCP tools, available to your cloud AI
No inbound port. The Client on your computer connects out to the cloud Server and reconnects on its own after a network drop.
One endpoint for all your servers. Each local MCP server,
stdioor Streamable HTTP, is published under a name you choose.Native tools. Your servers' tools appear directly in your AI's tool list as
<alias>_<tool>, such aslocaltools_read_file, and update when servers start, stop or change.You decide what is exposed. Publish only the tools you allow per server; remote server management stays off unless you turn it on.
Alpha: one Server, one Client, one user. Configuration and the Server/Client contract may change between releases; see the release notes.
Related MCP server: webmcp-polyfill
How it works
flowchart LR
subgraph Cloud
AI[Your AI agent] -->|MCP over HTTPS|Server[Relay Server]
end
subgraph Your computer
Client[Relay Client] --> A[Local MCP server]
Client --> B[Another MCP server]
end
Client -->|Outbound secure WebSocket|ServerYour AI agent calls one MCP endpoint on Relay Server. Relay Client, on
your computer, carries each call to the right local MCP server and returns the
result. The built-in relay_status tool reports the state of the whole chain.
Get started
You need a cloud AI agent that supports MCP over Streamable HTTP with an Authorization header, a cloud host reachable over HTTPS (a TLS reverse proxy or a secure tunnel), and your Windows, macOS or Linux computer. MCP Relay does not provide hosting, DNS or TLS.
1. Install
On the cloud host and on your computer:
uv tool install mcp-relayNo uv? The one-line installer sets it up first:
# Linux and macOS
curl -fsSL https://raw.githubusercontent.com/kxlion/mcp-relay/main/scripts/install.sh | bash# Windows (PowerShell 5.1 or newer)
iex (irm https://raw.githubusercontent.com/kxlion/mcp-relay/main/scripts/install.ps1)To read the installer before running it, or to pin a release, see Install and upgrade.
2. Create two tokens
Token | Shared by |
| Server and Client |
| Server and your AI agent |
Use two different random values of 32–256 printable ASCII characters without
spaces, for example from openssl rand -hex 32. Put them in
~/.mcp-relay/.env (%USERPROFILE%\.mcp-relay\.env on Windows), readable
only by your user. See
credentials.
3. Start the Server
On the cloud host, run mcp-relay onboard and choose
Server only. Then route these two addresses through your TLS proxy, keeping
the Authorization header and allowing long-lived WebSocket connections:
Public address | Internal destination |
|
|
|
|
mcp-relay config validate
mcp-relay serverFor a proxy on another host or the Docker image, see the deployment guide.
4. Start the Client
On your computer, run mcp-relay onboard, choose
Client connected to a remote Server and enter your
wss://relay.example.com/ws address. MCP Relay bundles no MCP server: declare
the ones you already use in ~/.mcp-relay/config.yaml:
mcp_servers:
localtools: # an MCP server already running over HTTP
url: http://127.0.0.1:9000/mcp
browser: # a stdio MCP server launched by the Client
command: [npx, "@example/browser-mcp"] # placeholder package
tools: # optional: publish only these tools
navigate:
screenshot:
description: Capture the current page as a PNG.mcp-relay config validate
mcp-relay clientRestart the Client after editing config.yaml.
5. Connect your AI agent
Setting | Value |
Transport | Streamable HTTP |
URL |
|
Header |
|
Then ask it:
Call
relay_statusand tell me which MCP servers and tools are available on my computer.
A live Client and your servers listed as running confirm the whole chain
works. If not:
Symptom | Check |
| Open a new terminal to pick up the updated |
Your AI gets | The |
| The Client is running, with the same |
A server is missing or | Its |
mcp-relay config show prints the effective settings with secrets redacted.
More in troubleshooting.
Want to try it first without a cloud host? Choose Local Server + Client during onboarding; see one computer.
Why MCP Relay?
You want to... | With a plain tunnel | With MCP Relay |
Expose several MCP servers | One public URL and one auth setup per server | One endpoint; each server published under its own alias |
Use | Needs a separate stdio-to-HTTP bridge | Launched and relayed by the local Client |
Limit what the AI sees | Everything the server offers is exposed | Per-server |
Know whether your computer is reachable | Guess from timeouts |
|
Survive network drops | Depends on the tunnel | The Client reconnects and the tool list updates itself |
Tools such as mcp-remote solve the opposite problem, connecting a local MCP
client to a remote server.
Security in brief
Both tokens stay out of YAML, command arguments and
config showoutput.The Server listens on loopback by default; keep it behind your TLS proxy.
Your AI can add, modify, enable, disable or delete server entries only after
mcp-relay config set admin trueon your computer.MCP Relay relays the servers you configure; what their tools can do depends on those servers and their own permissions. Their results are relayed as is.
See the security policy to report a vulnerability.
Guides
Deploy the cloud Server: TLS proxy routes, Docker, one-computer setup
Run and configure: credentials, settings, logs, troubleshooting, uninstall
Tools and server management: server entries, tool naming, administration, errors
Protocol reference: the relay contract and its bounds
Licensed under the MIT License.
Available Tools
2 toolsrelay_registry_searchRelay Registry SearchARead-only
Search the official MCP Registry for servers to add (read-only, server-side).
Use it to discover a server that is not configured yet; for the
servers the Client already runs, use relay_status. Returns bounded
server metadata: name, title, description, version, repository URL
and declarative-launcher packages, plus next_cursor to pass back
as cursor for the next page. A returned name is the source
for adding that server. Never touches the Client and never writes any
configuration.
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Results per page, 1-50. | |
| query | Yes | Text matched against server names, 1-200 characters. | |
| cursor | No | The next_cursor of a previous result; omit for the first page. | |
| version | No | 'latest' or an exact server version. | |
| updated_since | No | RFC 3339 timestamp: only servers updated since then, deleted entries included. | |
| include_deleted | No | Also return servers deleted from the registry. |
Output Schema
| Name | Required | Description |
|---|---|---|
| results | Yes | |
| next_cursor | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint and openWorldHint, and the description reinforces that with 'read-only, server-side' and 'never touches the Client and never writes any configuration'. It adds real value beyond annotations by disclosing pagination behavior (next_cursor) and that a returned name is the 'source' for adding a server. It stops short of full disclosure, but it is well above the annotation-provided baseline.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Front-loads purpose, then routing, then return shape and safety in four compact sentences. Slightly dense but every sentence carries information an agent needs; nothing is wasted.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With an output schema present, the description needn't enumerate return fields, yet it still summarizes the returned metadata and the cursor contract. Combined with annotations and full schema coverage, an agent has everything needed to invoke and chain this tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so all six parameters are already documented in the schema, including limit, cursor, version, updated_since and include_deleted. The description mentions only the cursor/next_cursor handoff, which the schema already states. Baseline 3 is correct when the schema does the heavy lifting.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb and resource ('Search the official MCP Registry for servers') plus scope ('to add'). It explicitly distinguishes itself from the sibling relay_status for already-configured servers, so an agent can route without opening either schema.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Gives an explicit when-to-use ('discover a server that is not configured yet') and names the alternative (relay_status) with its own condition ('for the servers the Client already runs'). Nothing is left to inference.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
relay_statusRelay StatusARead-only
Report the Relay Server, the connected Client and its MCP servers.
Call it first to check that the Client is connected and which server
aliases run, when a tool is missing or fails, and after an
administration change. Read-only. Client details come from a short
live probe; when the Client is busy or unreachable the last good
answer is returned as cached with its age. To discover servers
that are not configured yet, use relay_registry_search.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
| client | Yes | |
| server | Yes | |
| mcp_servers | Yes | |
| disk_differs | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already cover the read-only safety profile, and the description goes further by disclosing the live-probe mechanism and the degraded-mode behavior: when the Client is busy or unreachable, a stale answer is returned flagged as ``cached`` with its age. That failure-mode/fallback semantics is exactly the context an agent cannot get from structured fields.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Front-loaded with the purpose, then triggers, then caveats, then the sibling pointer — a sensible order with no wasted padding. The standalone 'Read-only.' sentence slightly duplicates the readOnlyHint annotation, a minor redundancy in an otherwise tight description.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
An output schema exists, so return values need no prose explanation. Coverage of purpose, invocation timing, degraded behavior, and the sibling alternative is complete for a no-argument status tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool takes zero parameters, so there is nothing for the description to disambiguate; the baseline for a 0-param tool applies. No parameter guidance is missing or needed.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb and three concrete resources it reports on: the Relay Server, the connected Client, and its MCP servers. It also distinguishes itself from the sibling by contrasting configured server aliases with servers not yet configured.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Gives explicit triggers: call first to confirm the Client is connected, when a tool is missing or fails, and after an administration change. It also names the alternative and the different need it serves ('To discover servers that are not configured yet, use relay_registry_search').
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
1 tool update
v0.1.1- Changed
relay_registry_search6 fields changed- added
Input schema / properties / cursor / descriptionAdded value: +"The next_cursor of a previous result; omit for the first page." - added
Input schema / properties / include_deleted / descriptionAdded value: +"Also return servers deleted from the registry." - added
Input schema / properties / limit / descriptionAdded value: +"Results per page, 1-50." - added
Input schema / properties / query / descriptionAdded value: +"Text matched against server names, 1-200 characters." - added
Input schema / properties / updated_since / descriptionAdded value: +"RFC 3339 timestamp: only servers updated since then, deleted entries included." - added
Input schema / properties / version / descriptionAdded value: +"'latest' or an exact server version."
2 tool updates
v0.1.0- First observed
relay_registry_search - First observed
relay_status
TDQS
Scored across 2 tools
relay_status (report configured Client/servers) and relay_registry_search (discover unconfigured servers) have clearly distinct purposes, and each description explicitly redirects to the other for the complementary case. Only minor overlap in that both are read-only discovery/observability operations, but boundaries are unambiguous.
Both tools use a consistent snake_case 'relay_' prefix, forming a predictable namespace. The suffix pattern is not strictly verb_noun (status vs registry_search), a minor deviation, but naming is coherent and readable.
Only two tools for a server whose purpose (relaying/managing an MCP Client and its servers) implies administrative capability; the surface feels notably thin. Descriptions even reference actions like 'administration change' that no tool exposes.
A clear dead end exists: relay_registry_search returns a 'name' described as 'the source for adding that server,' yet there is no tool to add, remove, or invoke anything. Status and discovery are covered, but the core lifecycle implied by the domain is missing.
Maintenance
Related MCP Connectors
One connector for 15,000+ MCP servers plus your team's private MCPs, from any AI client.
- QuallaaOAuthcom.quallaa
Talk to your public-facing AI from any MCP client — Claude, ChatGPT, Cursor, Cline, Windsurf.
MCP server for OpenAI API (chat completions, image generation, embeddings) via AceDataCloud
Connect AI agents to Flato's editable canvas runtime through a hosted MCP server.
Related MCP Servers
- AlicenseNot gradedqualityFmaintenanceEnables AI-driven interactions with Minecraft through a WebSocket-based server and MCP protocol, allowing external MCP clients and in-game chat to trigger AI tools.4MIT
- AlicenseNot gradedqualityDmaintenanceEnables browsers to act as MCP servers by relaying tools, resources, and prompts to AI agents via a WebSocket-to-stdio bridge.35 npmMIT
- AlicenseNot gradedqualityCmaintenanceExposes local stdio MCP servers to chat AIs through temporary public URLs, providing both a Streamable HTTP gateway and a REST+OpenAPI bridge for integration with ChatGPT and other clients.MIT
- AlicenseNot gradedqualityAmaintenanceEnables running local MCP servers on machines behind NAT and accessing their tools from anywhere through a single Streamable HTTP endpoint, without opening any inbound ports.MIT