Skip to content
RankX AI

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.

AI Agents and MCP

How to Add the RankX AI MCP Server to Claude

How to use claude mcp add to connect the RankX AI MCP server to Claude Code, plus the Connectors panel for Claude Desktop and Web, scopes, tokens and fixes.

Published Last updated 6 minute read
Sequence: Claude, Authorise, RankX AI MCP.
On this page 11 sections
  1. What does claude mcp add do?
  2. How do you set up MCP with Claude Code for RankX AI?
  3. Which MCP installation scopes can you configure?
  4. How do you check, debug and manage a connected server?
  5. How do you add MCP servers to Claude Desktop or Claude Web?
  6. Should you use OAuth or a token?
  7. What about local MCP servers?
  8. What can Claude do once connected?
  9. Troubleshooting: what usually goes wrong?
  10. Confirm the store identity before the first audit
  11. Next steps

Short answer: The claude mcp add command registers an MCP server with Claude Code. To connect RankX AI, run claude mcp add --transport http rankxai https://app.rankxai.com/api/mcp, then sign in through /mcp in a Claude Code session. Claude Desktop and Claude Web skip the command: add the same URL as a custom connector under Connectors and approve it as the account owner.

What does claude mcp add do?

claude mcp add is the Claude Code CLI command that registers an MCP server, so Claude can call that server's tools in your sessions. MCP, the Model Context Protocol, is the open standard Claude uses to reach external tools and systems such as your analytics, rankings or code repositories. Each new server adds tools for Claude to call, so it can interact with external systems, read data sources and perform actions.

The command takes a transport, a name and a URL or a local command. It is the quickest way to add servers to Claude Code, and these are the forms you will meet, taken from Anthropic's Claude Code documentation.

Server type

Command shape

Use it for

Remote, HTTP

claude mcp add --transport http <name> <url>

Hosted servers such as RankX AI; the recommended transport

Remote, with a header

Add --header "Authorization: Bearer <token>"

Servers that take an API token instead of a browser sign-in

Local, stdio

claude mcp add --transport stdio <name> -- <command> [args]

A program Claude Code starts on your machine

Remote, SSE

claude mcp add --transport sse <name> <url>

Older servers only; Anthropic marks SSE as deprecated

From JSON

claude mcp add-json <name> '<json>'

Pasting a server definition you already have

OAuth with a fixed callback

Add --callback-port 8080

Servers that need a pre-registered redirect URI

For stdio servers, the double dash matters. Everything after -- goes to the server untouched, so a flag such as --port reaches the server instead of being read as a Claude Code option.

How do you set up MCP with Claude Code for RankX AI?

Adding the RankX AI MCP server to Claude Code takes one command and one sign-in, and this step-by-step guide works the same way for other remote servers to connect. The command is claude mcp add --transport http rankxai https://app.rankxai.com/api/mcp, and the endpoint inside it is https://app.rankxai.com/api/mcp.

  1. Run the add command

    Paste the command above into a terminal. Add --scope user if you want RankX AI in every project.

  2. Start Claude Code and open /mcp

    The rankxai server appears with a prompt to authenticate. You can also run claude mcp login rankxai from the shell.

  3. Sign in and approve

    Your browser opens RankX AI's consent screen. Only an account owner can approve, and the screen names every capability the connection asks for.

  4. Check the connection

    Run claude mcp list, or look at /mcp, and confirm rankxai shows as connected.

  5. Ask for something real

    Ask Claude to use RankX AI to list your websites and show AI visibility for the first one over the last 30 days.

Claude should call list_projects first. Every other RankX AI tool takes a website id that call returns, so it is the entry point rather than a formality.

To use a token instead of OAuth, create one in RankX AI's MCP settings (owner only), then add --header "Authorization: Bearer rxai_your_token_here" to the same command. The Claude Code page in the RankX AI docs has both forms ready to paste.

Which MCP installation scopes can you configure?

The scope decides which projects see the server and where the configuration is stored. Claude Code uses local scope unless you pass --scope, which is the main MCP configuration choice.

Scope

Loads in

Shared with your team

Stored in

Local (default)

The current project only

No

~/.claude.json

Project

The current project

Yes, through version control

.mcp.json in the project root

User

Every project on your machine

No

~/.claude.json

For RankX AI, user scope suits one person who wants the server everywhere. Project scope suits a team, but commit the .mcp.json file in the project directory without the token: write the header as Bearer ${RANKXAI_TOKEN} and keep the token in each person's environment.

