Documentation

MCP server

Use the Ranktune MCP server to call the public API from Cursor, Claude Desktop, ChatGPT, and other MCP clients.

MCP server

The Ranktune MCP server exposes the public API as tools for MCP-compatible clients such as Cursor, Claude Desktop, and ChatGPT. Authenticate with either an API key or OAuth 2.1 (required by ChatGPT and some other hosted clients).

Prerequisites

  • A Ranktune account on Business, Growth, or Enterprise
  • For API-key clients: create a key under Integrations → Ranktune API

See Authentication for plan requirements.

ChatGPT (OAuth)

ChatGPT Connectors use OAuth — API keys alone are not supported there.

  1. In ChatGPT, add a custom MCP connector / connector pointing at:

    https://api.tryranktune.com/v1/mcp

  2. ChatGPT discovers OAuth automatically via protected-resource metadata and dynamic client registration.

  3. Sign in to Ranktune when prompted, then click Allow on the Ranktune consent screen.

  4. ChatGPT stores the OAuth tokens and calls Ranktune tools on your behalf.

No API key is required for this flow.

Cursor

Add a project or user config (.cursor/mcp.json or ~/.cursor/mcp.json):

{
  "mcpServers": {
    "ranktune": {
      "url": "https://api.tryranktune.com/v1/mcp"
    }
  }
}

Reload MCP servers in Cursor settings. On first use, Cursor opens Ranktune’s OAuth login and consent flow in the browser — no API key in the config.

API key (optional)

If you prefer a static key instead of OAuth:

{
  "mcpServers": {
    "ranktune": {
      "url": "https://api.tryranktune.com/v1/mcp",
      "headers": {
        "api-key": "ranktune_YOUR_KEY"
      }
    }
  }
}

Claude Desktop

Add the same mcpServers.ranktune URL entry to Claude Desktop’s MCP config for OAuth, or include an api-key header if your client does not support MCP authorization.

Authentication

API key

Send your full ranktune_… key in the api-key header on every MCP request. Store keys in your client’s secrets manager — never commit them.

OAuth 2.1

Hosted MCP clients (including ChatGPT) use OAuth:

EndpointPurpose
GET /.well-known/oauth-protected-resource/v1/mcpProtected resource metadata (RFC 9728)
GET /.well-known/oauth-authorization-serverAuthorization server metadata (RFC 8414)
POST /registerDynamic client registration (RFC 7591)
GET/POST /authorizeAuthorization + consent (PKCE S256)
POST /tokenToken exchange / refresh
POST /revokeToken revocation

Scopes: mcp. Access tokens are sent as Authorization: Bearer … on /v1/mcp.

Unauthenticated MCP requests return 401 with a WWW-Authenticate header that points clients at the protected-resource metadata URL.

Available tools

Tools map 1:1 to public API routes:

ToolAPI
generate_textGenerate text
generate_chatGenerate Agent message
generate_imageGenerate image
get_jobAsync jobs
list_brand_voicesList brand voices
get_brand_voiceGet a brand voice
create_brand_voice_from_websiteBrand voice from website
list_chat_sessionsList sessions
run_visibility_reportRun a visibility report
get_visibility_reportGet the latest report
list_one_off_visibility_reportsList one-off reports
get_one_off_visibility_reportGet a one-off report
get_visibility_historyGet visibility history
list_ai_traffic_sitesList sites
get_ai_traffic_statsGet stats
get_assistant_contextAgent workspace context
schedule_contentCreate a schedule — accepts ChatGPT uploaded images via image; requires confirm: true after user approval (destructiveHint)
list_schedulesList schedules
get_scheduleGet one schedule
delete_scheduleDelete / cancel a schedule

Request and response shapes match the linked API reference. Rate limits and errors are the same as the REST API — see Errors & rate limits.

Write tools such as schedule_content and delete_schedule are marked destructiveHint: true and require confirm: true only after the user explicitly approves in the host (ChatGPT / Cursor). In the Ranktune Agent UI, create/schedule actions pause for an in-app Confirm / Decline step before anything is saved.

Example prompts

  • “Generate a two-sentence product intro with Ranktune using gpt-5.”
  • “List my brand voices.”
  • “Queue an AI visibility report for https://example.com.”
  • “Run a one-off visibility report for https://example.com without creating a workspace.”
  • “Show AI traffic stats for the last 30 days.”
  • “Schedule this LinkedIn post for tomorrow at 3pm UTC.”
  • “Publish this uploaded image to LinkedIn with this caption.”
  • “List my pending scheduled posts.”