Connect Gavana to Claude Code
Claude Code can reach Gavana two ways. Pick one — do not configure both under the same server name.
| Hosted (OAuth) | Local | |
|---|---|---|
| Transport | HTTP | stdio |
| Sign-in | Browser | Your Gavana CLI login, or a Personal Access Token you paste once |
| Tools | Lists 17 core hosted tools; the rest stay callable by name | The full local catalog |
| Setup | Two commands | One command |
| Scope control | Normal (eight permissions) or Read-only access | Per token, exactly the scopes you pick |
Choose hosted for the fastest setup with no secret to manage. Choose local when you want fine-grained scopes, Image Actions, Recipe forking, uploads from local files, or a read-only agent with a precise token.
Let Claude Code set itself up
In Gavana, open Settings → Connect an agent, click Copy message under Let your agent set it up, and paste it into Claude Code. It checks whether Gavana tools are already available, adds the hosted server only if they are not, starts the sign-in, and tells you to click Connect in the browser. Nothing else to type.
Option A — Hosted MCP over OAuth
These are the same commands Gavana shows under Settings → Connect an agent → Claude Code.
Add the MCP server
claude mcp add --transport http --scope user gavana https://app.gavana.ai/mcpThis only registers the server. It does not sign you in.
Start sign-in
claude mcp login gavanaYour browser opens Gavana. Inside Claude Code you can do the same with /mcp, choosing gavana.
Click Connect on the Gavana page
Gavana’s approval page names the app asking for access and shows Connecting as with your email. If that is the right account, review the permissions and click Connect.
If you already use the Gavana CLI, gavana mcp install claude runs the same claude mcp add command for you and answers with what is left to do: restart the client, sign the server in from inside Claude Code, and confirm with a read-only call. gavana mcp config claude prints the command without running it.
Resulting permission surface. The consent screen asks for eight permissions — canvas:read, canvas:write, asset:read, element:read, element:write, image:generate, video:generate, and job:manage — so image and video generation are reachable and can be billed to your Gavana account. For a connection that can only read canvases and Elements, turn on Read-only access in Gavana’s Claude Code steps (or add --read-only to gavana mcp install claude) before you run the command; it registers under its own server name, so it never replaces your full entry.
Option B — Local MCP
Choose how the server signs in
With the Gavana CLI. If you have run gavana auth login on this machine, the local server reads that login and you need no token:
claude mcp add --transport stdio --scope user gavana -- npx -y @gavana.ai/mcp@0.5.1With a Personal Access Token. Follow Create an Agent Access Token and name the token for this machine — for example Claude Code · MacBook Air. New tokens default to eight of the nine permissions and Never expiry. Choose a narrower scope set or a custom 1–90 day expiry only when that boundary is deliberate. Then continue with the next step.
Register the server with the token
This command prompts for the token rather than embedding it, so the command itself is safe to leave in shell history. Claude Code stores the value in your private user-scoped MCP configuration. It is the command Gavana shows after you create a token and choose Connect with: Claude Code.
macOS and Linux (zsh):
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_TOKENBash:
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_TOKENWindows PowerShell (Gavana’s Claude Code on Windows option):
$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 }Paste the token when prompted and press Return.
Verify the registration
claude mcp get gavanaConfirm inside Claude Code
Start Claude Code and run /mcp. Gavana should appear as connected.
Resulting permission surface. Exactly the scopes on the token or CLI login — nothing more. A call outside them fails with a permission error rather than succeeding. If the credential has no image:generate or video:generate, no generation tool can spend anything.
For a read-only local server, add --env GAVANA_MCP_READ_ONLY=true. Scoping the token is the stronger control; use both if you want belt and braces.
Verify it works
Ask Claude Code for something read-only first:
Using Gavana, list my canvases and read the most recently updated one. Report its
handle, revision, node count, and connection count. Do not change anything.You should see canvas_list then canvas_get, and a report built from real handles.
Disconnect
claude mcp remove gavanaThen revoke the connection in Gavana under Settings → Connect an agent → Connected. Removing the MCP server stops Claude Code from using it; revoking stops anything from using that credential.
Troubleshooting
| Symptom | Cause | Fix |
|---|---|---|
Server does not appear in /mcp | Registration used a project scope in a different directory | Re-run with --scope user |
| Server is listed but every call asks for sign-in | claude mcp add registers without signing in | Run claude mcp login gavana, or /mcp and choose gavana |
| “Already have a server called gavana” | An older entry uses the same name | claude mcp remove gavana, then add it again |
| Every call returns a permission error | Token lacks the scope, or is read-only | Check the scopes on the token; create a new one if needed |
| Waiting for a result always fails | Token lacks job:manage | Add job:manage, or use --no-wait plus a webhook via the CLI |
npx cannot resolve the package | Package not reachable from this machine | See other clients |
More: MCP troubleshooting and Agent troubleshooting.