MCP Relay
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 & Linux · Outbound connection · Your choice of MCP servers
Get started · How it works · 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.
Bring your local MCP tools to your cloud AI
Your AI agent runs in the cloud. The MCP servers it needs run on your computer. MCP Relay connects them: a Server in the cloud receives the agent's requests, and a local Client relays them to your configured MCP servers.
No inbound port or port forwarding is needed on your computer. The local Client opens the connection to the cloud Server and reconnects automatically if that connection is interrupted.
MCP Relay works with MCP servers you supply, using stdio or Streamable HTTP.
It does not bundle or guarantee any particular server. The actions your AI can
perform depend on the servers you configure and their own permissions.
Project status: alpha. v0.1.0 is the first release; configuration and the Server/Client contract may still change between
0.xversions. The current setup supports one Relay Server, one Relay Client, one user and one computer.
Related MCP server: Brainstorm
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 cloud AI agent connects to one MCP endpoint.
Relay Server routes requests between the AI agent and your computer.
Relay Client connects your local MCP servers under names you choose.
The tools of your local MCP servers appear directly in your AI's tool list,
named <alias>_<tool> (for example localtools_read_file), and the list
updates itself when servers start, stop or change. relay_status reports the
state of the whole chain. You can restrict each server to the tools you want
your AI to see.
You can also let your AI manage the configured servers by explicitly enabling
administration on the local Client. This is optional and disabled unless you
set admin: true.
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 |
MCP Relay still needs a public HTTPS/WSS address for its Server: a cloud host
behind a TLS reverse proxy, or a secure tunnel in front of the Server. Tools
such as mcp-remote solve the opposite problem, connecting a local MCP client
to a remote server.
Get started
You need a cloud AI agent supporting MCP over Streamable HTTP with an Authorization header, a cloud host for Relay Server, and your Windows or Linux computer. For remote access, provide an HTTPS/WSS address through a TLS reverse proxy or secure tunnel. MCP Relay does not provision hosting, DNS or TLS.
1. Install on the cloud host and your computer
MCP Relay is published on PyPI. With uv:
uv tool install mcp-relayuv downloads Python 3.14 when it is not already available. Upgrade later with
uv tool upgrade mcp-relay. To pin a release, for example in a script or CI
job, install mcp-relay==0.1.0.
Without uv, the one-line installers set up uv, install the same package from PyPI for your user account and start guided setup when a terminal is available.
Linux - requires Bash and curl:
curl -fsSL https://raw.githubusercontent.com/kxlion/mcp-relay/main/scripts/install.sh | bashWindows - PowerShell 5.1 or newer:
iex (irm https://raw.githubusercontent.com/kxlion/mcp-relay/main/scripts/install.ps1)These commands run a remote script that installs the latest release. In the
installer's environment, set MCP_RELAY_VERSION=0.1.0 to pin a release and
MCP_RELAY_SETUP=skip to skip guided setup.
Guided setup (mcp-relay onboard) is covered in steps 3 and 4: choose
Server-only on your cloud host and Client connected to a remote Server
on your computer, after preparing the credentials below. On the cloud host, you
can run the Server from its Docker image instead; see
Run the Server with Docker in step 3. You can
cancel setup and rerun mcp-relay onboard when ready.
Linux:
curl -fsSL https://raw.githubusercontent.com/kxlion/mcp-relay/main/scripts/install.sh -o install-mcp-relay.sh
less install-mcp-relay.sh
bash install-mcp-relay.shWindows:
irm https://raw.githubusercontent.com/kxlion/mcp-relay/main/scripts/install.ps1 -OutFile .\install-mcp-relay.ps1
Get-Content .\install-mcp-relay.ps1
.\install-mcp-relay.ps12. Prepare your credentials
Create two different, randomly generated secrets and supply them through process
environment variables or a private ~/.mcp-relay/.env file:
Credential | Where to supply it |
| The cloud Server and your local Client, with the same value |
| The cloud Server and your AI agent's MCP connection |
Each token must contain 32–256 printable ASCII characters without spaces.
Use a secure secret generator; length alone does not make a token secure.
On Windows, the default directory is %USERPROFILE%\.mcp-relay.
Restrict the .env file to your user account (0600 on Linux).
MCP Relay does not generate or save tokens for you. The Client token must be available before Client onboarding. Keep tokens out of YAML, command arguments and URLs, and transfer them between machines through a secure channel.
3. Start the cloud Server
On the cloud host, run guided setup and select Server-only:
mcp-relay onboardThe Server has two separate listeners. With a TLS proxy on the same host, keep both bound to loopback and route requests as follows:
Public address (replace the hostname) | Internal destination |
|
|
|
|
Keep these internal ports private. The proxy must support long-lived WebSocket connections and preserve authentication headers. Onboarding configures listener settings; you configure the proxy separately.
Start the Server:
mcp-relay config validate
mcp-relay serverThese settings belong in the Server environment or private .env, not YAML:
RELAY_SERVER_MCP_HOST=127.0.0.1
RELAY_SERVER_MCP_PORT=8000
RELAY_SERVER_CLIENT_HOST=127.0.0.1
RELAY_SERVER_CLIENT_PORT=8001The listener addresses must be distinct. If the proxy is on another host, choose private bind addresses it can reach and restrict access with a firewall.
Each release publishes a Server image for linux/amd64 and linux/arm64 on
GitHub Container Registry,
tagged with its version (0.1.0, 0.1) and latest. It needs no configuration
file: put both tokens in a private .env file as plain KEY=value lines, then
run:
docker run -d --name mcp-relay --restart unless-stopped --env-file .env \
-e RELAY_SERVER_MCP_HOST=0.0.0.0 -e RELAY_SERVER_CLIENT_HOST=0.0.0.0 \
-p 127.0.0.1:8000:8000 -p 127.0.0.1:8001:8001 \
ghcr.io/kxlion/mcp-relay:latest serverInside the container the listeners bind every interface so that Docker can
forward them; the 127.0.0.1 port mappings keep them reachable only from the
host, for a TLS proxy on the same host. The repository's
docker-compose.yml
runs the same Server but publishes both ports on every host interface: restrict
them with a firewall or change the mappings. The image is for the cloud Server;
run the Client on your computer, next to your MCP servers.
4. Connect your local MCP servers
On your computer, run guided setup and choose Client connected to a remote Server:
mcp-relay onboardSelect Remote and enter your wss://relay.example.com/ws address. The Client
reads the RELAY_CLIENT_TOKEN you supplied in step 2.
Declare your MCP servers under mcp_servers in the generated
~/.mcp-relay/config.yaml. For example, if you already run a local Streamable
HTTP MCP server on port 9000, add:
mcp_servers:
localtools:
url: http://127.0.0.1:9000/mcpReplace that URL with your server's address. For a server launched as a local
process, use command with its executable and arguments instead of url.
Registry-based declarations use source. Add tools: to publish only some of
a server's tools. See the server configuration reference for
the entry formats and per-server credentials.
You choose and configure the underlying MCP servers separately; Relay does not supply browser, desktop or terminal tools of its own.
Start the Client:
mcp-relay config validate
mcp-relay clientKeep the cloud Server and local Client running. Manual YAML edits take effect
after restarting the Client. Use Ctrl+C in the corresponding terminal to stop
either process.
5. Connect your cloud AI agent
Add an MCP connection to your agent:
Setting | Value |
Transport | Streamable HTTP |
URL |
|
Authorization header |
|
Supply the token through your AI host's secret settings. For clients using the following configuration format and supporting environment interpolation:
mcp_servers:
mcp_relay:
url: https://relay.example.com/mcp
headers:
Authorization: "Bearer ${RELAY_MCP_TOKEN}"
supports_parallel_tool_calls: falseAsk your AI agent to:
Call
relay_statusand tell me which MCP servers and tools are available on my computer.
A live Client report confirms the round trip to your computer. Your servers'
tools are then called like any other MCP tool. See the
tool guide for naming, filtering and error handling.
Choose whether your AI can manage servers
Your configured, enabled servers' tools are always available. Adding, modifying, deleting, enabling or disabling server entries remotely requires explicit permission on your local Client:
mcp-relay config set admin trueRestart the Client to apply the change. To lock administration again:
mcp-relay config unset adminRestart once more. Without it, the administration tools are not listed. This setting controls server administration, not the actions of tools exposed by your MCP servers. Configure those servers' permissions accordingly. Third-party results are relayed without scanning them for secrets.
Need help?
Problem | Start here |
Command not found after installation | Open a new terminal to pick up the updated |
Startup rejects a token | Check the named variable, the 32–256 character requirement and the absence of spaces |
Cloud AI cannot connect | Check the HTTPS URL, MCP token and proxy route to port 8000 |
| Keep the local Client running; check its token, WSS URL and proxy route to port 8001 |
A local server is unavailable | Check its launcher or URL, dependencies and credentials; other servers can keep running |
Administration returns | Set |
Use mcp-relay config show to inspect effective settings with secrets redacted.
Logs are written to ~/.mcp-relay/server.log and client.log.
The CLI guide covers configuration and diagnostics.
Yes. Choose Local Server + Client during onboarding. The MCP endpoint defaults
to http://127.0.0.1:8000/mcp, and the Client connects to
ws://127.0.0.1:8001/ws. Both tokens are still required. A cloud AI agent cannot
reach your computer through these loopback addresses.
Stop the Relay processes on the machine, then run:
uv tool uninstall mcp-relayYour configuration, private .env and workspace under ~/.mcp-relay are
preserved. Data removal is a separate manual step.
Guides
CLI and configuration · Tools and server management · Security policy
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
Hosted MCP server connecting claude.ai, ChatGPT and other AI apps to your own computer
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.
Connect AI agents to Flato's editable canvas runtime through a hosted MCP server.
Related MCP Servers
- FlicenseNot gradedqualityNot gradedmaintenanceEnables deployment of MCP servers on Cloudflare Workers without authentication requirements. Allows connection from both web-based AI playgrounds and desktop clients like Claude through a remote proxy.-
- AlicenseNot gradedqualityFmaintenanceEnables AI agents to communicate, coordinate, and collaborate on complex tasks through a local MCP server.2 npm8ISC
- 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.19 npmMIT