Skip to Content
AgentsConnect Grok

Connect Gavana to Grok

Grok Build — xAI’s terminal CLI — is the supported path. It speaks remote MCP over HTTP, runs the OAuth flow for you on first use, and stores the tokens itself. The grok.com connector surface exists too, but Gavana does not accept it yet; see the Grok app section below.

Connect with full access

https://app.gavana.ai/mcp

This is the default Gavana connection. Its consent screen asks for eight permissions — every permission except reference:extract, which no MCP tool uses — and the connection stays active until you revoke it.

Add the server

The quickest route is the CLI:

grok mcp add --transport http gavana https://app.gavana.ai/mcp

Add --scope project to write the entry into the current project rather than your user configuration.

Or declare it directly in ~/.grok/config.toml:

[mcp_servers.gavana] url = "https://app.gavana.ai/mcp"

No credential goes in this file. Gavana’s hosted endpoints use OAuth, and Grok triggers a browser flow on first use, storing tokens in ~/.grok/mcp_credentials.json. The --header flag exists for servers that authenticate with a static bearer token — Gavana is not one of them, so leave it off.

Two optional fields on the entry are worth knowing:

FieldDefaultWhat it does
startup_timeout_sec30How long Grok waits for the server to come up
tool_timeout_sec6000Per-tool timeout — generous enough for generation calls

Sign in and verify

The OAuth flow starts on the first call, so just use a Gavana tool and approve the consent screen when the browser opens.

grok mcp list

shows what is configured, and

grok mcp doctor gavana

diagnoses configuration and connectivity — it is the first thing to run when something is wrong. Add --json for machine-readable output.

Then ask for something read-only:

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.

Grok also reads MCP servers from ~/.claude.json, .cursor/mcp.json, and a project .mcp.json. If you have already configured Gavana for Claude Code or Cursor, Grok may pick that entry up on its own — including a local server holding a Personal Access Token. Run grok mcp list before adding anything, so you do not end up with two Gavana servers on different credentials.

The Grok app

Grok’s own connector surface lives at grok.com/connectors — New Connector, then Custom, then the MCP server URL and any required authentication. xAI requires the server to be reachable over the public internet, which Gavana’s hosted endpoints are.

Gavana does not currently support this path. When a request to a hosted Gavana endpoint arrives with an Origin header, that origin must be on Gavana’s browser allowlist or the request is rejected with 403 access_denied. The default allowlist is exactly https://chatgpt.com and https://claude.ai; https://grok.com is not on it, and only Gavana operators can extend the list. Use Grok Build instead.

xAI’s documentation does not state whether a Grok connector reaches the MCP server from xAI’s own infrastructure or from the browser, so we cannot say in advance whether that check would fire. Until grok.com is allowlisted and the path is tested end to end, the CLI is the one to use. Grok Build sends no Origin header, so the allowlist never applies to it.

Resulting permission surface

Normal connection

The consent screen groups the request under Canvases and images, Elements and saved references, and Image and video generation. It asks for eight permissions: canvas:read, canvas:write, asset:read, element:read, element:write, image:generate, video:generate, and job:manage. There is no partial approval on this path.

Grok Build lists 17 core 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. generate_image_in_canvas and generate_video can charge among the listed tools; edit_image_in_canvas, generate_product_photoshoot_in_canvas, run_canvas_workflow, recipe_run, and work_execute can charge when called by name. Full table: hosted MCP tools.

Cost exposure: real.

Read-only connection

In Gavana, open Settings → Connect an agent, choose Other, and turn on Read-only access before you copy the address. Use that address in place of the one above, under the server name gavana-readonly. Its consent screen asks only for canvas:read and element:read.

CanCannot
List and read canvases and ElementsCreate, update, move, or delete anything
Validate a canvas graphView image assets, or save an image
Read stored Work and Recipe detailsCreate or run a workflow, a Recipe, or Work
Read Gavana’s own agent guidanceGenerate an image or a video, or observe a Run
Spend a single credit

It serves the tools marked read-only in the hosted tools reference. Cost exposure: none.

The local stdio server

Grok Build can also launch Gavana’s local server as a child process, which exposes the full local tool catalog and signs in with your Gavana CLI login or a Personal Access Token rather than OAuth:

grok mcp add gavana -- npx -y @gavana.ai/mcp@0.5.1

The server needs Node.js 20 or newer, and either a Gavana CLI login on this machine (gavana auth login) or GAVANA_BASE_URL and GAVANA_AGENT_TOKEN in its environment. The real permission surface here is the token’s scopes, not the tool list — a tool called outside them fails with a permission error. GAVANA_MCP_READ_ONLY=true gives a hard read-only server, and GAVANA_MCP_TOOLSETS narrows the catalog; scoping the token is still the stronger control.

A Personal Access Token in a shell command lands in your shell history, and in a config file it is a live credential on disk. Keep either out of any repository. If it leaks, revoke that token immediately and create a new one — see the safety contract.

Disconnect

grok mcp remove gavana

Then revoke the connection in Gavana under Settings → Connect an agent → Connected — revocation takes effect immediately. Deleting ~/.grok/mcp_credentials.json clears the local tokens but does not revoke them server-side. If you used the local stdio path with a token, revoke that token in the same list.

Troubleshooting

SymptomCauseFix
Server not listedEntry written to a project scope in another directoryRe-add without --scope project, or run from that directory
Every call is unauthorizedOAuth not completedTrigger a Gavana tool and approve the browser prompt
Two Gavana servers appearGrok also read ~/.claude.json or .cursor/mcp.jsonRun grok mcp list and remove the one you do not want
Connection or tool calls time outDefaults too tight for this workloadRaise startup_timeout_sec or tool_timeout_sec
Generation is refusedA read-only connection, or a grant without the generation scopesReconnect with the normal address and approve the eight permissions
403 access_denied from the Grok appOrigin not on Gavana’s allowlistUse Grok Build; the app connector is not supported

grok mcp doctor gavana covers most of the above in one command.

More: MCP troubleshooting.

Security notes

  • The hosted server accepts OAuth bearer tokens only. Do not attempt to use a cba_… Personal Access Token there — that is the local MCP and API path.
  • Webhooks are not available through MCP by design: a signing secret must never enter model-visible tool arguments or tool logs. Use the CLI or the API when you need callbacks.
  • Generation is billed through your Gavana account — your own saved provider key, a key your workspace owner shares, or Gavana credit — never through xAI.
Last updated on