Claude Code asks for approval before it uses a project-scoped server from a .mcp.json file it has not seen. When the same server is defined in two scopes, local wins over project and project over user, and the whole entry comes from one source.

How do you check, debug and manage a connected server?

Check the connection with claude mcp list in the terminal or /mcp inside a Claude Code session. Both show each configured server, whether the server connected and the tools that Claude can use from it.

Command

What it does

claude mcp list

Lists every configured server and its status

claude mcp get rankxai

Shows the details of one server

/mcp

Inside a session: status, sign-in and the tools each server offers

claude mcp remove rankxai

Removes the server from your configuration

claude mcp add-from-claude-desktop

Imports servers from Claude Desktop, on macOS and WSL

Removing the server locally does not revoke its access. If you used a token, revoke it in RankX AI's MCP settings as well; if you used OAuth, disconnect it from the connected apps list there.

How do you add MCP servers to Claude Desktop or Claude Web?

Claude Desktop and Claude Web connect to RankX AI as a custom connector, with OAuth, and no command or config file. Custom connectors are available on every Claude plan, with one custom connector on the Free plan.

How it works
Connect the correct account before running a task
  1. Supported client

    Use the connection route for your Claude surface.

  2. Authenticate

    Complete the supported account authorisation.

  3. Inspect tools

    Confirm the connected account and available operations.

Connection setup and permission to spend credits or change data are separate decisions.

  1. Open Connectors

    On Pro and Max, go to Customize, then Connectors, choose Add, then Add custom connector.

  2. Paste the endpoint

    Enter a name such as RankX AI and the URL https://app.rankxai.com/api/mcp.

  3. Leave the OAuth client to Claude

    Do not type in a client id or secret of your own; RankX AI registers the client automatically. If Claude offers a choice, pick an automatic option.

  4. Sign in and approve

    Claude sends you to RankX AI to sign in, and an account owner approves the connection once.

  5. Check it worked

    Ask Claude, using RankX AI, to list your websites. It should call list_projects and return them.

On Team and Enterprise plans, an organisation owner adds the custom connector first under Organization settings, then members connect to it. Connectors you add on claude.ai also appear in Claude Code when it is signed in with the same account.

Do not try to add RankX AI by editing claude_desktop_config.json. That file starts local programs, so an HTTP entry with an Authorization header is silently ignored and the app reports only that some servers failed to load; the Claude Desktop page covers the rare token bridge.

From RankX AIUse the current instructions for your assistant.If the connection has expired or a required tool is absent, use the current client-specific documentation and account permissions to troubleshoot.Open the MCP connection guide

Should you use OAuth or a token?

Use OAuth when a person is at the keyboard and a personal access token when the connection must run unattended or with less than full access. A token plays the role API keys play for other APIs, and the table sets out the trade.

Question

OAuth

Personal access token

Setup

Sign in through a browser

Create it in RankX AI's MCP settings, owner only

Access granted

The full capability set, in one decision

Only the scopes you pick at creation

Read-only option

No

Yes, a token can carry read alone

Unattended scripts and CI

No: every OAuth credential starts with a person at a browser

Yes, the supported path

Revoking

Disconnect it in RankX AI

Revoke it in RankX AI; it stops on its next request

Each scope is a permission, and a token's scopes are fixed when it is issued and cannot be widened later. A tool outside those scopes is not listed at all, so a missing tool almost always means a missing scope; the authentication page lists them.

What about local MCP servers?

Local MCP servers are stdio servers: programs Claude starts on your own machine for access to local resources, such as file system access to specific directories. RankX AI is a remote MCP server, and remote servers need no local install.

Local servers are the setups that involve a configuration file and environment variables, and you restart Claude Desktop after each edit. In Claude Code, --env KEY=value passes a variable to the server, and the server's own command follows the double dash.

On Windows, a config that starts npx directly fails, because npx is a shell script there. The RankX AI docs wrap it as cmd /c npx, and many setups run several MCP integrations side by side, such as GitHub's server, a local filesystem server and your own custom tools next to RankX AI.

What can Claude do once connected?

Once connected, Claude can read your RankX AI data and, with your confirmation, act on it. The integration's tools cover AI visibility on ChatGPT, Claude, Gemini and Perplexity, Google AI Overview citations, rank tracking, keyword research, site audits and Search Console data.

See the difference
Read, change and spend are different operations
  1. Read evidence

    Inspect available account information.

  2. Change data

    Verify the intended action and scope.

  3. Spend credits

    Check cost and authorisation first.

