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

# Connect AI tools with MCP

> Connect Claude, Cursor and other AI tools to Tars over MCP, and read your analytics with five read-only tools.

The Tars MCP server lets an AI tool read your organization's analytics. It offers five read-only tools. They cannot change anything in Tars, and they cannot read live chat or conversation transcripts.

MCP connections are available on paid plans.

## Server URL

Copy **MCP server URL** from **Settings → Integrations → MCP connections**, or from **Profile → MCP connections**.

The regional server URL ends in /mcp. Use the displayed value so sign-in reaches the correct region.

## Signing in from an AI tool

Claude, Cursor and other MCP clients accept a remote server URL. Add the displayed URL and choose the client's sign-in action.

Tars then asks the member to choose an organization under **Workspace**, the resources to share and the permissions to allow. **Allow access** completes the sign-in. Approval stays within that member's permissions. An organization on the Free plan shows **MCP connections are available on paid plans**.

## Permissions

The sign-in offers one permission, **Read analytics** (`analytics:read`). It covers the whole organization, so it needs access to all resources. See [Authentication](https://hellotars.com/docs/developer/authentication.md).

## Tools

| Tool | What it returns |
| - | - |
| `analytics_overview` | The headline analytics for a date range, as the Analytics page and the email report show them. The blocks follow your saved card layout. Start here. |
| `analytics_pipes` | The analytics datasets that `analytics_query` can read. Pass `pipe` to get one dataset's description and parameters. |
| `analytics_query` | Rows from one dataset, such as conversations, outcomes, funnels, CSAT, reply time, handoffs, sources, tool calls, WhatsApp message counts and topics. |
| `analytics_topics` | Your deployments, with their ids, and your topic lists with each topic's name, definition and conversation count. |
| `analytics_topic_brief` | Detail for one topic from its latest analyzed sample, with the customer needs grouped under it. It does not include customer messages. |

## Date formats

Each pipe that `analytics_query` reads takes its dates in one of two formats. `analytics_pipes` with `pipe` set lists each parameter with its type.

| Type | Format | Example |
| - | - | - |
| Date | `YYYY-MM-DD` | `2026-10-01` |
| DateTime | `YYYY-MM-DD HH:MM:SS` | `2026-10-01 00:00:00` |

A pipe with Date parameters counts whole days, and `date_to` includes its day:

```json theme={null}
{
  "pipe": "results_summary",
  "params": { "date_from": "2026-10-01", "date_to": "2026-10-31", "tz": "Europe/London" }
}
```

Some pipes take DateTime values in `date_from` and `date_to`. Their window ends at `date_to` itself, not at the end of that day. They are `reply_latency`, `reply_breakdown`, `human_report`, `whatsapp_messages`, `csat_summary`, `campaign_funnel`, `campaign_funnel_trend`, `conversation_flow`, `conversation_list` and `conversation_ai_cost`. To include October 31, pass `2026-11-01 00:00:00` as `date_to`.

With `raw_window` set to `"1"`, a pipe reads an exact window from DateTime values in `date_time_from` and `date_time_to`. These pipes accept it: `results_summary`, `results_trend`, `sources_breakdown`, `busiest_times`, `journey_funnel`, `tool_calls_summary`, `topic_report_card`, `need_report_card`, `topic_report_readiness`, `component_summary` and `component_options`. Without it, they count whole days from `date_from` and `date_to`. `analytics_pipes` lists each pipe's parameters and their types.

`reply_breakdown` and `human_report` also compare two periods. `previous_from` starts the period to compare against. `date_from` starts the current period:

```json theme={null}
{
  "pipe": "reply_breakdown",
  "params": {
    "previous_from": "2026-09-01 00:00:00",
    "date_from": "2026-10-01 00:00:00",
    "date_to": "2026-11-01 00:00:00"
  }
}
```

If you leave out `previous_from`, it starts on `2026-01-01 00:00:00`. That start can make the window too large, so always pass it.

## Limits

* `analytics_query` returns at most 500 rows, 100 by default. When `truncated` is true, narrow the date window or the filters.
* A date window can be at most 366 days. For `reply_breakdown` and `human_report`, the window runs from `previous_from` to `date_to`, so it includes the comparison period.
* A response holds about 200 KB of rows at most. Larger results are cut and marked `truncated`.
* Tool calls use the **read** rate class. See [Requests](https://hellotars.com/docs/developer/requests.md).

## Errors

When the parameters are wrong, the tool call fails with `invalid_input` and a reason you can act on. Fix the parameters and call again. For example, a window that is too large returns this reason:

```text theme={null}
Date window is too large; ask for at most 366 days at a time.
```

A pipe that rejects a parameter also returns `invalid_input`, with the reason from the pipe. Too many analytics reads return `rate_limited` with the time to wait before a retry. Other failures return `internal_error`.

## Manage connections

Admins can inspect organization connections in **Settings → Integrations → MCP connections**. Members manage their own connections in **Profile → MCP connections**.

Connection access follows the member's current role. Moving an organization to another region requires a new sign-in.

## Use an API key instead

A client that supports custom authentication headers can use an API key with the displayed MCP server URL.

Configure Authorization: Bearer tars\_sk\_… in the client's server-side header settings. An admin creates a key with the **Read analytics** permission. See [Authentication](https://hellotars.com/docs/developer/authentication.md).

You can also call the [HTTP API](https://hellotars.com/docs/developer/index.md) directly.

## Disconnect

Select a connection's disconnect action to revoke access. Disconnecting stops that connection's credentials.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.