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.
-
In ChatGPT, add a custom MCP connector / connector pointing at:
https://api.tryranktune.com/v1/mcp -
ChatGPT discovers OAuth automatically via protected-resource metadata and dynamic client registration.
-
Sign in to Ranktune when prompted, then click Allow on the Ranktune consent screen.
-
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:
| Endpoint | Purpose |
|---|---|
GET /.well-known/oauth-protected-resource/v1/mcp | Protected resource metadata (RFC 9728) |
GET /.well-known/oauth-authorization-server | Authorization server metadata (RFC 8414) |
POST /register | Dynamic client registration (RFC 7591) |
GET/POST /authorize | Authorization + consent (PKCE S256) |
POST /token | Token exchange / refresh |
POST /revoke | Token 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:
| Tool | API |
|---|---|
generate_text | Generate text |
generate_chat | Generate Agent message |
generate_image | Generate image |
get_job | Async jobs |
list_brand_voices | List brand voices |
get_brand_voice | Get a brand voice |
create_brand_voice_from_website | Brand voice from website |
list_chat_sessions | List sessions |
run_visibility_report | Run a visibility report |
get_visibility_report | Get the latest report |
list_one_off_visibility_reports | List one-off reports |
get_one_off_visibility_report | Get a one-off report |
get_visibility_history | Get visibility history |
list_ai_traffic_sites | List sites |
get_ai_traffic_stats | Get stats |
get_assistant_context | Agent workspace context |
schedule_content | Create a schedule — accepts ChatGPT uploaded images via image; requires confirm: true after user approval (destructiveHint) |
list_schedules | List schedules |
get_schedule | Get one schedule |
delete_schedule | Delete / 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.”