MCP server
Connect an AI tool
How do I connect Claude Code or Cursor to /api/mcp?
Vantage serves a Model Context Protocol server at /api/mcp on the app's own host. An AI
agent you run (Claude Code, Claude Desktop, Cursor, your own client) calls it with a personal
token and gets your workspace's metrics as tools.
| Owns | Does not own |
|---|---|
| Four tools over the metrics and published dashboards the token's user can see (Tool reference) | The model: your agent runs its own; querying sends nothing to Anthropic |
| Personal tokens, rate limits, plan checks (Tokens and scope) | Raw SQL or table access: tools go through the metric catalogue only |
Before you start
| Needs | Why |
|---|---|
The server has an Anthropic key (ANTHROPIC_API_KEY) | Without it /api/mcp answers 404 and the MCP server panel is hidden |
| Plan: Business or Enterprise (standalone Vantage); Pro or Enterprise (Vantage in Norims) | Other plans see the panel with its plan badge and no Create token |
| You are a member of at least one project | The tools read the catalogue of the projects you belong to |
Create a token
- Open Integrations and scroll to MCP server.
- Enter a Token name, for example Claude Desktop, and select Create token.
- Copy the block under Copy this now. It will not be shown again. with Copy client config, then select Done.
The block is a ready client config:
{
"mcpServers": {
"vantage": {
"type": "http",
"url": "https://analytics.example.com/api/mcp",
"headers": {
"Authorization": "Bearer vmcp_…"
}
}
}
}url is the origin you created the token on.
Add it to a client
| Client | Where it goes |
|---|---|
| Claude Code | claude mcp add --transport http vantage https://analytics.example.com/api/mcp --header "Authorization: Bearer vmcp_…", or the block above in the project's .mcp.json |
| Claude Desktop | the mcpServers entry in claude_desktop_config.json |
| Cursor | the mcpServers entry in .cursor/mcp.json (project) or ~/.cursor/mcp.json (global) |
| Your own client | any Streamable HTTP MCP client, with the bearer header on every request |
Check it from a shell
curl -s https://analytics.example.com/api/mcp \
-H "Authorization: Bearer $VANTAGE_MCP_TOKEN" \
-H 'Content-Type: application/json' \
-H 'Accept: application/json, text/event-stream' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'Transport rules
| Rule | Value | Response when broken |
|---|---|---|
| Method | POST only | 405, Allow: POST |
Origin header | must be absent: a browser page may never call it | 403 |
| Auth | Authorization: Bearer vmcp_… | 401, WWW-Authenticate: Bearer |
| Sessions | none: each request stands alone, answered as JSON | |
| Request body | 64 KB | rejected by the transport |
| Tool result | 2 MB of JSON | tool error: That result is too large. Add a limit, or group by fewer dimensions. |
Errors outside a tool are JSON-RPC errors with code -32000 and id: null.
Next
- Tokens and scope: what a token sees, limits, revoking
- Tool reference: inputs and outputs of each tool