Skip to main content

MCP relay

Copyright Sebastiaan Mathôt 2026. Contains AI-generated code.

Lets a cloud MCP client (e.g. SigmundAI/ LibreChat) use MCP servers that run on users' desktops, where no inbound connection is possible.

Quick start

Server

On the server, set RELAY_API_KEY and start the server. The relay API key should be specified as the bearer token in the client (e.g. LibreChat).

export RELAY_API_KEY=1234
python server.py

Desktop (agent)

First, desktop-relay tool in your MPC client and ask for a pairing code.

Next, on the desktop, start example_qt_app.py (or an application derived from it). This connects to the relay server and makes MCP servers available to the client.

Client (LibreChat)

One entry per server name. user_id in the pairing step must equal the LibreChat user id.

mcpServers:
  # The desktop-relay is a built-in MCP server that handles pairing and needs to be enabled.
  desktop-relay:
    type: streamable-http
    url: https://relay.example.com/mcp/relay
    headers:
      Authorization: "Bearer ${RELAY_API_KEY}"
      X-User-Id: "{{LIBRECHAT_USER_ID}}"
  # In addition, add MCP servers offered by the relay. This depends on your setup.
  desktop-hello:
    type: streamable-http
    url: https://relay.example.com/mcp/hello
    headers:
      Authorization: "Bearer ${RELAY_API_KEY}"
      X-User-Id: "{{LIBRECHAT_USER_ID}}"

The Authorization token should match the RELAY_API_KEY of the server. The X-User-Id is a placeholder following LibreChat's config system, and does not depend on the relay configuration.

License

mcp-relay is licensed under the GNU General Public License v3.

Metadata

Release files for sigmund-mcp-relay 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sigmund-mcp-relay 0.3.0
File Size Uploaded Provenance Actions
sigmund_mcp_relay-0.3.0.tar.gz 100.7 kB Without provenance Details for sigmund_mcp_relay-0.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for sigmund-mcp-relay 0.3.0
File Interpreter ABI Platform Actions
sigmund_mcp_relay-0.3.0-py3-none-any.whl Python 3 none any Details for sigmund_mcp_relay-0.3.0-py3-none-any.whl

Total release size: 208.2 kB

Release files / sigmund_mcp_relay-0.3.0.tar.gz

Download URL sigmund_mcp_relay-0.3.0.tar.gz
Size 100.7 kB
Tags Source
SHA-256 checksum
How to use checksums
71d4482f6799cfb0b2cb1e92a7e30334ab7c0bee948ccc8d4bb445a5450e5309
BLAKE2b-256 checksum
How to use checksums
f35cb4ddf1e838caf0dd0aa8f426691f1a4972bb57878c6dceb32cd63f7bddd3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.25

Release files / sigmund_mcp_relay-0.3.0-py3-none-any.whl

Download URL sigmund_mcp_relay-0.3.0-py3-none-any.whl
Size 107.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5aee30378791e999a7f560b1cb83c8be2b9afee00dcd61dd4933045183bec202
BLAKE2b-256 checksum
How to use checksums
8cfe6d5536af8ea4e9578abd823000430c27a02546fcd1f305dbadc1222463c3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.25

Security for sigmund-mcp-relay 0.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page