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

# Connect an AI assistant

> Point any MCP-capable assistant at your SourceMedium warehouse and sign in with your SourceMedium account.

If an assistant can add a **remote MCP server**, it can reach your SourceMedium reporting data. ChatGPT, Claude, and Grok are the usual examples. Anything else that speaks MCP uses the same URL and the same SourceMedium sign-in.

You never paste BigQuery, Shopify, or Meta credentials into the assistant. SourceMedium holds those and answers read-only.

This is a different product from the [Slack AI Analyst](/docs/ai-analyst/index). In Slack, SourceMedium's own analyst writes the SQL and answers for you. Here, the assistant you already use asks SourceMedium.

<Info>
  Every accepted workspace member can connect. Admins, Editors, and Viewers all get a read-only session scoped to what they can already reach in SourceMedium.
</Info>

## How to connect

<Steps>
  <Step title="Copy the connection URL from Settings">
    In your SourceMedium workspace, open **Settings** and find **AI assistant access**. Copy the connection URL.

    The production URL is:

    ```
    https://mcp.sourcemedium.com/mcp
    ```

    The path `/mcp` is required. Use this exact URL as the connector in your AI client.
  </Step>

  <Step title="Add it as a remote MCP server">
    In the assistant, add a connector / remote MCP server and paste the URL. When it asks you to sign in, use your existing SourceMedium account. The exact menu name varies by product. Look for MCP, connectors, or custom tools.
  </Step>

  <Step title="Pick an organization if you belong to more than one">
    One connection is one organization. If you work across several SourceMedium workspaces, pick the one this assistant should use. Reconnect to switch organizations.
  </Step>

  <Step title="Approve the SourceMedium sign-in screen">
    After you approve, the assistant can call SourceMedium. The first successful request appears under **Your connected assistants** on the Settings card, with an Active or Idle status.
  </Step>
</Steps>

<Warning>
  When you connect SourceMedium to an AI service, queries and the resulting data may be sent to the AI provider you choose. Access remains limited by your existing SourceMedium organization membership and connected-source permissions. This does not provide semantic PII detection or field-level masking. Do not request customer contact, address, or other direct personal data unless it is necessary and authorized for your use case.
</Warning>

## What the assistant can reach

| Surface                                                             | Who gets it                                               |
| ------------------------------------------------------------------- | --------------------------------------------------------- |
| SourceMedium reporting data (`sm_transformed_v2` and `sm_metadata`) | Every active organization                                 |
| Connected Shopify store                                             | Extra review. Ask your SourceMedium contact to enable it. |
| Connected Meta Ads accounts                                         | Extra review. Ask your SourceMedium contact to enable it. |

The Settings card lists exactly what this organization can reach. If only reporting data is listed, Shopify and Meta are not enabled yet. Warehouse questions still work.

Agency partners with a live grant can connect too. An organization-level grant sees the whole org. A brand- or store-scoped grant is narrowed to those stores, and cannot run raw SQL (`run_bigquery_sql`).

## How to ask

Ask in plain language. The assistant has seven read-only tools and its instructions tell it to look every name up before writing SQL: `get_data_context` first, then search the catalog, then `query_metrics` for a named SourceMedium metric.

That last step is the one worth knowing about. `query_metrics` compiles SourceMedium's own definition and keeps filters such as `is_order_sm_valid` applied, making it the most reliable way to align with your dashboards. A hand-written revenue or ROAS query can diverge when it uses different fields, filters, dates, or scope, and the answer may not call out that difference.

See [What the MCP tools do](/docs/ai-analyst/mcp-tools) for the full list and how to tell a good answer from a guessed one.

## Limits

| Limit                 | Value                                    |
| --------------------- | ---------------------------------------- |
| Rows returned         | 500, then the result is marked truncated |
| BigQuery billed bytes | 10 GiB per query                         |
| Query wall time       | 60 seconds                               |
| Response size         | 256 KiB                                  |

All tools are read-only. Writes, exports, and other projects are refused.

## Coding agents

A local or IDE-hosted agent that can attach a remote MCP server uses the same connection URL as any other client. We do not keep a roster of those runtimes: if it can register the URL above and complete the SourceMedium sign-in, it is in.

Optional [agent skills](/docs/ai-analyst/agent-skills/index) are only for coding agents that load skills. Chat products do not need them. The MCP tools already describe how to query.

## Related

<CardGroup cols={2}>
  <Card title="What the MCP tools do" icon="screwdriver-wrench" href="/docs/ai-analyst/mcp-tools">
    The seven tools, the order that gets correct answers, and the column name assistants guess wrong.
  </Card>

  <Card title="MCP troubleshooting" icon="wrench" href="/docs/ai-analyst/mcp-troubleshooting">
    Sign-in errors, source denials, and what to send support.
  </Card>

  <Card title="Slack AI Analyst" icon="message-bot" href="/docs/ai-analyst/index">
    Ask in Slack when you want SourceMedium to write the SQL and charts for you.
  </Card>
</CardGroup>
