Connect Claude, ChatGPT, and Codex to Live First-Party Analytics With Hardal MCP and the /v1 Reports API

Hardal MCP gives AI assistants read-only access to your live analytics through OAuth 2.1. The /v1 Reports API lets you query the same data with scoped API keys from the new Connections page in Beacon.

Ikbal Turgut & Emircan Uye
6 min read
Agentic Commerce

Hardal MCP is now live at mcp.usehardal.com. It gives Claude, ChatGPT, Codex and other MCP clients read-only access to your live first-party analytics. The same data is available through the public /v1 Reports API, which accepts scoped API keys you create on the new Connections page in Beacon.

This post covers what shipped, how to connect, and what the assistant can answer once it has access.

What is Hardal MCP?

MCP servers for marketing analytics explained the protocol and how to evaluate a server. Hardal MCP is our implementation: a remote server that exposes six read-only tools over your Hardal workspace data.

The server runs at mcp.usehardal.com and uses OAuth 2.1 with workspace consent. When you connect an MCP client, you sign in through Hardal and approve read access to the workspaces you choose. The client receives a scoped token. The server never sees your password.

Because the data comes from your own first-party event stream, the assistant answers from one source of truth. It does not sum up platform-reported numbers that each claim credit for the same orders. If you ask which campaigns drove revenue last week, the answer uses your conversion definition, not the ad platform's.

Six tools, all read-only

Each tool maps to a report in the /v1 Reports API. The model picks a tool based on your question, fills in dates and filters, and answers from the result.

ToolWhat it returns
get_contextTenant metadata: name, time zone, reporting currency, event types, attribution settings
get_overviewAggregate metrics for a date range: sessions, visitors, conversions, revenue, top channels, top sources, device breakdown
get_breakdownA ranked list of one dimension: pages, campaigns, sources, channels, countries, cities, AI visibility categories, referrers
compare_periodsThe same aggregates for two date ranges, with change calculations
get_eventsEvent counts by name for a date range
get_funnelsLists your saved funnels, or returns one funnel's conversion rates and step counts

Every response includes a context block: the resolved date range, applied filters, time zone, currency and a flag for data completeness. The model uses this to qualify its answer.

How to connect

Claude Desktop or Claude.ai with connectors: Add mcp.usehardal.com as a remote MCP server. Claude opens the OAuth flow, you sign in and approve workspace access, and the tools appear. For detailed instructions, see /mcp.

ChatGPT custom plugins: Create a plugin pointing to the MCP endpoint. ChatGPT handles the OAuth flow the same way.

Codex and Cursor: Add the server to your MCP configuration. Both support remote servers with OAuth.

Other clients: Any client that supports the Model Context Protocol specification can connect. The server advertises its tools and handles token exchange.

After connecting, the assistant can answer questions like:

  • What were my top five traffic sources last week?
  • Compare conversion rates between this month and last month.
  • Which pages got the most sessions from AI agents?
  • Show me the funnel conversion rate for the checkout flow.

The /v1 Reports API

The same data is available through a REST API for scripts, dashboards and automations that do not use an MCP client.

The API is available at api.usehardal.com/v1. It accepts a Bearer token in the Authorization header. The token can be an OAuth access token from the MCP flow, or a scoped API key from the Connections page.

Endpoints mirror the MCP tools:

  • GET /v1/reports/overview returns the overview report
  • GET /v1/reports/breakdown returns a breakdown by dimension
  • GET /v1/reports/compare compares two periods
  • GET /v1/reports/events returns event counts
  • GET /v1/reports/funnels returns funnel data

Pass dates, filters and pagination as query parameters. Responses include the same context block as the MCP tools.

Scoped API keys on the Connections page

Organisation owners and admins can now create API keys on the Connections page in Beacon. Keys are scoped to specific tenants and carry only the reports:read permission.

To create a key:

  1. Open Beacon and go to your organisation settings
  2. Select the Connections page
  3. Click Create API Key
  4. Give the key a name, select the tenants it can access, and optionally set an expiry date
  5. Copy the key value. It is shown only once.

The key acts as its creator on the /v1 API. If the creator leaves the organisation, the key becomes inactive. Organisation admins can revoke any key at any time.

API keys follow the format hrd_key_ followed by a random string. Only a hash and a short display prefix are stored. The full value is never logged or retrievable after creation.

What the assistant can and cannot see

The assistant sees: Aggregate metrics, ranked lists, funnel conversion rates, time series with daily granularity. All the data you would see in a Beacon report.

The assistant does not see: Individual visitor records, raw event payloads, personally identifiable information. The MCP tools and the /v1 API return only aggregated data. Hardal applies the same consent and redaction rules before serving the data that it applies before forwarding events to ad platforms.

The assistant cannot change: Anything. All six tools are read-only. There is no tool to create, edit or delete workspaces, tenants, events, funnels or settings. The server design keeps writes out of the model context entirely.

Connecting to your existing tooling

The /v1 API works with any HTTP client. If you already pull data from Hardal into a warehouse or BI tool, you can switch to or add the API endpoint. The data matches what the dashboard shows.

For AI workflows, the MCP server is the cleaner path. The model selects the right tool, fills in the arguments, and handles pagination and date parsing. You ask a question in plain language and get the answer from live data.

Start using it

If you have a Hardal account, you can connect today:

  1. Add mcp.usehardal.com to your MCP client
  2. Complete the OAuth flow
  3. Ask a question about your analytics

For programmatic access, create an API key on the Connections page and call the /v1 endpoints.

For a broader introduction to how MCP servers fit into marketing analytics, read MCP Servers for Marketing Analytics. For background on first-party data and AI agents, see First-Party Data Infrastructure for AI Agents.

Hardal is the first-party data and agentic analytics platform. We help enterprises send accurate signals to their ad platforms and grow revenue, using server-side data from their websites, mobile apps and AI agents.

Never miss a resource.

Subscribe to our newsletter.

FAQs
6 Questions

Frequently Asked Questions

How Hardal MCP and the /v1 Reports API give AI assistants and automations access to live first-party analytics.

What is Hardal MCP?
Hardal MCP is a remote MCP server at mcp.usehardal.com that gives AI assistants such as Claude, ChatGPT and Codex read-only access to your Hardal analytics. It uses OAuth 2.1 to authenticate you through your Hardal workspace without storing your credentials.
Which AI clients work with Hardal MCP?
Any client that supports the Model Context Protocol can connect. This includes Claude Desktop and Claude.ai with connectors, ChatGPT custom plugins, Codex (the OpenAI coding agent), Cursor, and other MCP clients.
What tools does Hardal MCP expose?
Six tools are available. get_context returns tenant metadata and time zone. get_overview returns aggregate metrics for a date range. get_breakdown returns a ranked list of a dimension with optional pagination. compare_periods compares two date ranges. get_events returns event counts. get_funnels lists saved funnels or returns a funnel's conversion data.
What is the /v1 Reports API?
A public REST API that serves the same aggregate reports as the MCP tools. It is available at api.usehardal.com/v1 and accepts Bearer tokens, either OAuth access tokens or scoped API keys.
Where do I create an API key?
In Beacon, open the Connections page under your organization settings. Organisation owners and admins can create, list and revoke read-only API keys there. Keys are scoped to specific tenants and shown only once at creation.
Can Hardal MCP change my data?
No. All six tools are read-only. The server cannot create, edit or delete anything in your workspace, and visitor level records stay out of the model context.