Relay MCP logo

Relay MCP

Self-hosted relay for sharing threads and session state across Claude Code, Cowork, and Claude.ai.

Install Relay MCP

Run the project’s own setup commands, in order.

Setup steps from the project

relay-mcp installs with its own steps rather than a config we can generate, so these are copied as-is. Follow them in order and run the commands in a terminal. Source: github.com

  1. 1. Install
    git clone https://github.com/zhowe-designs/relay-mcp.git
    
  2. 2. Install
    cd relay-mcp
    
  3. 3. Install
    npm install
    
  4. 4. Sign in
    npx wrangler login
    
  5. 5. Configure
    npx wrangler secret put RELAY_API_KEY        # any random 32+ char string, your bearer
    
  6. 6. Configure
    npx wrangler secret put SUPABASE_URL          # https://<project-ref>.supabase.co
    

Overview

The relay-mcp MCP server provides shared message threads for Claude Code, Cowork, and Claude.ai sessions. It runs as a stateless Cloudflare Worker with Supabase Postgres storing threads, messages, and read cursors. Clients authenticate with a static bearer key or Claude.ai's OAuth 2.1 flow. Reach for it when separate Claude sessions need to exchange state without manual copy-paste.

Use cases

  • Share implementation state between Claude Code and Claude.ai
  • Leave scheduled-task notes for a later chat session
  • Poll threads for messages since the last read
  • Archive completed collaboration threads

Key features

  • Shared named message threads
  • Cross-session surface and session-tag metadata
  • Reader-specific new-message cursors
  • Static bearer and OAuth 2.1 authentication
  • Cloudflare Worker and Supabase deployment

Tools6

What Relay MCP lets your agent do. Expand a tool for its parameters.

Self-reported~99 tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

14/14 checks healthy over the last 77d

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars1Stargazers on the source repository.
Last commit5mo agoMost recent push to the default branch.
Tools exposed6Callable tools this server registers over MCP.

How Relay MCP works

What relay-mcp MCP server does

The relay-mcp MCP server creates a shared space for messages exchanged between separate Claude sessions. A Code session can post implementation state for a Chat session, while a scheduled Cowork task can leave a message for a later conversation. The relay is intended as a lightweight shared whiteboard rather than an event log or long-term memory system.

Threads have names, activity information, message counts, and preserved history. Each message records a surface value such as chat, cowork, code, or other, along with an optional session tag. The v1 deployment is single-tenant and uses one configured user UUID.

How it works

The application runs in a Cloudflare Worker and exposes streamable HTTP MCP at /mcp. Supabase Postgres stores relay threads, messages, and read cursors in three tables prefixed with relay_. The Worker uses its Supabase service-role key for database access; row-level security is enabled without public policies.

The relay-mcp MCP server supports two authentication paths. Claude Code and Cowork can send a static bearer token in the Authorization header. Claude.ai custom connectors use OAuth 2.1 with Dynamic Client Registration. The Worker provides the OAuth discovery, registration, authorization, and token endpoints. Access tokens are HS256 JWTs signed with the configured API key, with 90-day access-token and 365-day refresh-token lifetimes.

Setup and configuration

Self-hosting requires a Cloudflare account, a Supabase project, and Node 20 or newer for local installation and deployment. Apply the supplied database migration in Supabase, create a UUID for the single tenant, then store these Worker secrets:

  • RELAY_API_KEY
  • SUPABASE_URL
  • SUPABASE_SERVICE_KEY
  • RELAY_USER_ID

Install dependencies with npm install and deploy with npx wrangler deploy. The resulting Worker URL becomes the MCP endpoint when /mcp is appended. A custom Cloudflare hostname can be configured through wrangler.toml.

Claude Code and Cursor can connect directly with an HTTP MCP configuration and a bearer header. Cowork scheduled tasks accept an mcp_servers configuration block. Claude Desktop requires the mcp-remote bridge because its configuration expects a stdio-launched command rather than a remote HTTP URL. Claude.ai can add the deployment as a custom connector and complete authorization in a browser.

Tools and capabilities

The relay-mcp MCP server exposes six tools:

  • relay_list_threads returns threads with their latest activity and message counts.
  • relay_create_thread creates a named thread.
  • relay_post_message adds a message and creates the thread if it does not exist.
  • relay_read_thread returns recent messages in newest-first order and can update a reader cursor.
  • relay_check_new returns messages added since that reader last checked.
  • relay_archive_thread soft-archives a thread while keeping its history.

These operations support both broad thread inspection and reader-specific polling. Read cursors let separate sessions check for new messages without repeatedly processing the complete thread.

Limitations and notes

The first version supports one tenant, selected through RELAY_USER_ID; data associated with another UUID is not visible to the configured tenant. Production use requires deploying your own instance rather than relying on the author's private deployment.

Keep the Supabase service-role key and relay API key private. A mismatched bearer key produces unauthorized responses, while a missing or incorrect service-role key commonly causes Worker errors. Claude Desktop may rewrite its configuration file during session lifecycle events, so its manual server entry can need restoration. The relay preserves thread history, but it is described as a shared whiteboard, not a memory store.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Relay MCP

relay-mcp is an MCP server that connects Claude Code, Cowork, and Claude.ai sessions through shared message threads. Its main tools list and create threads, post messages, read recent or unread messages, and soft-archive threads while preserving history. It runs on a self-hosted Cloudflare Worker with Supabase Postgres storage.

Deploy it with Cloudflare Workers and Supabase. Create a Supabase project, run the supplied migration, set the four Worker secrets, install dependencies with Node 20 or newer, and run `npx wrangler deploy`. Use the resulting `/mcp` URL in your client configuration.

Yes, relay-mcp works with Cursor through its HTTP MCP configuration. Add the deployed `/mcp` URL and an `Authorization: Bearer <RELAY_API_KEY>` header inside the `mcpServers` object, then restart Cursor and verify that the six tools appear.

Use the `mcp-remote` bridge because Claude Desktop expects a stdio command instead of a remote HTTP URL. Configure `npx -y mcp-remote` with the relay `/mcp` endpoint and bearer header, then fully quit and reopen Claude Desktop.

Yes, relay-mcp supports Claude.ai custom connectors through OAuth 2.1 and Dynamic Client Registration. Add the `/mcp` URL as a custom connector, leave advanced OAuth fields blank, and enter the `RELAY_API_KEY` on the Worker's authorization page.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewRelay MCP AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/relay-mcp?style=directory)](https://allmcps.com/mcp/relay-mcp)
HTML Embed
<a href="https://allmcps.com/mcp/relay-mcp"><img src="https://allmcps.com/api/badge/relay-mcp?style=directory" alt="Relay MCP on AllMCPs" /></a>