Skip to Content
MCPInstallClaude Code

Claude Code

Claude Code supports both shapes: the hosted server over streamable HTTP with browser OAuth, and the local stdio server on your Gavana CLI login or an Agent Access token.

Hosted

Copy these exactly — they are what Gavana shows under Settings → Connect an agent → Claude Code:

claude mcp add --transport http --scope user gavana https://app.gavana.ai/mcp claude mcp login gavana

The first command only registers the server. The second starts sign-in: a browser opens, you sign in to Gavana, and the consent screen asks for eight permissions. Click Connect. Inside Claude Code, /mcp and choosing gavana starts the same sign-in.

Prefer not to type anything? In Settings → Connect an agent, click Copy message and paste it into Claude Code. It checks for Gavana tools first, adds the server only if they are missing, and starts the sign-in.

Permission surface: Claude Code lists 17 core hosted tools — canvas reads and writes, task canvas creation, image import and generation, video, Elements, model discovery, and Run status — and can call every other hosted tool by exact name.

This grants Claude Code the ability to start paid generation, billed through your Gavana account. The server’s own instructions tell the model to ask for explicit current-turn approval first and never to auto-retry a failed paid call, but the capability is present.

For a connection that can only read canvases and Elements, turn on Read-only access in Gavana’s Claude Code steps before you copy the commands. They then register a separate server named gavana-readonly.

Let the Gavana CLI do it

If you already have the Gavana CLI installed, it runs the same claude mcp add command for you:

gavana mcp install claude

Add --read-only for the read-only server. The command answers with what is left: restart Claude Code, sign the server in from inside it (/mcp, choose gavana), and confirm with a read-only call — a status line saying connected is not proof.

To see the command without running it:

gavana mcp config claude

That prints the client, transport, endpoint, server name, and the exact command and args it would execute.

Local stdio server

Use this when you need the local surface: individual node_* and connection_* operations, deterministic image action_* tools, recipe_fork, asset_upload from local files, canvas_render, or provider discovery. See the local tools reference. You need Node.js 20 or newer.

With your Gavana CLI login

If gavana auth login has run on this machine, the server reads that login. No token:

claude mcp add --transport stdio --scope user gavana -- npx -y @gavana.ai/mcp@0.5.1

With an Agent Access token

Create one first: Create an Agent Access Token. These commands prompt for it so it never lands in your shell history. They are the commands Gavana shows after you create a token and choose Connect with: Claude Code or Claude Code on Windows.

zsh (the macOS default):

read -rs 'GAVANA_PERSONAL_ACCESS_TOKEN?Paste Personal Access Token: '; printf '\n'; claude mcp add --transport stdio --scope user --env GAVANA_BASE_URL='https://app.gavana.ai' --env GAVANA_AGENT_TOKEN="$GAVANA_PERSONAL_ACCESS_TOKEN" gavana -- npx -y @gavana.ai/mcp@0.5.1; unset GAVANA_PERSONAL_ACCESS_TOKEN

Bash:

read -rsp 'Paste Personal Access Token: ' GAVANA_PERSONAL_ACCESS_TOKEN; printf '\n'; claude mcp add --transport stdio --scope user --env GAVANA_BASE_URL='https://app.gavana.ai' --env GAVANA_AGENT_TOKEN="$GAVANA_PERSONAL_ACCESS_TOKEN" gavana -- npx -y @gavana.ai/mcp@0.5.1; unset GAVANA_PERSONAL_ACCESS_TOKEN

Claude Code stores the value in your private user-scoped MCP configuration. The shell command itself contains no secret, so it is safe to keep in history or share.

Windows PowerShell:

$secureToken = Read-Host 'Paste Personal Access Token' -AsSecureString; $tokenPointer = [Runtime.InteropServices.Marshal]::SecureStringToBSTR($secureToken); try { $token = [Runtime.InteropServices.Marshal]::PtrToStringBSTR($tokenPointer); claude mcp add --transport stdio --scope user --env GAVANA_BASE_URL='https://app.gavana.ai' --env "GAVANA_AGENT_TOKEN=$token" gavana -- npx -y @gavana.ai/mcp@0.5.1 }; finally { if ($tokenPointer -ne [IntPtr]::Zero) { [Runtime.InteropServices.Marshal]::ZeroFreeBSTR($tokenPointer) }; Remove-Variable token, tokenPointer, secureToken -ErrorAction SilentlyContinue }

Permission surface: the local catalog, acting with exactly the scopes on the login or token. A token with only canvas:read yields a read-only local server no matter which tools are registered — the scopes are the boundary, not the tool list.

Narrow it further

To restrict the local server without changing the credential, add environment variables to the same claude mcp add command:

--env GAVANA_MCP_READ_ONLY=true --env GAVANA_MCP_TOOLSETS=canvas,assets --env GAVANA_MCP_EXCLUDE_TOOLS=node_delete,job_cancel

GAVANA_MCP_READ_ONLY=true registers only tools whose annotations guarantee no mutation, generation, or cancellation.

Keep guide_search, guide_get, and canvas_validate enabled whatever else you cut. They are read-only, free, and they are how the agent learns the rules and checks its own work.

Verify

Run /mcp in Claude Code. You should see gavana connected — with 17 tools on the hosted server by default, or the local catalog narrowed by any filters you set.

Then ask it to list your canvases. If that fails while the server shows as connected, it is an authentication problem — see Troubleshooting.

Switching later

Remove and re-add. Changing the URL in place leaves the old OAuth grant attached:

claude mcp remove gavana claude mcp add --transport http --scope user gavana https://app.gavana.ai/mcp

Then revoke the old connection in Gavana under Settings → Connect an agent → Connected.

Last updated on