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 Relay connect 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.
Inputs: query (required), limit, cursor, version, +2 more. Returns: results, next_cursor
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.
Inputs: no named parameters. Returns: client, server, mcp_servers, disk_differs
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
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
Secure and manage MCP servers through the Speakeasy AI Control Plane from your agent.
One connector for 15,000+ MCP servers plus your team's private MCPs, from any AI client.
An MCP server that provides agents access to the KeldynAI platform
Talk to your public-facing AI from any MCP client — Claude, ChatGPT, Cursor, Cline, Windsurf.
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
- FlicenseNot gradedqualityDmaintenanceEnables browsers to act as MCP servers by relaying tools, resources, and prompts to AI agents via a WebSocket-to-stdio bridge.-
- 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 gradedqualityBmaintenanceEnables 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