# Overview

> Three ways to reach your analytics outside the dashboard: the statsy command line tool, the MCP server for AI assistants, and the REST API.

Section: CLI, MCP and API  
Canonical page: https://statsy.co/docs/developers  
Last updated: 2026-09-15

Everything the dashboard shows is available outside it. There are three doors, and they all read the same data with the same permissions you have in the workspace.

## Three ways in

- **Command line.** `statsy` prints overviews, breakdowns, funnels, visitors and attribution as tables, or as JSON for scripts. Best for a quick look without leaving the terminal, and for cron jobs. See [Command line interface](https://statsy.co/docs/developers/cli).
- **MCP server.** Connect Claude Code, the Claude app, Cursor or VS Code and ask questions in plain language. The assistant reads real numbers instead of guessing. See [MCP server for AI assistants](https://statsy.co/docs/developers/mcp).
- **REST API.** JSON over HTTPS at `https://statsy.co/api/v1`, for dashboards, warehouses and anything else you build. Start at [REST API overview](https://statsy.co/docs/developers/api).

## You need a token first

All three authenticate with an API token you create in **Site settings › API tokens**. There are two kinds. An *account token* (`sta_`) acts for the whole workspace with owner permissions; a *site token* (`st_`) is limited to one site and behaves like an editor. The CLI and the MCP server need an account token; the REST API takes either.

A token is shown once, at creation. Only a SHA-256 hash is stored, so a lost token cannot be recovered, only revoked and replaced. Tokens never expire on their own. Read [API tokens and roles](https://statsy.co/docs/developers/api-tokens) before you create one.

> **Watch out.** An account token carries owner power over the workspace. Keep it in a secret manager or an environment variable, never in a repository or a browser bundle.

## Which one to pick

| You want to | Use |
| --- | --- |
| Check yesterday’s numbers without opening a browser | The CLI: `statsy stats --period 24h` |
| Ask why revenue moved, in a conversation | The MCP server |
| Pipe a breakdown into a spreadsheet or warehouse | The CLI’s `statsy export`, or `GET /export` |
| Send payments from a system we do not integrate with | The [Payment API](https://statsy.co/docs/developers/api-payments) |
| Build an internal dashboard | The REST API |

Rate limits apply to all of them. Token-authenticated API requests get 60 per minute; the MCP server allows 120 per minute. Details are on the [REST API overview](https://statsy.co/docs/developers/api).

Previous: [What counts as an event](https://statsy.co/docs/tracking-script/events-and-usage)  
Next: [Command line interface](https://statsy.co/docs/developers/cli)