Skip to content
RankX AI
RankX AI Docs
MCP serverConnect a client

Connect Cursor, VS Code and Windsurf

Add RankX AI to an editor's MCP configuration with a bearer token. The three config blocks, whose key names differ, and how to keep the token out of git.

The editors connect to RankX AI with a personal access token in their own MCP configuration file. Create the token in RankX AI's MCP settings, which is owner-only, then paste one of the blocks below.

The three editors want the same three facts, in three slightly different shapes. The key names differ per editor, and a block copied from the wrong one usually fails silently rather than erroring.

Create the token first

In RankX AI, open MCP in settings: under Agency Admin on an agency account, in Settings on a direct one. Create a token and choose its scopes.

Pick the scopes for the job rather than all of them. An editor used for reporting and analysis wants read and nothing else, and a read-only credential cannot be talked into writing, spending or publishing, because a tool outside a token's scopes is not listed and not callable.

Copy the token when it is shown. It is not shown again.

The configuration

.cursor/mcp.json in the project, or the global equivalent.

{
  "mcpServers": {
    "rankxai": {
      "url": "https://app.rankxai.com/api/mcp",
      "headers": {
        "Authorization": "Bearer rxai_your_token_here"
      }
    }
  }
}

Editors change these formats between versions. If a block above does not attach, check that editor's current MCP documentation for the key names; the three facts RankX AI needs are always the same: the URL, an Authorization header, and a name for the connection.

Keep the token out of git

A project-level MCP config is a file in your repository, and a rxai_ token pasted into it is a credential in your history.

Most editors support environment-variable references in these files. Use one, and put the real value in your shell profile or your secret manager:

{
  "mcpServers": {
    "rankxai": {
      "url": "https://app.rankxai.com/api/mcp",
      "headers": {
        "Authorization": "Bearer ${env:RANKXAI_TOKEN}"
      }
    }
  }
}

If a token does reach a commit, revoke it in RankX AI's MCP settings and issue a new one. Rotation is zero downtime: create the replacement, update the config, revoke the old one.

Verify it

Ask the editor's assistant:

"Using RankX AI, list my websites, then show me the site audit issues for the first one."

list_projects is the entry point: every other tool takes a Website id it returns.

If the tools do not appear at all, the connection is not attached. If some appear and others do not, the connection is fine and the token does not carry those tools' scopes. See troubleshooting.

Where to go next