Fathom Analytics MCP by usefulapi

v1.29.0
io.usefulapi/fathom-analytics Checked 1 day ago Published 11 hours ago

Query Fathom Analytics sites, stats, current visitors and events, and manage sites and events.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

fathom_get_token Get the API token's permissions

The connected API token's name, permissions (abilities: "*" = Admin, "all-sites-readonly", or per-site read:<id> / manage:<id>) and timestamps. The secret value is never returned. Good first call to know which tools will work. GET /token.

fathom_get_account Get the account

The Fathom account that owns the API token: id, name and email. Needs an Admin token (the * scope). GET /account.

fathom_list_sites List sites

List the sites the token can read (id, name, sharing, timezone, created_at), oldest first. The site id is what every report tool takes. Needs an Admin or all-sites read-only token; a token scoped to a single site cannot list sites, so use fathom_get_site with that site id instead. Paged: pass next.starting_after. GET /sites.

ParameterTypeDescription
ending_beforestringPage backward from this object id (newest first). Not together with starting_after.
limitintegerItems per page, 1-100 (default 10).
starting_afterstringPage forward: pass next.starting_after from the previous reply (an object id).

fathom_get_site Get a site

One site: id, name, sharing (none/private/public), timezone and created_at. GET /sites/{site_id}.

ParameterTypeDescription
site_id *stringThe site id, the same string as in the tracking code (e.g. CDBUGS). fathom_list_sites lists them.

fathom_list_events List a site's events

List a site's events (conversions/goals): every event name the site has tracked plus events with a currency set, sorted by name. Identify events by name (use it as event_name in fathom_get_aggregation); the id is only a paging cursor. Paged: pass next.starting_after. GET /sites/{site_id}/events.

ParameterTypeDescription
site_id *stringThe site id, the same string as in the tracking code (e.g. CDBUGS). fathom_list_sites lists them.
ending_beforestringPage backward from this object id (newest first). Not together with starting_after.
limitintegerItems per page, 1-100 (default 10).
starting_afterstringPage forward: pass next.starting_after from the previous reply (an object id).

fathom_list_milestones List a site's milestones

List a site's milestones (dated annotations on reports, such as a redesign launch or a campaign start), oldest first. Paged: pass next.starting_after. GET /sites/{site_id}/milestones.

ParameterTypeDescription
site_id *stringThe site id, the same string as in the tracking code (e.g. CDBUGS). fathom_list_sites lists them.
ending_beforestringPage backward from this object id (newest first). Not together with starting_after.
limitintegerItems per page, 1-100 (default 10).
starting_afterstringPage forward: pass next.starting_after from the previous reply (an object id).

fathom_get_milestone Get a milestone

One milestone: id, name, milestone_date, created_at, updated_at. GET /sites/{site_id}/milestones/{milestone_id}.

ParameterTypeDescription
milestone_id *stringThe milestone id (a UUID, from fathom_list_milestones).
site_id *stringThe site id, the same string as in the tracking code (e.g. CDBUGS). fathom_list_sites lists them.

fathom_get_aggregation Run a traffic or event report

Fathom's custom report (the dashboard's numbers): aggregate pageviews or one event over a date range, optionally grouped by date and/or fields and filtered. Pageviews: aggregates visits (unique site visits), uniques (unique page visits), pageviews, avg_duration (seconds), bounce_rate. Events (entity event + event_name): conversions, unique_conversions, value (in cents). Examples: top pages = field_grouping [pathname], sort_by pageviews:desc; traffic sources = [referrer_source] or [referrer_hostname]; AI referrals = [ai_source]; daily trend = date_grouping day. All numbers come back as strings.…

ParameterTypeDescription
aggregates *arrayMetrics. pageview: visits, uniques, pageviews, avg_duration, bounce_rate. event: conversions, unique_conversions, value.
entity *stringpageview = site traffic; event = one event's conversions (needs event_name).
site_id *stringThe site id, the same string as in the tracking code (e.g. CDBUGS). fathom_list_sites lists them.
date_fromstringStart, YYYY-MM-DD (start of day) or "YYYY-MM-DD HH:MM:SS", in the site's timezone. Default: the first recorded data.
date_groupingstringGroup by time (omit for one total). hour only for ranges up to 7 days.
date_tostringEnd, YYYY-MM-DD (end of day) or "YYYY-MM-DD HH:MM:SS", in the site's timezone. Default: now.
event_namestringFor entity event: the event's name, as listed by fathom_list_events.
field_groupingarrayGroup by these fields, e.g. [pathname] or [referrer_source, utm_campaign].
filtersarrayFilters, all applied (AND). Example: [{"property":"country_code","operator":"is","value":"GB"}].
limitintegerRow cap, 1-1000 (default 500 when grouping by fields).
sort_bystring"<field>:asc|desc" with a field from aggregates or field_grouping (or timestamp with date_grouping), e.g. pageviews:desc.

