Skip to main content
Glama

mcp-relay

Give your AI assistant one local connection to GitHub, Notion, HeroUI, and your other tools.

You could ask, “Find the open GitHub issues for this feature and compare them with our Notion plan.” Your AI app starts mcp-relay on your computer. The relay finds the relevant tools and runs the assistant's script in a Docker sandbox.

Quick start · Edit your connections · View logs · Client setup

Quick start

  1. Build the relay. From this checkout, with Node.js 22.20+ and pnpm 11.10.0, run:

    pnpm install --frozen-lockfile && pnpm build
  2. Choose your connections. Copy .mcp.config.example to .mcp.config in the same folder. It comes with a public documentation server enabled so you can try it right away.

  3. Connect your AI app. Run setup from the relay folder. It prints a ready-to-use entry with the full paths to Node and the relay filled in.

    • Codex: run node dist/cli.js setup --client codex, then run the codex mcp add command it prints.

    • Claude Code: run node dist/cli.js setup --client claude, then run the claude mcp add command it prints.

    • LM Studio, Claude Desktop, or another app: run node dist/cli.js setup and paste the printed entry into the app's MCP settings. Where each app keeps them

    Restart the app and try:

    Use mcp-relay to find a tool that searches developer documentation.

Enable tool execution

Tool discovery works as soon as your app connects. To run tools, start Docker and build the sandbox image from the relay folder.

docker build -t mcp-relay-sandbox ./sandbox

The relay starts and removes containers for each run. Try asking, “Use mcp-relay to look up how to connect a local MCP server and summarize the steps.”

Related MCP server: AKIMCP

Edit your connections

Add or paste entries into mcpServers in .mcp.config. Set enabled to false to keep an entry turned off. Restart the AI app after editing the file.

{
  "mcpServers": {
    "notion": {
      "url": "https://mcp.notion.com/mcp",
      "auth": "oauth"
    }
  }
}

When a server with "auth": "oauth" needs sign-in, the relay opens your browser. Once you approve, the server's tools become available in the current session. If the browser can't launch, look for the sign-in link in your AI app's MCP server logs. The relay saves the sign-in locally and reuses it across projects. This works with servers that support dynamic OAuth client registration.

The starter config includes three optional connections.

Connection

What to do

GitHub

Enable the entry and set GITHUB_PERSONAL_ACCESS_TOKEN in the environment your AI app passes to the relay. GitHub setup

Notion

Enable the entry, restart your AI app, and approve the browser sign-in. Notion setup

HeroUI

Enable the entry and restart the app. The relay launches the HeroUI React documentation server with npx. HeroUI setup

Remote entries use url and can include headers. Local entries use command and can include args, cwd, and env. Use ${ENV_VAR} references for credentials in config files. Browser sign-ins are stored with owner-only permissions in ~/.config/mcp-relay/auth/, or under $XDG_CONFIG_HOME if set.

Project settings

A .mcp.config in your app's project or its nearest parent takes precedence over the copy in the relay checkout. Existing .mcp-relay.json project files and ~/.config/mcp-relay/config.json user settings are supported. Entries in .mcp.config can override user entries with the same name.

  • enable selects connections from the user config. disable turns off named connections in either file.

  • toolFilters applies per-server allowTools and denyTools patterns to both discovery and execution.

  • sandbox.timeoutMs changes the 30-second run limit. sandbox.poolSize controls how many containers are kept ready. It defaults to one and accepts 0 through 4.

View logs

Open ~/.config/mcp-relay/logs/ in Finder or your file manager. If you set XDG_CONFIG_HOME, open $XDG_CONFIG_HOME/mcp-relay/logs/.

File

What you’ll see

sandbox-YYYY-MM-DD.jsonl

One record per run with captured console.log output, runtime, and the outcome or error. A timed-out run can have empty output.

YYYY-MM-DD.jsonl

One record per upstream tool call with the server, tool, duration, and outcome. The app's MCP server log also gets these records.

Files use UTC dates. The relay removes known credentials from sandbox output. Console output can contain private data your assistant prints.

Sandbox containers keep no Docker logs, so the relay's run output appears only in these files. For mcp-relay-… containers, docker logs and the logs view in Docker Desktop or OrbStack show “configured logging driver does not support reading.” That's expected.

Development

pnpm lint
pnpm typecheck
pnpm test

Run MCP_RELAY_DOCKER_TEST=1 pnpm test to include the Docker integration tests.

MIT license

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      A
      maintenance
      Exposes a governed, OAuth-gated suite of 38 tools that let web AI assistants like Claude, ChatGPT, and Grok work directly on your local machine — reading and editing files, running whitelisted shell commands, searching, querying SQLite, driving browsers and DevTools, managing background tasks and localhost services, and controlling Git, clipboard, notifications, and Postman. This lets users build, debug, and maintain projects, inspect databases and local APIs, and check on long-running jobs from a browser or phone without granting unrestricted shell access.
      -
    • A
      license
      Not graded
      quality
      A
      maintenance
      Exposes a governed suite of 38 OAuth-gated tools that let web-based AI chat clients read, write, edit, and search local files, run whitelisted shell commands, inspect databases and localhost APIs, drive browsers and DevTools, and manage background tasks, Git, clipboard, notifications, and ports. Local IDEs connect directly over loopback, while remote clients reach the same machine through a secure tunnel.
      MIT
    • A
      license
      Not graded
      quality
      A
      maintenance
      Connects web AI chats and local clients to your own machine through one OAuth-gated MCP endpoint, exposing 38 governed tools for files, shell commands, search, Git, SQLite, browser automation, DevTools, background tasks, localhost services, clipboard, notifications, ports, and Postman control. It lets assistants build and edit projects, inspect databases and local APIs, drive browser workflows, and manage long-running jobs without handing every client unrestricted shell access.
      MIT