Surva.ai MCP server reference
The Surva.ai MCP server lets any Model Context Protocol client read a Surva.ai account's AI search visibility data and, with permission, add prompts and competitors. This page covers connection, authentication, every tool, limits and protocol behavior.
Overview
- Server URL
- https://app.surva.ai/mcp
- Transport
- Streamable HTTP, POST only, JSON responses, stateless
- Protocol versions
- 2026-07-28, 2025-11-25, 2025-06-18, 2025-03-26, 2024-11-05
- Capabilities
- tools, prompts
Read tools return data Surva.ai has already collected on its scheduled refreshes. They never trigger new AI queries, so results match the Surva.ai dashboard and cost nothing beyond your plan. Every result includes app_link URLs into the web app.
Quick start
Clients with OAuth support only need the server URL. Signed-in users get step-by-step instructions in Settings, AI assistants.
Claude and ChatGPT
Add a custom connector (Claude: Settings, Connectors; ChatGPT: Settings, Apps & Connectors) with the server URL, then approve access on the Surva.ai consent screen.
Claude Code
claude mcp add --transport http surva https://app.surva.ai/mcp
Cursor (~/.cursor/mcp.json)
{
"mcpServers": {
"surva": { "url": "https://app.surva.ai/mcp" }
}
}
VS Code (.vscode/mcp.json)
{
"servers": {
"surva": { "type": "http", "url": "https://app.surva.ai/mcp" }
}
}
Clients without OAuth
{
"mcpServers": {
"surva": {
"url": "https://app.surva.ai/mcp",
"headers": { "Authorization": "Bearer sva_pat_..." }
}
}
}
Authentication
Every request except server/discover needs a bearer token in the Authorization header. Unauthenticated requests get 401 with a WWW-Authenticate header pointing to the protected resource metadata, which is how MCP clients start OAuth automatically.
OAuth 2.1
| Protected resource metadata | https://app.surva.ai/.well-known/oauth-protected-resource/mcp |
|---|---|
| Authorization server metadata | https://app.surva.ai/.well-known/oauth-authorization-server |
| Authorization endpoint | https://app.surva.ai/oauth/authorize |
| Token endpoint | https://app.surva.ai/oauth/token |
| Registration endpoint | https://app.surva.ai/oauth/register |
| Revocation endpoint | https://app.surva.ai/oauth/revoke |
- Authorization code grant with PKCE (S256 only). Public clients; no client secret.
- Client registration: Client ID Metadata Documents (an HTTPS client_id URL) are preferred. Dynamic Client Registration (RFC 7591) is supported for older clients.
- Redirect URIs must be HTTPS, loopback HTTP (http://127.0.0.1, http://localhost, any port) or a private-use scheme such as cursor://.
- Send resource=https://app.surva.ai/mcp (RFC 8707). Authorization responses include iss (RFC 9207).
- Access tokens last 60 minutes. Refresh tokens last 60 days and rotate on every use.
- The consent screen lets the user pick an account or a single brand and decide whether to allow changes.
Personal access tokens
For scripts, agents and clients without OAuth. Create them in Settings, AI assistants. Tokens start with sva_pat_, act as the user who created them, and work until revoked. Surva.ai stores only a SHA-256 hash, so a lost token cannot be recovered; create a new one.
Scopes and brand access
| Scope | Grants |
|---|---|
| read | All read tools. Always granted. |
| write | add_prompt and add_competitor. Granted only when the user ticks "Allow changes". |
A connection covers either every brand in one account or a single brand. Brand-specific tools take an optional brand argument (ID, name or domain). Without it, the server uses the connection's only brand, then the user's current brand, then the account's first brand. Call list_brands to see what a connection can reach.
Tools
All tools return a JSON object as structuredContent and the same JSON as a text content block. Tools are listed in alphabetical order and annotated with readOnlyHint, idempotentHint and destructiveHint: false.
Read tools
get_ai_traffic
AI referral traffic
Visits to the brand's website referred by AI assistants (ChatGPT, Perplexity, Claude, Gemini, Copilot and Google AI) over the last 30 days: totals, change, breakdown by source and top landing pages.
| Argument | Type | Default | Description |
|---|---|---|---|
| brand | string | Brand ID, name or domain. Optional: defaults to the connection's brand. Call list_brands to see the brands you can use. |
get_answer_gaps
AI answer gaps
Prompts where AI engines recommend competitors but not the brand, with priority, the competitors named and the engines involved. These are the highest-leverage content and PR opportunities.
| Argument | Type | Default | Description |
|---|---|---|---|
| brand | string | Brand ID, name or domain. Optional: defaults to the connection's brand. Call list_brands to see the brands you can use. | |
| priority | all | high | medium | low | all | Only gaps with this priority. |
| limit | integer (1-100) | 20 | Maximum gaps to return. |
get_citations
Sources cited by AI
The domains and pages AI engines cite when answering the brand's tracked prompts, ranked by how often they are cited. Filter to your own pages, competitor pages or third-party sources.
| Argument | Type | Default | Description |
|---|---|---|---|
| brand | string | Brand ID, name or domain. Optional: defaults to the connection's brand. Call list_brands to see the brands you can use. | |
| type | all | yours | competitors | third_party | all | Which sources to include. |
| engine | string | Only sources cited by this engine, e.g. ChatGPT or Perplexity. | |
| limit | integer (1-100) | 20 | Maximum sources to return. |
get_competitor_ads
Competitor Google ads
Recent Google search ads Surva.ai captured on the brand's tracked searches: advertiser, headline, description, landing page and when it was first and last seen.
| Argument | Type | Default | Description |
|---|---|---|---|
| brand | string | Brand ID, name or domain. Optional: defaults to the connection's brand. Call list_brands to see the brands you can use. | |
| competitor | string | Only ads from this competitor (name, domain or ID). | |
| days | integer (1-365) | 30 | Only ads seen in the last N days. |
| limit | integer (1-100) | 20 | Maximum ads to return. |
get_insights
Insights and recommendations
Open insights and recommended actions Surva.ai generated for the brand, such as new competitor moves, visibility drops and content opportunities, ordered newest first.
| Argument | Type | Default | Description |
|---|---|---|---|
| brand | string | Brand ID, name or domain. Optional: defaults to the connection's brand. Call list_brands to see the brands you can use. | |
| priority | all | high | medium | low | all | Only insights with this priority. |
| limit | integer (1-50) | 15 | Maximum insights to return. |
get_organic_rankings
Organic Google rankings
Organic Google rankings for the brand's tracked searches: your position and change, who ranks first, whether an AI Overview appears and whether you are in it, plus the top organic competitors.
| Argument | Type | Default | Description |
|---|---|---|---|
| brand | string | Brand ID, name or domain. Optional: defaults to the connection's brand. Call list_brands to see the brands you can use. | |
| sort | biggest_changes | best_positions | opportunities | biggest_changes | Sort order. |
| limit | integer (1-100) | 25 | Maximum searches to return. |
get_prompt_details
Prompt details and AI answers
Shows what each AI engine currently answers for one tracked prompt: an excerpt of the answer, the brands it names and in what order, sentiment, cited sources, related questions, and Google ads on the same search. Use it to explain why a brand is or is not recommended.
| Argument | Type | Default | Description |
|---|---|---|---|
| brand | string | Brand ID, name or domain. Optional: defaults to the connection's brand. Call list_brands to see the brands you can use. | |
| prompt (required) | string | Prompt ID from list_prompts, or the prompt text. | |
| answer_chars | integer (200-6000) | 1500 | Maximum characters of each answer to include. |
get_visibility_overview
AI visibility overview
Headline AI search visibility for a brand: the share of tracked prompts where ChatGPT, Perplexity, Claude, Gemini and Google AI Overviews mention it, share of voice, week over week change, visibility by engine, citation counts, the competitor leaderboard, open answer gaps and recent ad activity.
| Argument | Type | Default | Description |
|---|---|---|---|
| brand | string | Brand ID, name or domain. Optional: defaults to the connection's brand. Call list_brands to see the brands you can use. |
get_visibility_trend
AI visibility trend
AI visibility over time for a brand and its top competitors, as a series of percentages (share of tracked prompts where each brand is mentioned).
| Argument | Type | Default | Description |
|---|---|---|---|
| brand | string | Brand ID, name or domain. Optional: defaults to the connection's brand. Call list_brands to see the brands you can use. | |
| period | 14d | 30d | 3m | 30d | Time range: 14d or 30d (daily points) or 3m (weekly points). |
| max_brands | integer (1-15) | 6 | Maximum number of brands to include, your brand first. |
list_brands
List brands
Lists the brands this connection can access, with the number of tracked prompts and competitors for each, plus the account plan and whether changes are allowed. Call this first when the user may have more than one brand.
list_competitors
Competitor AI visibility
Ranks the brand and its tracked competitors by AI visibility and share of voice, with mention counts per engine and the number of prompts where each appears.
| Argument | Type | Default | Description |
|---|---|---|---|
| brand | string | Brand ID, name or domain. Optional: defaults to the connection's brand. Call list_brands to see the brands you can use. | |
| limit | integer (1-50) | 15 | Maximum competitors to return. |
list_prompts
List tracked prompts
Lists the prompts (buyer questions) Surva.ai tracks for a brand, with whether each AI engine mentions the brand, its average position and sentiment, the top brands named instead, and search demand. Filter to prompts where the brand is missing to find gaps.
| Argument | Type | Default | Description |
|---|---|---|---|
| brand | string | Brand ID, name or domain. Optional: defaults to the connection's brand. Call list_brands to see the brands you can use. | |
| filter | all | missing | mentioned | all | all, missing (brand not mentioned by any engine) or mentioned. |
| sort | visibility | trend | volume | opportunity | newest | visibility | Sort order. |
| search | string | Only prompts containing this text. | |
| limit | integer (1-100) | 25 | Maximum prompts to return. |
Write tools (scope: write)
add_competitor
Track a new competitor
Adds a competitor to a brand so Surva.ai tracks its AI visibility, citations, ads and rankings. Counts toward the plan's competitor limit; confirm with the user first.
| Argument | Type | Description |
|---|---|---|
| brand | string | Brand ID, name or domain. Optional: defaults to the connection's brand. Call list_brands to see the brands you can use. |
| name (required) | string | Competitor name, e.g. "HubSpot". |
| domain (required) | string | Competitor website domain, e.g. "hubspot.com". |
add_prompt
Track a new prompt
Starts tracking a buyer question (prompt) for a brand across ChatGPT, Perplexity, Claude, Gemini and Google AI Overviews. Counts toward the plan's prompt limit; confirm with the user first. If the prompt is already tracked, returns the existing one.
| Argument | Type | Description |
|---|---|---|
| brand | string | Brand ID, name or domain. Optional: defaults to the connection's brand. Call list_brands to see the brands you can use. |
| prompt (required) | string | The question a buyer would ask an AI assistant, e.g. "best CRM for small agencies". |
Prompts
Prompt templates appear in clients as slash commands or quick actions and guide the assistant through the right tools.
-
competitor_deep_dive
Compare one competitor against your brand across AI answers, citations, ads and organic search.
Arguments: competitor (required), brand
-
content_gap_plan
Turn the prompts where AI recommends competitors instead of you into a prioritized content plan.
Arguments: brand, count
-
investigate_prompt
Explain why AI engines do or do not recommend your brand for a specific buyer question.
Arguments: prompt (required), brand
-
weekly_ai_visibility_report
A one-page summary of how ChatGPT, Perplexity, Claude, Gemini and Google AI Overviews talk about your brand this week.
Arguments: brand
Limits
Limits apply per Surva.ai account across all of its connections. Up to 60 tool calls per minute, plus a daily allowance by plan that resets at midnight:
| Plan | Tool calls per day |
|---|---|
| Free Trial | 250 |
| Starter | 1,000 |
| Growth | 5,000 |
| Business | 20,000 |
Write tools also count toward the plan's prompt and competitor limits, exactly as in the web app. Listing tools and prompts does not count toward limits.
Errors
| Situation | Response |
|---|---|
| Missing, expired or revoked token | HTTP 401 with WWW-Authenticate: Bearer resource_metadata="..." |
| Bad tool argument, unknown brand, read-only connection, rate or daily limit, inactive subscription | Tool result with isError: true and a message the assistant can act on |
| Unknown tool or malformed params | JSON-RPC error -32602 |
| Unknown method | JSON-RPC error -32601 (HTTP 404 for 2026-07-28 requests) |
| Headers do not match the body | HTTP 400, JSON-RPC error -32020 (HeaderMismatch) |
| Unsupported protocol version | HTTP 400, JSON-RPC error -32022 with the supported versions in data.supported |
| Opaque or non-HTTP(S) Origin header | HTTP 403 |
Protocol details
- Modern clients (2026-07-28): stateless. Send the version in params._meta["io.modelcontextprotocol/protocolVersion"] and mirror it in the MCP-Protocol-Version header, with Mcp-Method on every request and Mcp-Name on tools/call and prompts/get. server/discover is available without authentication. Results carry resultType, list results carry ttlMs and cacheScope.
- Earlier clients (2024-11-05 to 2025-11-25): the initialize handshake and ping work as before. The server does not issue Mcp-Session-Id; requests are independent and can hit any server instance.
- There is no GET stream. GET and DELETE on the endpoint return 405. All responses are single JSON objects.
- Tools and prompts do not change at runtime, so listChanged is false.
Raw HTTP example
Call a tool with a personal access token:
curl https://app.surva.ai/mcp \
-H "Authorization: Bearer $SURVA_TOKEN" \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-H "MCP-Protocol-Version: 2026-07-28" \
-H "Mcp-Method: tools/call" \
-H "Mcp-Name: get_visibility_overview" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call",
"params":{"name":"get_visibility_overview","arguments":{"brand":"acme.com"},
"_meta":{"io.modelcontextprotocol/protocolVersion":"2026-07-28"}}}'
Response (shortened):
{"jsonrpc":"2.0","id":1,"result":{
"content":[{"type":"text","text":"{\"brand\":{\"name\":\"Acme\",...}}"}],
"structuredContent":{
"brand":{"id":"...","name":"Acme","domain":"acme.com"},
"summary":{"ai_visibility_percent":42.5,"share_of_voice_percent":18.2,"tracked_prompts":40},
"visibility_by_engine_percent":{"ChatGPT":48,"Perplexity":51,"Claude":35,"Gemini":30},
"app_link":"https://app.surva.ai/ai-visibility"
},
"isError":false,
"resultType":"complete"
}}
Need help?
Building an integration or listing Surva.ai in a client directory? Contact us. For product details see the MCP server overview.