Skip to main content
When you finish, you can ask Claude or Codex about your DATALYR analytics.
The consent page shows the connecting app, the site it returns to, and one line per permission. Read is required. Write permissions start selected and ad levels start cleared. For read-only, clear them all. You need no Anthropic or OpenAI API key, and no DATALYR API key. Without the matching permission, a write tool refuses and names that permission. See Tools that write or start work.

Before you start

You must have a DATALYR login that belongs to at least one workspace. The server checks your membership on every tool call.

Connect Claude

  1. Open Customize → Connectors in Claude.
  2. Select + → Add custom connector.
  3. Enter DATALYR as the name.
  4. Enter https://api.datalyr.com/mcp as the URL.
  5. Select Continue.
  6. Keep the detected OAuth settings and select Continue.
  7. Select Add.
  8. Select Connect if the DATALYR sign-in has not opened.
  9. Sign in to DATALYR and select the permissions to allow.
On Claude Team or Enterprise, an Owner first adds the URL under Organization settings → Connectors. Each member then connects their own DATALYR account under Customize → Connectors.

Claude Code

Run /mcp in Claude Code, select datalyr, and complete the sign-in in your browser.

Connect Codex

Complete the DATALYR sign-in and the consent page in your browser.

Read tools

One more tool, report_missing_capability, records a short note of what no tool could do, so we can add it. It never stores your question or your conversation, and it reads and changes no data.

Ask with analytics_query

analytics_query answers any question of the form metric by dimension, filter, and time. It takes a plan, not SQL. The workspace comes from your sign-in.
Funnels, retention, cohort LTV, and one person’s journey keep their own tools: get_funnel, get_retention, get_ltv, and get_user.

Ad tools

Ad tools propose changes to a review page. They need an ads row on the consent page: See Agent ads and Agent ad tools.

Tools that write or start work

These tools need the matching permission, except create_export. See Agent access for the scopes, the dry-run default, and undo. No tool changes tracking, sources, team membership, billing, or ad safety switches, except that stop_agent_ads switches live ads off. See Limits. No scope publishes a container script. There is no signup tool. When a person without an account asks, use POST /v1/signup. See Agent-driven setup.

Save a chart as a report

A report keeps one id on the Reports page, in the in-app chat, over MCP, and at /v1/reports.

Build a dashboard, write an analysis, share it

Dashboards and analyses point to saved report ids. They never copy a report. See Dashboards and analyses.

Get a headless key

A script that runs without your client needs a key. Trade the OAuth token for one with POST /v1/keys.
The key holds only scopes the token holds, and you need the owner or admin role. A key with a write scope needs the owner. It expires after 90 days by default, and we show it once. See Token exchange.

Rules the client follows

Tool results carry customer, campaign, and revenue data. Connect only clients and organizations you trust, because anything you connect can read all of it.
An AI client can misread a number it fetched correctly. Check any high-impact decision against the matching report in DATALYR.

Limits

Data and privacy

See Privacy and DPA.

Verify

  1. Start a new conversation.
  2. Ask: List my DATALYR workspaces.
  3. Confirm the reply names the workspace you expect.
  4. Ask: Show my DATALYR overview for the last 7 days.
  5. Compare the visitor count with Overview in DATALYR.

When it does not work

Removing DATALYR from your client’s connector settings stops it from requesting new data.

Next

  • API reference: the same data over HTTP with an Agent key.
  • API keys: when you need a key instead of OAuth.
  • AI Chat: ask the same questions inside DATALYR.