# relay-mcp [Health: Active]

**Category:** 🗣️ Conversational AI  
**Repository:** https://github.com/zhowe-designs/relay-mcp  
**GitHub Stars:** 1  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/relay-mcp

## Description
Self-hosted session relay. Shared threads across Claude Code, Cowork, and Claude.ai.

## Tools
Capabilities this server exposes over MCP:

- **relay_list_threads** — List threads with last activity and message count.
- **relay_create_thread** — Create a named thread.
- **relay_post_message** — Post a message to a thread. Auto-creates the thread if missing.
- **relay_read_thread** — Read recent messages, newest first. Optional cursor update.
- **relay_check_new** — Return only messages since this reader last checked.
- **relay_archive_thread** — Soft-archive a thread. History is preserved.

## Claude Desktop Quick Installation
No generated config for this server: it installs through its own setup steps.

The project's own setup steps (from https://github.com/zhowe-designs/relay-mcp), copied verbatim. Follow them in order; they are not an mcpServers config.

1. Install:

```sh
git clone https://github.com/zhowe-designs/relay-mcp.git
```

2. Install:

```sh
cd relay-mcp
```

3. Install:

```sh
npm install
```

4. Sign in:

```sh
npx wrangler login
```

5. Configure:

```sh
npx wrangler secret put RELAY_API_KEY        # any random 32+ char string, your bearer
```

6. Configure:

```sh
npx wrangler secret put SUPABASE_URL          # https://<project-ref>.supabase.co
```

## Documentation

## 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.

_Full upstream README: https://allmcps.com/mcp/relay-mcp/readme_

