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

# MCP server

> Connect your AI tools to Siteline using MCP

The Model Context Protocol (MCP) is a standard for connecting Large Language Models (LLMs) to platforms like Siteline. Once connected, your AI assistants can query Siteline Agent Analytics and AI Visibility data on your behalf.

## MCP Setup

Choose your MCP client and add Siteline using the instructions below.

<Tabs>
  <Tab title="Claude">
    In Claude or Claude Desktop, open **Settings** > **Connectors**, then add a custom connector:

    ```text theme={null}
    Name: Siteline
    URL: https://mcp.siteline.ai/mcp
    ```

    After saving the connector, use Claude's connector authentication flow to log in to Siteline
    and approve read-only analytics access for your team.
  </Tab>

  <Tab title="Claude Code">
    Add the MCP server with:

    ```bash theme={null}
    claude mcp add --transport http siteline https://mcp.siteline.ai/mcp
    ```

    Then authenticate from Claude Code:

    ```text theme={null}
    /mcp
    ```
  </Tab>

  <Tab title="Codex">
    Add the MCP server with:

    ```bash theme={null}
    codex mcp add siteline --url https://mcp.siteline.ai/mcp
    ```
  </Tab>

  <Tab title="Cursor">
    In Cursor, add Siteline as a remote MCP server from **Settings** > **Tools & Integrations** >
    **MCP**, or add this project configuration to `.cursor/mcp.json`:

    ```json theme={null}
    {
      "mcpServers": {
        "siteline": {
          "url": "https://mcp.siteline.ai/mcp"
        }
      }
    }
    ```

    Cursor will open the OAuth flow when it first connects or when you run a Siteline tool.
  </Tab>

  <Tab title="JSON">
    Alternatively, add this configuration to `.mcp.json`:

    ```json theme={null}
    {
      "mcpServers": {
        "siteline": {
          "type": "http",
          "url": "https://mcp.siteline.ai/mcp"
        }
      }
    }
    ```
  </Tab>
</Tabs>

After configuring the MCP server, authenticate using your MCP client's authentication flow.

### Authentication

Some MCP clients automatically prompt you to log in during setup, while others require manual authentication steps. Authentication opens a browser window where you log in to Siteline and grant read-only analytics access for the selected team.

<Info>
  **Siteline MCP does not require you to generate or paste a public API key into the MCP client.**
</Info>

### Next steps

After you log in, check that the MCP server is connected. Depending on the client, you may need to restart it to connect and detect all tools after authorization.

To verify the client has access to the MCP server tools, ask it to query Siteline using natural language. For example: "Summarize prompt performance for my product using Siteline MCP."

## What you can ask

Once connected, ask your AI tool in plain language. It picks the right tools and handles the details. Try prompts like these:

<AccordionGroup>
  <Accordion title="Agent Analytics" icon="chart-no-axes-combined" defaultOpen={true}>
    * How has OpenAI bot traffic to my site changed over the last 3 months?
    * Compare AI-referred human visits week over week.
    * Which pages do AI crawlers hit most often?
  </Accordion>

  <Accordion title="AI Visibility" icon="eye">
    * Summarize my prompt performance on ChatGPT over the last 30 days.
    * Which tracked prompts am I ranking worst on, and which competitors are beating me?
    * Show how my Gemini visibility trended last month.
  </Accordion>

  <Accordion title="Citations" icon="medal">
    * What are the top pages citing my product in the last 30 days?
    * Which source domains mention my competitors but not me?
    * List the products most often mentioned alongside mine.
  </Accordion>
</AccordionGroup>

## Available tools

The server exposes seven read-only tools. Your AI tool selects these automatically, you don't need to call them by name. Each maps directly to an endpoint in the [Reporting API](/reporting/reporting-api-introduction), where you can find exact parameters and response fields.

| Tool                                   | Use it to                                                                                          |
| -------------------------------------- | -------------------------------------------------------------------------------------------------- |
| `list_products`                        | List authorized primary products, product IDs, and domains for the MCP connection.                 |
| `list_product_websites`                | List active website domains and website IDs for a product.                                         |
| `list_product_tracked_prompts`         | List tracked prompt rows with platform, domain, position, visibility, rank, run count, and labels. |
| `summarize_product_prompt_performance` | Summarize aggregate prompt visibility, position, rank, and competitor count.                       |
| `analyze_product_prompt_trends`        | Analyze daily prompt visibility, position, and rank trends.                                        |
| `list_product_citations`               | List citation source pages, source domains, or mentioned products.                                 |
| `analyze_product_analytics_timeseries` | Analyze AI crawler and referred human traffic timeseries.                                          |

## Security risks

Connecting any data source to an LLM carries inherent risks. Siteline MCP is read-only, but AI tools can still retrieve and summarize analytics data that your team has access to.

<Warning>
  Prompt injection can trick an AI assistant into treating untrusted content as instructions. Review
  MCP tool calls before allowing them, especially in clients that can run tools automatically.
</Warning>

### Recommendations

* Review tool calls before approving them
* Connect only MCP clients you trust
* Use a Siteline team with the minimum data access needed
* Remove the MCP server from clients that no longer need access
* Revoke or reconnect the MCP client if you suspect a client token was exposed
