# MCP Setup

Source: https://www.ranked.ai/developers/mcp/setup

> Connect your Ranked AI account to AI tools via MCP

## Install the Ranked AI skill

Install our documentation skill so your AI tools have full context on the Ranked AI API:

**Install the Ranked AI skill for AI-assisted development.**

```text
npx skills add https://www.ranked.ai
```

## ChatGPT

1. Open **ChatGPT Settings > Connected Apps**
2. Search for **Ranked AI** and click **Connect**
3. Sign in with your Ranked AI account to authorize access
4. Start asking about your SEO data in any ChatGPT conversation

### Example prompts

```
How are my keyword rankings doing this month?
```

```
What's my AI visibility across all models?
```

```
Show me my latest audit results
```

## Claude

1. Open **Settings > Connectors** (claude.ai or Claude Desktop)
2. Click **Add custom connector**
3. Enter `https://app.ranked.ai/api/mcp` as the server URL
4. Sign in with your Ranked AI account when prompted

## Cursor

1. Open **Cursor Settings > MCP**
2. Add a new MCP server with URL: `https://app.ranked.ai/api/mcp`
3. Authenticate when prompted

## Server URL

The MCP endpoint is:

```
https://app.ranked.ai/api/mcp
```

The previous URL, `https://app.ranked.ai/api/mcp/sse`, keeps working forever — existing connections don't need to change. Use `/api/mcp` for new setups.

The server supports Streamable HTTP and the stateless 2026-07-28 MCP revision, and negotiates the protocol version your client requests.

## Authentication

The MCP integration uses **OAuth 2.0** with authorization code flow. When you first connect, you'll be redirected to sign in with your Ranked AI account. Access tokens are automatically refreshed.

- Access tokens expire after 30 days
- Refresh tokens last 1 year
- Scopes: `read:projects`, `read:keywords`, `read:audits`, `read:backlinks`, `read:content`, `read:ai`

> **Info:** The MCP integration has read and write access to your project data. Write actions (like approving content) show a confirmation prompt before executing.
