Documentation Index
Fetch the complete documentation index at: https://docs.cometly.com/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
- A Cometly workspace and a Space you have Use Public API permission in.
- Claude Code installed.
- Your numeric Space ID — copy it from the ID row at the bottom of the dashboard sidebar, or from Space Settings → Space Details. See Finding your Space ID for step-by-step instructions.
Add the server
From your terminal:42 with your Space ID. Claude Code stores the config in ~/.claude/config.json. To inspect what was saved:
Authorize
The first time Claude Code uses the server, it’ll print an OAuth URL to your terminal. Open it in your browser, log in, pick the Space, and click Approve. Claude Code completes the handshake and caches the token at~/.claude/mcp/cometly/credentials.json.
Verify
Start a new session and ask:query_ad_metrics tool call followed by a real answer. If you’d rather invoke the server programmatically (e.g. from a CI job), you can pipe a prompt straight in:
Troubleshooting
claude mcp list shows the server but tool calls fail
claude mcp list shows the server but tool calls fail
Confirm the URL is correct and that you replaced Then ask Claude to use the server again — it’ll re-authorize.
{space_id} with your numeric Space ID. To re-walk OAuth, remove the cached credentials:No OAuth URL appears
No OAuth URL appears
Make sure you’re on a recent Claude Code version that supports HTTP transport MCP servers.
claude --version should be at least the version that ships with claude mcp add --transport http.403 on subsequent calls after working briefly
403 on subsequent calls after working briefly
The token was approved for a different Space than the one in the URL, or you lost API permission. Remove the credentials and re-authorize, picking the correct Space.
Common patterns
-
One-shot analysis in CI:
-
Interactive with explicit Space switching: add multiple servers under different names if you regularly work across spaces.
Then prompt with the explicit name: “Using
cometly-prod, …” -
Scoped tool restriction: Claude Code respects per-server
--allow-toolsflags if you want to limit a session to just read-only metric queries.