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

Connect Claude Code

One command connects Claude Code to RankX AI, with either OAuth or a personal access token. Both forms, and when to pick which.

Claude Code connects to RankX AI with a single command. It supports both credential types, so use OAuth if a person is at the keyboard and a token if the connection has to survive without one.

claude mcp add --transport http rankxai https://app.rankxai.com/api/mcp

Claude Code opens a browser for you to sign in and approve. An account owner has to approve the connection.

Which form to use

OAuth, when a person is going to be at the keyboard. It is one command, there is no secret in your shell history, and revoking it is a click in RankX AI.

A token, when any of these is true:

  • The connection has to work unattended.
  • You want a read-only credential, so an assistant can report but never write or spend. OAuth grants the full capability set in one decision; a token picks its scopes.
  • You want a client-scoped credential that reaches one client's Websites only.

Both resolve to the same authorisation model on the server, so nothing else about the connection differs.

Verify it

claude mcp list

Then ask for something:

"Using RankX AI, list my websites and show me the AI visibility for the first one over the last 30 days."

The assistant should call list_projects first. Every other tool takes a Website id it returns, so that call is the entry point rather than a formality.

Scoping the connection to a project

claude mcp add writes to your user configuration by default, so the connection is available in every project. To scope it to one repository instead, add it to that repository's own MCP configuration and commit the file without the token in it, using an environment variable reference for the credential.

Anything that puts a rxai_ token into a committed file is a leaked credential. If it happens, revoke it in RankX AI's MCP settings and issue a new one; the process is zero downtime.

Using the Agent Skills

RankX AI ships a set of written workflows as Agent Skills. Copy the ones you want into your project's skills directory and Claude Code will use them:

mkdir -p .claude/skills/rankxai-visibility-audit
curl -o .claude/skills/rankxai-visibility-audit/SKILL.md \
  https://rankxai.com/agent-skills/rankxai-visibility-audit.md

The full list, with what each does, is on the Agent Skills page.

Removing the connection

claude mcp remove rankxai

That removes it locally. If you used a token and want it dead everywhere, revoke it in RankX AI's MCP settings as well; if you used OAuth, disconnect it in the connected-apps list there.

Where to go next