fathom_get_current_visitors Get current visitors

Live visitors on a site right now: the total, and with detailed true the top 150 pages (hostname, pathname, total) and top 150 referrers. GET /current_visitors.

ParameterTypeDescription
site_id *stringThe site id, the same string as in the tracking code (e.g. CDBUGS). fathom_list_sites lists them.
detailedbooleantrue = also the top pages and referrers (default false: only the count).

fathom_create_site Create a site

Create a new site in the Fathom account (returns its id, used in the tracking code). Needs an Admin token. Sharing private needs share_password; multi_domain true needs multi_domain_option. POST /sites.

ParameterTypeDescription
name *stringSite name (up to 255 characters; need not match the URL).
multi_domainbooleantrue = the site may track multiple domains.
multi_domain_optionstringRequired when multi_domain is true: report domains combined or separate.
share_passwordstringRequired when sharing is private: the password for the shared dashboard.
sharingstringDashboard sharing: none (default), private (password) or public.
timezonestringReporting timezone as a TZ database name, e.g. America/New_York, Europe/London, UTC.

fathom_update_site Update a site

Change a site's name, sharing, timezone or multi-domain setting (send only what changes). Changing the timezone changes how reports are bucketed. Needs a manage token for the site. POST /sites/{site_id}.

ParameterTypeDescription
site_id *stringThe site id, the same string as in the tracking code (e.g. CDBUGS). fathom_list_sites lists them.
multi_domainbooleantrue = the site may track multiple domains.
multi_domain_optionstringRequired when multi_domain is true: combined or separate.
namestringNew site name (up to 255 characters).
share_passwordstringRequired when setting sharing to private.
sharingstringDashboard sharing: none, private (needs share_password) or public.
timezonestringReporting timezone as a TZ database name, e.g. America/New_York, Europe/London, UTC.

fathom_set_event_currency Set an event's currency

Set the currency of an event's value by event name (works before the event is first tracked). Needs a manage token for the site. POST /sites/{site_id}/events/currency.

ParameterTypeDescription
currency *stringdollar, pound, euro, yuan, peso, shekel, yen, won, hryvnia, franc, rupee, integer (a plain number) or none.
event_name *stringThe event's name exactly as tracked (up to 255 characters; fathom_list_events lists them).
site_id *stringThe site id, the same string as in the tracking code (e.g. CDBUGS). fathom_list_sites lists them.

fathom_clear_event_currency Clear an event's currency

Remove the currency set for an event, so it uses the site's default again. The event and its completion data stay. Needs a manage token for the site. DELETE /sites/{site_id}/events?name=.

ParameterTypeDescription
event_name *stringThe event's name exactly as tracked (fathom_list_events lists them).
site_id *stringThe site id, the same string as in the tracking code (e.g. CDBUGS). fathom_list_sites lists them.

fathom_create_milestone Create a milestone

Add a milestone (a dated annotation shown on the site's reports, e.g. a launch or campaign start). Needs a manage token for the site. POST /sites/{site_id}/milestones.

ParameterTypeDescription
milestone_date *stringThe milestone's date, YYYY-MM-DD.
name *stringMilestone name (up to 30 characters), e.g. Redesign launch.
site_id *stringThe site id, the same string as in the tracking code (e.g. CDBUGS). fathom_list_sites lists them.

fathom_update_milestone Update a milestone

Rename or re-date a milestone (both name and milestone_date are required). Needs a manage token for the site. POST /sites/{site_id}/milestones/{milestone_id}.

ParameterTypeDescription
milestone_date *stringThe milestone's date, YYYY-MM-DD.
milestone_id *stringThe milestone id (a UUID, from fathom_list_milestones).
name *stringMilestone name (up to 30 characters), e.g. Redesign launch.
site_id *stringThe site id, the same string as in the tracking code (e.g. CDBUGS). fathom_list_sites lists them.

fathom_delete_milestone Delete a milestone

Permanently delete a milestone (only the annotation; traffic data is not touched). Cannot be undone. Needs a manage token for the site. DELETE /sites/{site_id}/milestones/{milestone_id}.

ParameterTypeDescription
milestone_id *stringThe milestone id (a UUID, from fathom_list_milestones).
site_id *stringThe site id, the same string as in the tracking code (e.g. CDBUGS). fathom_list_sites lists them.