> ## Documentation Index
> Fetch the complete documentation index at: https://docs.range.org/llms.txt
> Use this file to discover all available pages before exploring further.

# AI Quickstart

> Connect Claude, Cursor, or any MCP-compatible AI client to Range in under 5 minutes.

## Prerequisites

* A Range API key, get one at [app.range.org/keys](https://app.range.org/keys)
* An MCP-compatible AI client (Claude Desktop, Claude.ai, Cursor, or any OpenAI-compatible tool)

<Note>
  You use the same API key you already have. No new credentials, no separate signup.
</Note>

## MCP endpoint

```
https://api.range.org/ai/mcp
```

This endpoint speaks the [Model Context Protocol](https://modelcontextprotocol.io) over Streamable HTTP. Every call is authenticated with your existing API key.

***

## Connect your client

<Tabs>
  <Tab title="Claude Desktop">
    Open your Claude Desktop config file:

    * **macOS:** `~/Library/Application Support/Claude/claude_desktop_config.json`
    * **Windows:** `%APPDATA%\Claude\claude_desktop_config.json`

    Add the Range server under `mcpServers`:

    ```json theme={null}
    {
      "mcpServers": {
        "range": {
          "type": "http",
          "url": "https://api.range.org/ai/mcp",
          "headers": {
            "Authorization": "Bearer your_api_key_here"
          }
        }
      }
    }
    ```

    Restart Claude Desktop. You should see "range" appear in the tools panel (hammer icon).
  </Tab>

  <Tab title="Claude.ai">
    In [Claude.ai](https://claude.ai), go to **Settings → Integrations → Add MCP Server**:

    * **Name:** Range
    * **URL:** `https://api.range.org/ai/mcp`
    * **Authentication:** Custom header
      * Header: `Authorization`
      * Value: `Bearer your_api_key_here`

    Save and refresh. Range tools will be available in any new conversation.
  </Tab>

  <Tab title="Cursor">
    Open Cursor settings (`Cmd/Ctrl + ,`) and navigate to **Features → MCP Servers**.

    Add a new server:

    ```json theme={null}
    {
      "range": {
        "type": "http",
        "url": "https://api.range.org/ai/mcp",
        "headers": {
          "Authorization": "Bearer your_api_key_here"
        }
      }
    }
    ```

    Or add it to your `.cursor/mcp.json` file in any project directory to scope it per-project.
  </Tab>

  <Tab title="Test with curl">
    The MCP protocol uses a session: every client must call `initialize`
    first, capture the `Mcp-Session-Id` returned in the response headers,
    and include that header on every subsequent request.

    <Note>
      MCP clients (Claude Desktop, Claude.ai, Cursor, etc.) handle this handshake
      automatically. You only need the two-step sequence below when testing
      directly with `curl`, Postman, or building a custom client.
    </Note>

    **1. Initialize and capture the session id:**

    ```bash theme={null}
    SESSION_ID=$(curl -sS -D - -o /dev/null -X POST https://api.range.org/ai/mcp \
      -H "Content-Type: application/json" \
      -H "Accept: application/json, text/event-stream" \
      -H "Authorization: Bearer your_api_key_here" \
      -d '{
        "jsonrpc": "2.0",
        "id": 1,
        "method": "initialize",
        "params": {
          "protocolVersion": "2025-06-18",
          "capabilities": {},
          "clientInfo": { "name": "curl", "version": "1.0" }
        }
      }' \
      | awk 'tolower($1) == "mcp-session-id:" { print $2 }' | tr -d '\r')
    ```

    **2. List tools using the session id:**

    ```bash theme={null}
    curl -X POST https://api.range.org/ai/mcp \
      -H "Content-Type: application/json" \
      -H "Accept: application/json, text/event-stream" \
      -H "Authorization: Bearer your_api_key_here" \
      -H "Mcp-Session-Id: $SESSION_ID" \
      -d '{"jsonrpc":"2.0","id":2,"method":"tools/list","params":{}}'
    ```

    A successful response returns a JSON array of 21 tools.

    <Warning>
      Calling `tools/list` (or any other method) without first running
      `initialize` returns:

      ```json theme={null}
      {"jsonrpc":"2.0","error":{"code":-32000,"message":"Bad Request: No valid session ID provided"},"id":null}
      ```

      If you see this error, you skipped the `initialize` step or didn't
      forward the `Mcp-Session-Id` header from its response.
    </Warning>
  </Tab>
</Tabs>

***

## Your first investigation

Once connected, paste this prompt into your AI client:

```
Investigate this wallet and tell me if I should be concerned about it:
5Q544fKrFoe6tsEbD7S8EmxGTJYAKtTVhAW5Q5pge4j1

Check its risk score, see if it's sanctioned, find its top counterparties,
and summarize what kind of entity this appears to be.
```

The AI will call `get_address_risk`, `check_sanctions`, `get_address_connections`, and `get_address_info` autonomously and return a structured summary.

***

## Next steps

<CardGroup cols={2}>
  <Card title="Tools Reference" icon="wrench" href="/ai/tools-reference">
    Browse all 21 tools with parameters and descriptions.
  </Card>

  <Card title="Investigation Playbook" icon="magnifying-glass" href="/ai/investigation-playbook">
    Learn the full step-by-step investigation workflow.
  </Card>
</CardGroup>
