AI assistants
MCP server
Rank.ai’s MCP server connects Claude Code, Codex, Cursor, Claude.ai and ChatGPT to your Rank.ai workspace. Add its address to your assistant, sign in, and ask about your AI visibility in plain words.
- Server address
https://api.rank.ai/mcp- Sign in with
- Your Rank.ai account, or an API key
- Included on
- The Growth and Agency plans and every done-for-you plan, including the Growth trial. See pricing
Setup
Connect your assistant
Pick your assistant. The first time it connects, it opens Rank.ai in your browser: sign in, pick the workspace and choose whether it may make changes. One connection works in one workspace.
One command, then sign in from Claude Code.
Add the server
Run this in your terminal. It adds Rank.ai to the project you are in; put
--scope userafterrank-aito add it to every project.Terminalclaude mcp add --transport http rank-ai https://api.rank.ai/mcpSign in
Start Claude Code, type
/mcp, chooserank-aiand sign in to Rank.ai in your browser. Pick the workspace and whether it may make changes.In Claude Code/mcpAsk
Ask in plain words, like “How often do ChatGPT, Claude and Gemini name us?”
Or connect with an API key
Keep the key in an environment variable and add the server to a project's .mcp.json:
{
"mcpServers": {
"rank-ai": {
"type": "http",
"url": "https://api.rank.ai/mcp",
"headers": { "Authorization": "Bearer ${RANK_AI_API_KEY}" }
}
}
}Add it from the command line or in config.toml, then sign in.
Add the server
Run this in your terminal.
Terminalcodex mcp add rank-ai --url https://api.rank.ai/mcpSign in
Run the login command. Codex opens Rank.ai in your browser so you can sign in.
Terminalcodex mcp login rank-aiCheck it
In Codex, type
/mcpto seerank-aiamong your connected servers.In Codex/mcp
Or add it in config.toml
Codex reads its servers from ~/.codex/config.toml, or from .codex/config.toml in a project.
[mcp_servers.rank-ai]
url = "https://api.rank.ai/mcp"Or connect with an API key
Tell Codex which environment variable holds the key, then set it in the shell you start Codex from:
[mcp_servers.rank-ai]
url = "https://api.rank.ai/mcp"
bearer_token_env_var = "RANK_AI_API_KEY"export RANK_AI_API_KEY="rnk_live_..."Add it to mcp.json, then sign in.
Add the server
Open
~/.cursor/mcp.jsonto use Rank.ai in every project, or.cursor/mcp.jsonin one project, and add:~/.cursor/mcp.json{ "mcpServers": { "rank-ai": { "url": "https://api.rank.ai/mcp" } } }Sign in
Save the file. Cursor opens the Rank.ai sign in the first time you use the server.
Ask
Ask in Agent. Cursor asks before it runs each tool, unless you tell it otherwise.
Or connect with an API key
Add the key as a header:
{
"mcpServers": {
"rank-ai": {
"url": "https://api.rank.ai/mcp",
"headers": {
"Authorization": "Bearer ${env:RANK_AI_API_KEY}"
}
}
}
}A custom connector, on the web and in Claude Desktop.
Add the connector
In Claude, open Customize, then Connectors. Select +, then Add custom connector. Enter the name Rank.ai and the server address, then select Add.
Server addresshttps://api.rank.ai/mcpConnect
Select Connect, sign in to Rank.ai, pick the workspace and select Allow.
Turn it on in a chat
In a chat, open the + menu, then Connectors, and switch on Rank.ai.
A connection in developer mode.
Turn on developer mode
In ChatGPT, open Settings, then Security and login, and turn on Developer mode.
Add Rank.ai
Go to ChatGPT Plugins at
chatgpt.com/pluginsand select the plus button. Enter the name Rank.ai, a short description and the server address, with OAuth sign in.MCP server URLhttps://api.rank.ai/mcpSign in and ask
Create it, sign in to Rank.ai, pick the workspace and select Allow. Then start a new chat and add Rank.ai from the tools menu. ChatGPT asks you to confirm write actions.
Any assistant that connects to MCP servers over HTTP.
Point it at the server
Use the address below with the HTTP transport (some clients call it streamable HTTP).
Server addresshttps://api.rank.ai/mcpSign in, or send a key
Clients that support MCP authorization find the sign in from the server's 401 response. Any other client sends an API key with every request:
HeaderAuthorization: Bearer rnk_live_...
API keys
Use an API key
For your own scripts, or a client that can’t sign in, send an API key with every request.
- In Rank.ai, open Settings, then API keys, and generate a key. Label it after the assistant or script that will use it, and keep it in an environment variable.
- Copy the key when it appears. Rank.ai shows each key once.
- Send it as a bearer token with every request:
Authorization: Bearer rnk_live_...Examples
What you can ask
Ask the way you would ask a colleague, and your assistant picks the tools. These examples are for a med spa in Austin.
How often do ChatGPT, Claude and Gemini name us this month?
get_ai_visibilityWhich questions are we losing, and which brands win them?
list_questionsget_questionShow me what ChatGPT said for the worst one, and the sources it used.
get_answerWhich sites does AI cite most for med spas in Austin?
list_cited_sourcesWhere do we rank on Google Maps for “med spa near me”?
get_map_scanDraft an article to win “best Botox in Austin”.
draft_articleGrade prospect.com in AI answers.
grade_domainget_grade
Reference
Tools
Your assistant sees every tool when it connects and chooses the ones a question needs. These are the ones you will use most.
Your workspace
| Tool | What it does | Access |
|---|---|---|
| get_account | Your plan and what it includes, credits, article allowance and what this connection may do. | Reads |
| get_overview | How you are doing across AI answers, Google, local and content, and what needs attention. | Reads |
AI answers
| Tool | What it does | Access |
|---|---|---|
| get_ai_visibility | The share of answers that name you and cite your site, per engine, against the brands named most. | Reads |
| list_questions | Your tracked questions, how often each engine names you, and which ones you are losing. | Reads |
| get_question | One question: each engine's latest answer, whether it names and cites you, and where. | Reads |
| list_answers | The answers to one question, newest first. | Reads |
| get_answer | One answer in full: its text, every brand and every source, and the searches the engine ran. | Reads |
| list_cited_sources | The sites AI cites for your questions, and their top pages. | Reads |
| suggest_questions | Questions worth tracking. Adds nothing. | Reads |
| add_questions | Track new questions. | Changes data |
| update_question | Reword, change engines, pause or resume a question. | Changes data |
| run_check | Ask the engines a question now. | Uses credits or allowance |
Competitors
| Tool | What it does | Access |
|---|---|---|
| list_competitors | Tracked competitors, brands AI names that you don't track, and who ranks in Google. | Reads |
| get_competitor | One competitor's Google, paid search and AI footprint. | Reads |
| track_competitor | Add a competitor to track. | Changes data |
| untrack_competitor | Stop tracking a competitor. | Changes data |
Google and Maps
| Tool | What it does | Access |
|---|---|---|
| list_keywords | Your Google positions, with the change and the ranking page. | Reads |
| get_keyword | One keyword's history and the results above you. | Reads |
| list_local_rankings | Map grid tracking for each location and keyword. | Reads |
| list_map_scans | Your saved map scans. | Reads |
| get_map_scan | One map scan: coverage for each keyword and the competitors on top. | Reads |
| list_audits | Your audits and monthly reports. | Reads |
| get_audit | One audit, a section at a time. | Reads |
Content
| Tool | What it does | Access |
|---|---|---|
| list_content_gaps | Keywords competitors win that you don't target. | Reads |
| list_articles | Your articles by status. | Reads |
| get_article | One article with its text. | Reads |
| draft_article | Write an article for a lost question, a content gap or a title. | Uses credits or allowance |
| publish_article | Publish an article to your connected site or hosted blog. | Changes data |
AI grades
| Tool | What it does | Access |
|---|---|---|
| grade_domain | Grade any domain in AI answers, a prospect's included. | Changes data |
| get_grade | The grade's result. | Reads |
Limits
Credits and limits
Reading your data uses no credits. Changes and checks work the way they do in the app.
- Changes wait for a yes. A tool that changes your workspace or uses credits first returns a preview: what will happen and what it costs. Nothing runs until your assistant calls it again to confirm, so it can ask you first.
- Checks use your plan’s credits and drafts your article allowance, the same as in the app. Grading a domain uses no credits.
- Each connection can make 60 calls a minute and 3,000 a day, and each workspace 120 a minute and 10,000 a day. When your assistant reaches a limit, the reply says when to try again.
- Errors come back as a code and a sentence, such as
[plan_required]or[rate_limited], so your assistant can tell you what to do next.
See how often ChatGPT, Claude and Gemini name you.
Enter your website. In about two minutes, Rank.ai asks ChatGPT, Claude and Gemini 12 questions your customers ask and grades how often they name you.
- Your grade out of 100How often AI names you, cites your site, and how high it ranks you.
- Who gets namedEvery competitor in the answers, most named first.
- The pages AI readsThe sources behind each answer.
- Three fixesWhat to fix first, with a brief for the first article.