pieowlDocs
MCP Server

MCP Server

Connect Claude, Cursor and other AI assistants to your Pieowl analytics data with the Model Context Protocol.

Pieowl runs an MCP (Model Context Protocol) server. It lets AI assistants like Claude, Cursor and Windsurf query your analytics data right in the conversation. This is how you ask questions about your data: there is no chat inside Pieowl. The server is hosted, so there is nothing to install, and it shows up in your client as Pieowl.

Endpoint

plaintext
https://api.pieowl.com/mcp

Authentication

Pass the token in an Authorization header:

plaintext
Authorization: Bearer YOUR_TOKEN

If your client can't set headers, pass it as a query parameter instead:

plaintext
https://api.pieowl.com/mcp?token=YOUR_TOKEN

Both work. Prefer the header: query strings end up in browser history, shell history and proxy logs, so a token in the URL is easier to leak by accident.

Token format

The token is your client ID and client secret, joined by a colon and base64-encoded:

plaintext
base64(clientId:clientSecret)

From the dashboard

The easiest way to get your MCP token is from the dashboard, no terminal needed:

  • AI assistants — in Settings → Developers → AI assistants, pick your client (Claude Desktop, Claude Code, Cursor, Windsurf, VS Code or Raycast) and click Create token. Pieowl makes a read-data key for the site and puts the token straight into a ready-made config. Copy it right away: it is shown only once.
  • New key — when you create a read-data key in Settings → Developers → Keys, the success screen shows a Token for AI assistants field ready to copy. Use Download to save your key ID, secret and token as credentials.txt.

From the terminal

bash
echo -n "YOUR_CLIENT_ID:YOUR_CLIENT_SECRET" | base64

Then send it with every request:

plaintext
Authorization: Bearer <base64-encoded-token>

Or, for clients that can't set headers, add it to the MCP URL:

plaintext
https://api.pieowl.com/mcp?token=<base64-encoded-token>

Required client type

Only read and root clients can use MCP. Write-only clients are rejected.

Client typeAccess
readOne site (the one the client belongs to)
rootAny site in your team

Use a read client to limit the AI assistant to one site. Use a root client if you need access across sites or want to list all sites.

Create keys in Settings → Developers in your dashboard. See the Authentication guide for details.

Connecting to Claude Desktop

Add this to your claude_desktop_config.json:

json
{
  "mcpServers": {
    "pieowl": {
      "type": "streamable-http",
      "url": "https://api.pieowl.com/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_TOKEN"
      }
    }
  }
}

If your client doesn't read headers, drop that block and put the token in the URL instead: "url": "https://api.pieowl.com/mcp?token=YOUR_TOKEN".

Connecting with Claude Code CLI

Use the --header flag to pass the token as Authorization: Bearer:

bash
claude mcp add --transport http pieowl https://api.pieowl.com/mcp \
  --header "Authorization: Bearer YOUR_TOKEN"

Or with the token in the URL:

bash
claude mcp add --transport http pieowl "https://api.pieowl.com/mcp?token=YOUR_TOKEN"

Connecting to Cursor

Add this to ~/.cursor/mcp.json (global) or .cursor/mcp.json (one project):

json
{
  "mcpServers": {
    "pieowl": {
      "url": "https://api.pieowl.com/mcp",
      "transport": "streamable-http",
      "headers": {
        "Authorization": "Bearer YOUR_TOKEN"
      }
    }
  }
}

For other clients, copy the config from Settings → Developers → AI assistants in your dashboard.

Available tools

Site access

ToolDescription
list_projectsList all sites your credentials can access, with their site IDs (projectId). Root clients see every site in the team; read clients see only their own.
get_dashboard_urlsGet dashboard links for the current site — overview, events, profiles, sessions, and deep links to specific items.

Dashboards & reports

ToolDescription
list_dashboardsList all dashboards for a site.
get_dashboardGet a dashboard with its full report settings and saved layouts.
list_reportsList all reports in a dashboard with their chart types and tracked events.
get_report_dataRun a saved report and return its data (time series, funnel, metric, etc.).

Dashboard management (root clients)

ToolDescription
create_dashboardCreate a dashboard for a site.
update_dashboardRename a dashboard.
delete_dashboardDelete an empty dashboard, or delete it with its reports using forceDelete.
create_reportAdd a saved chart to a dashboard.
update_reportReplace a saved chart's settings.
delete_reportDelete a saved chart.
duplicate_reportDuplicate a saved chart in its dashboard.
update_report_layoutSet a saved chart's grid position and size on the dashboard.
reset_dashboard_layoutRemove all saved chart layouts from a dashboard.

Discovery

ToolDescription
list_event_namesGet the 50 most common event names on the site. Call this first if you don't know the exact event names.
list_event_propertiesList all property keys tracked for an event (or across all events).
get_event_property_valuesGet all distinct values for one event property.

Events & sessions

ToolDescription
query_eventsQuery raw events with optional filters. Returns single records with path, device, country, referrer and custom properties.
query_sessionsQuery sessions with optional filters. Each session includes duration, entry and exit pages, bounce status and attribution data.

Profiles (users)

ToolDescription
find_profilesSearch and filter user profiles by name, email, location, inactivity, session count, or whether they did a specific event.
get_profileGet one user profile with their most recent events.
get_profile_sessionsGet all sessions for a user profile, newest first.
get_profile_metricsGet lifetime metrics for a user: sessions, page views, bounce rate, revenue and more.

Groups (B2B)

ToolDescription
list_group_typesList all group types on the site (e.g. company, team). Call this before querying groups.
find_groupsSearch for groups by name, ID or type.
get_groupGet one group with its properties and member profiles.

Aggregated metrics

ToolDescription
get_analytics_overviewKey metrics for a date range: visitors, page views, sessions, bounce rate and average session duration.
get_rolling_active_usersActive users over time with a rolling window: daily (DAU), weekly (WAU) or monthly (MAU).
get_top_pagesMost visited pages, ranked by page views.
get_page_performanceBounce rate, average session duration, sessions and page views per page.
get_page_conversionsPages ranked by how many visitors went on to convert after viewing them.
get_entry_exit_pagesMost common entry pages (session start) or exit pages (session end).
get_top_referrersTop traffic sources by referrer name and type.
get_country_breakdownVisitor counts by country, region or city.
get_device_breakdownVisitor counts by device type, browser or OS.

User behavior

ToolDescription
get_funnelAnalyze a conversion funnel between 2 or more events — sign-up flows, checkout, onboarding.
get_retention_cohortWeekly retention cohort table that shows how well users stick around.
get_weekly_retention_seriesWeek-over-week retention as a time series.
get_user_last_seen_distributionHow recently users were last active, grouped into fresh, stale and churned. Useful for churn analysis.
get_user_flowUser navigation flows as a Sankey diagram (before, after or between events).

Google Search Console

These tools need Google Search Console connected for the site. Connect it in the dashboard on the Google search page.

ToolDescription
gsc_get_overviewSearch performance over time: clicks, impressions, CTR and average position.
gsc_get_top_pagesTop pages from Search Console, ranked by clicks.
gsc_get_page_detailsSearch performance for one page, including all queries that bring traffic to it.
gsc_get_top_queriesTop search queries, ranked by clicks.
gsc_get_query_opportunitiesQuick SEO wins: queries ranking 4–20 with meaningful search volume.
gsc_get_query_detailsData for one search query, with every page that ranks for it.
gsc_get_cannibalizationQueries where several of your pages compete with each other in Google.

Rate limiting

60 requests per minute, counted per IP address.