Fathom Analytics MCP by usefulapi
v1.29.0Query 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.
| Parameter | Type | Description |
|---|---|---|
ending_before | string | Page backward from this object id (newest first). Not together with starting_after. |
limit | integer | Items per page, 1-100 (default 10). |
starting_after | string | Page 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}.
| Parameter | Type | Description |
|---|---|---|
site_id * | string | The 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.
| Parameter | Type | Description |
|---|---|---|
site_id * | string | The site id, the same string as in the tracking code (e.g. CDBUGS). fathom_list_sites lists them. |
ending_before | string | Page backward from this object id (newest first). Not together with starting_after. |
limit | integer | Items per page, 1-100 (default 10). |
starting_after | string | Page 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.
| Parameter | Type | Description |
|---|---|---|
site_id * | string | The site id, the same string as in the tracking code (e.g. CDBUGS). fathom_list_sites lists them. |
ending_before | string | Page backward from this object id (newest first). Not together with starting_after. |
limit | integer | Items per page, 1-100 (default 10). |
starting_after | string | Page 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}.
| Parameter | Type | Description |
|---|---|---|
milestone_id * | string | The milestone id (a UUID, from fathom_list_milestones). |
site_id * | string | The 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.…
| Parameter | Type | Description |
|---|---|---|
aggregates * | array | Metrics. pageview: visits, uniques, pageviews, avg_duration, bounce_rate. event: conversions, unique_conversions, value. |
entity * | string | pageview = site traffic; event = one event's conversions (needs event_name). |
site_id * | string | The site id, the same string as in the tracking code (e.g. CDBUGS). fathom_list_sites lists them. |
date_from | string | Start, YYYY-MM-DD (start of day) or "YYYY-MM-DD HH:MM:SS", in the site's timezone. Default: the first recorded data. |
date_grouping | string | Group by time (omit for one total). hour only for ranges up to 7 days. |
date_to | string | End, YYYY-MM-DD (end of day) or "YYYY-MM-DD HH:MM:SS", in the site's timezone. Default: now. |
event_name | string | For entity event: the event's name, as listed by fathom_list_events. |
field_grouping | array | Group by these fields, e.g. [pathname] or [referrer_source, utm_campaign]. |
filters | array | Filters, all applied (AND). Example: [{"property":"country_code","operator":"is","value":"GB"}]. |
limit | integer | Row cap, 1-1000 (default 500 when grouping by fields). |
sort_by | string | "<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.
| Parameter | Type | Description |
|---|---|---|
site_id * | string | The site id, the same string as in the tracking code (e.g. CDBUGS). fathom_list_sites lists them. |
detailed | boolean | true = 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.
| Parameter | Type | Description |
|---|---|---|
name * | string | Site name (up to 255 characters; need not match the URL). |
multi_domain | boolean | true = the site may track multiple domains. |
multi_domain_option | string | Required when multi_domain is true: report domains combined or separate. |
share_password | string | Required when sharing is private: the password for the shared dashboard. |
sharing | string | Dashboard sharing: none (default), private (password) or public. |
timezone | string | Reporting 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}.
| Parameter | Type | Description |
|---|---|---|
site_id * | string | The site id, the same string as in the tracking code (e.g. CDBUGS). fathom_list_sites lists them. |
multi_domain | boolean | true = the site may track multiple domains. |
multi_domain_option | string | Required when multi_domain is true: combined or separate. |
name | string | New site name (up to 255 characters). |
share_password | string | Required when setting sharing to private. |
sharing | string | Dashboard sharing: none, private (needs share_password) or public. |
timezone | string | Reporting 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.
| Parameter | Type | Description |
|---|---|---|
currency * | string | dollar, pound, euro, yuan, peso, shekel, yen, won, hryvnia, franc, rupee, integer (a plain number) or none. |
event_name * | string | The event's name exactly as tracked (up to 255 characters; fathom_list_events lists them). |
site_id * | string | The 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=.
| Parameter | Type | Description |
|---|---|---|
event_name * | string | The event's name exactly as tracked (fathom_list_events lists them). |
site_id * | string | The 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.
| Parameter | Type | Description |
|---|---|---|
milestone_date * | string | The milestone's date, YYYY-MM-DD. |
name * | string | Milestone name (up to 30 characters), e.g. Redesign launch. |
site_id * | string | The 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}.
| Parameter | Type | Description |
|---|---|---|
milestone_date * | string | The milestone's date, YYYY-MM-DD. |
milestone_id * | string | The milestone id (a UUID, from fathom_list_milestones). |
name * | string | Milestone name (up to 30 characters), e.g. Redesign launch. |
site_id * | string | The 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}.
| Parameter | Type | Description |
|---|---|---|
milestone_id * | string | The milestone id (a UUID, from fathom_list_milestones). |
site_id * | string | The site id, the same string as in the tracking code (e.g. CDBUGS). fathom_list_sites lists them. |