Skip to content
Docs

Connect Cursor, VS Code and Windsurf

Add the RankX AI MCP server to Cursor, VS Code or Windsurf: create a personal access token, paste your editor's mcp.json block, keep the token out of git.

Cursor, VS Code and Windsurf connect to RankX AI with a personal access token in the editor's own MCP configuration file. Create the token in RankX AI's MCP settings, which is owner-only, then paste the block for your editor below.

The three editors want the same three facts in slightly different shapes: a name for the connection, the address https://app.rankxai.com/api/mcp and an Authorization header. The key names differ per editor, and a block copied from the wrong one usually fails silently rather than showing an error.

How do I create the token?

In RankX AI, open MCP settings and the API tokens tab, then select Create token. MCP settings sit in Settings on a direct account and under Agency Admin on an agency account.

FieldWhat to choose
NameSomething you will recognise later, for example "Cursor, laptop"
CapabilityRead-only for reporting; Read + Write or Read + Write + Spend credits for an assistant that acts
Connected websitesPublish to WordPress, Edit WooCommerce products or Site administration, only if the editor should change a live site
AccessYour whole account, or one client's websites
Expires after30 days, 90 days (the default) or 1 year

Copy the token when it is shown. RankX AI stores only a hash, so it is not shown again. A tool outside a token's scopes is not listed and not callable, so a read-only token cannot be talked into writing, spending or publishing.

How do I add the MCP server to Cursor, VS Code or Windsurf?

Paste the block for your editor into its MCP config file, save it, and the editor connects to the RankX AI MCP server with your token.

.cursor/mcp.json in the project root, or ~/.cursor/mcp.json in your home directory for every project.

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

Cursor reads ${env:RANKXAI_TOKEN} from your environment, so the token itself stays out of the file.

Editors change these formats between versions. If a block does not attach, check that editor's current MCP documentation for the key names; RankX AI always needs the same three facts.

How do I 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. Each editor has a way to keep it out:

EditorKeep the token out of the file with
Cursor${env:RANKXAI_TOKEN} in the header, with the value in your shell profile or secret manager
VS CodeAn inputs entry with "password": true, referenced as ${input:rankxai-token}
Windsurf (Devin Desktop)Your user file, or .devin/mcp_config.local.json, which git ignores

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

How do I check the MCP server works?

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 no RankX AI tools 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

Questions

Which scopes should an editor token have?

Only what the job needs. For reporting and analysis, choose Read-only, so the assistant can see your data but cannot write, spend credits or publish. Add spend or the website capabilities only for an assistant you trust to act.

What happens when the token expires?

The editor's RankX AI tools stop answering. Create a replacement token in RankX AI's MCP settings, paste it into the config, then revoke the old one; there is no downtime.

Why do some RankX AI tools appear and others not?

The connection works and the token does not carry the missing tools' scopes. RankX AI lists only the tools a token's scopes cover. Create a token with the scopes you need, as authentication explains.

Last updated

Cookie settings

Choose which cookies we can use. You can change this at any time from “Cookie settings” in the footer.

Essential

Security, bot protection and remembering your choice. The site needs them to run, and they do not identify you. Always on.

Google Analytics cookies that tell us which pages are read and which links are followed, so we can improve them. Off until you switch it on.

Tells advertisers when their advert led to your visit. Includes the Meta (Facebook) pixel and the LinkedIn Insight Tag, which set cookies on this domain (LinkedIn also on linkedin.com) and can be told if you later start a trial.

More in the cookie policy and the privacy policy.