Skip to content
garage
Esc
navigateopen⌘Jpreview
On this page

Connect an MCP client

Connect an MCP client to the tools published by a garage repository.

A repository with built tools or dispatchable extensions exposes an MCP endpoint at:

https://api.thegarage.sh/api/repos/<namespace>/<repo>/mcp

<namespace> is the organization slug and <repo> is the repository name. Build and promote the extensions before you connect a client.

Create an API key

To list tools, a client needs repos:read. To call a tool, a client needs repos:read and repos:write.

garage keys create repo-mcp \
  --scope repos:read \
  --scope repos:write

Store the printed key as GARAGE_MCP_KEY.

Configure the client

Add a project-level .mcp.json:

{
  "mcpServers": {
    "garage-repo": {
      "type": "http",
      "url": "https://api.thegarage.sh/api/repos/<namespace>/<repo>/mcp",
      "headers": {
        "Authorization": "Bearer ${GARAGE_MCP_KEY}"
      }
    }
  }
}

Set GARAGE_MCP_KEY before you start Claude Code. Then inspect the server:

claude mcp get garage-repo

Configure a streamable HTTP server. Use the repository endpoint and the bearer header:

{
  "mcpServers": {
    "garage-repo": {
      "type": "http",
      "url": "https://api.thegarage.sh/api/repos/<namespace>/<repo>/mcp",
      "headers": {
        "Authorization": "Bearer grg_..."
      }
    }
  }
}

Keep a literal key in the user-level configuration. Do not commit a literal key to a project file.

See the MCP endpoint reference for protocol methods, responses, and errors.

Was this page helpful?