Connect Claude Code

On this page

Connect Relay to Claude Code in a terminal to work with the notes in your Relay Servers from there. You add the Relay MCP server in Claude Code and sign in to Relay in your browser.

If you added Relay at claude.ai or in the Claude desktop app, and Claude Code is signed in with the same Claude account, Claude Code already has it. See Connect Claude.

Add Relay in Claude Code

  1. In Claude Code on a Mac or Linux, paste this request:

    Add the Relay MCP server and sign me in. Run `claude mcp add -s user --transport http relay https://mcp.relay.md/mcp`. Then run the sign-in in the background and give me the sign-in link it prints: on macOS `script -q /dev/null claude mcp login relay`, on Linux `script -qec "claude mcp login relay" /dev/null`.
    
  2. Relay opens in your browser. Sign in if Relay asks, choose what Claude Code can access, then select Allow access.

    • All my Relays gives it every Shared Folder in every Relay Server you belong to, including ones you join later.
    • Selected Relays and Shared Folders gives it only the ones you pick, each as Read only or Can edit.
  3. Back in Claude Code, exit with /exit, then run claude --continue in the same folder. Your conversation picks up where it stopped, with Relay available.

If no page opens in step 2, select the link Claude Code gives you. To change what Claude Code can access later, use Connected apps.

Check the connection

Ask Claude Code to name a Shared Folder it can see on Relay. To see the server itself, run /mcp: relay is listed under User MCPs with a check mark and 4 tools.

Claude Code’s /mcp screen, Manage MCP servers, with one server under User MCPs: relay, connected, 4 tools.Claude Code’s /mcp screen, Manage MCP servers, with one server under User MCPs: relay, connected, 4 tools.Claude Code’s /mcp screen, Manage MCP servers, with one server under User MCPs: relay, connected, 4 tools.

Choose where Relay is available

The request adds Relay with -s user, so it’s available to you in every folder. To change that, use a different scope in the command:

Scope Who gets the server
-s user You, in every folder.
-s local You, only in the folder where you ran the command.
-s project Everyone who works in the project, through a shared .mcp.json file.