A successful connection does not make every tool call the same kind of action.

Read-only tool calls are free. Every tool that spends credits states its current price in its own description, and the server tells the assistant to check your balance and confirm with you first.

On top of the tools sit six Agent Skills, written workflows for whole jobs. What Claude Skills are explains the format, and running a visibility audit from inside Claude is the workflow to try first.

The MCP connection is part of the RankX AI web app for WooCommerce and other websites. On Shopify, RankX AI works inside your Shopify admin instead, through the Shopify app.

Troubleshooting: what usually goes wrong?

Most failures have one of five causes, and each has a quick fix. The troubleshooting page covers the rarer ones.

Symptom

Likely cause

Fix

Claude Desktop says some servers failed to load

An HTTP entry in claude_desktop_config.json

Use the Connectors panel instead

A tool you expected is missing

The credential lacks that tool's scope

Issue a token with the scope, or reconnect with OAuth

The consent screen refuses to approve

You are not the account owner

Ask the owner to approve once

The server is not in another project

It was added at local scope

Re-add it with --scope user

A token appears in a committed file

The credential is leaked

Revoke it in RankX AI and issue a new one

Server names added with claude mcp commands can contain only letters, numbers, hyphens and underscores. A name like rankxai avoids that issue.

Confirm the store identity before the first audit

After connecting, ask Claude to list the projects the current account can access, then identify the intended store by its returned name and domain. Do not guess a project ID or choose a similarly named client.

Run a small read-only report with a stated date window before requesting an audit or any operation that uses credits. If the connection has expired or a tool is absent, reauthenticate through /mcp or the Connectors panel and check the scope.

Next steps

Once the connection answers a read-only request, try a whole job. Next, review authentication and scopes or follow the audit walkthrough.

Questions about AI Agents and MCP

Does connecting RankX AI to Claude cost anything?

No. The RankX AI MCP server is included on every RankX AI plan and in the free trial at no extra charge. Reading your data is free, and a tool that spends credits states its current price in its own description before it runs.

Where does claude mcp add save the server?

By default, at local scope: in ~/.claude.json, for the current project only. Add --scope user to make it available in every project, or --scope project to write it to a .mcp.json file in the repository that your team can share.

Can I connect ChatGPT and code editors too?

Yes. ChatGPT supports MCP through custom connectors and adds the same endpoint with OAuth, which may need developer mode or a paid ChatGPT plan. Cursor, VS Code and Windsurf take a personal access token in their own config file, and the RankX AI docs give the exact block for each.

Is a token safe to put in a repository?

No. A committed token is a leaked credential, even in a private repository. Commit the configuration with an environment variable reference such as ${RANKXAI_TOKEN}, and if a token does leak, revoke it in RankX AI's MCP settings and issue a new one.

Do connectors added on claude.ai work in Claude Code?

Yes, when Claude Code is signed in with your claude.ai account. Connectors added at claude.ai appear in Claude Code automatically and show up in /mcp. A server you add with claude mcp add takes precedence over a connector that points at the same URL.

Sources

  1. Claude Code docs, Connect Claude Code to tools via MCP: claude mcp add, transports, scopes and management commands (opens in a new tab) Checked 2026-10-29.
  2. Claude Help Center, Getting started with custom connectors using remote MCP (opens in a new tab) Checked 2026-10-29.
  3. Model Context Protocol specification, authorization (OAuth 2.1 with PKCE), revision 2026-07-28 (opens in a new tab) Checked 2026-10-29.

Written by

Asif Syed Founder & CEO

Asif Syed is the founder and CEO of RankX AI, the AI search visibility platform. He builds the product and writes here about GEO, AI search measurement and WordPress.

CoversThis article covers the AI Agents and MCP topic, the AI Visibility feature and the AI Readiness Score tool.

Terms usedAI Share of Voice, AI Overview and Prompt Volume.

Read this page asMarkdown: /blog/connect-rankx-to-claude.md.

All articlesEverything RankX AI publishes is listed on the blog index.

Ask an assistantAsk ChatGPT (opens in a new tab), Ask Claude (opens in a new tab) or Ask Perplexity (opens in a new tab).

Preferred sourceIf Google is your front door, you can add RankX AI as a preferred source (opens in a new tab), which asks your own results to surface more of what we publish.

Back to the top

Start here

Use the current instructions for your assistant.

If the connection has expired or a required tool is absent, use the current client-specific documentation and account permissions to troubleshoot.

7-day free trial. No credit card required. On Shopify, install the app and Shopify bills your plan.