Skip to main content
Glama
MCP Fathom Analytics

MCP Fathom Analytics

by mackenly

MCP Fathom Analytics

An unofficial Model Context Protocol (MCP) server for accessing Fathom Analytics data through an AI assistant. This implementation uses the @mackenly/fathom-api unofficial SDK to interact with the Fathom Analytics API. Not affiliated, endorsed, or supported by Fathom Analytics. Published to npm as an npx script.

Features

The MCP server provides the following Fathom Analytics tools:

Account Information

  • get-account: Retrieve details about your Fathom Analytics account

Sites Management

  • list-sites: List all your Fathom Analytics sites

Events

  • list-events: List events for a specific site

Analytics

  • get-aggregation: Generate aggregated analytics reports with flexible filtering and grouping options

Visitor Tracking

  • get-current-visitors: Get real-time data about current site visitors

Related MCP server: @datafast/mcp-server

Usage

If you're using Claude Desktop, you can add the MCP server using the json config (more info). Here's an example:

{
    "mcpServers": {
        "fathom-analytics": {
            "command": "npx",
            "args": [
                "-y",
                "mcp-fathom-analytics"
            ],
            "env": {
                "FATHOM_API_KEY": "your_api_key_here"
            }
        }
    }
}

You can find more information about other MCP Clients here: Model Context Protocol Example Clients

API Structure

The MCP server uses the @mackenly/fathom-api SDK to interface with the Fathom Analytics API endpoints:

  1. Account API: https://api.usefathom.com/v1/account

  2. Sites API: https://api.usefathom.com/v1/sites

  3. Events API: https://api.usefathom.com/v1/sites/SITE_ID/events

  4. Aggregation API: https://api.usefathom.com/v1/aggregations

  5. Current Visitors API: https://api.usefathom.com/v1/current_visitors

Aggregation Examples

The aggregation tool is highly flexible. Here are some example use cases:

  1. Daily pageview statistics for the last 30 days:

{
  "entity": "pageview",
  "entity_id": "SITE_ID",
  "aggregates": "pageviews,uniques,visits",
  "date_grouping": "day",
  "date_from": "2023-08-01 00:00:00"
}
  1. Performance of individual pages:

{
  "entity": "pageview",
  "entity_id": "SITE_ID",
  "aggregates": "pageviews,uniques,avg_duration",
  "field_grouping": "pathname",
  "sort_by": "pageviews:desc",
  "limit": 10
}
  1. Traffic from specific countries:

{
  "entity": "pageview",
  "entity_id": "SITE_ID",
  "aggregates": "visits",
  "field_grouping": "country_code",
  "sort_by": "visits:desc"
}

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Available Tools

5 tools
get-accountB

Get Fathom Analytics account information

Inputs: no named parameters.

get-aggregationC

Get aggregated analytics data from Fathom

Inputs: entity (required), entity_id (required), aggregates (required), date_from (required), +7 more.

get-current-visitorsC

Get current visitors for a Fathom Analytics site

Inputs: site_id (required), detailed.

list-eventsB

List all events for a Fathom Analytics site (automatically handles pagination)

Inputs: site_id (required), limit.

list-sitesC

List all Fathom Analytics sites on the account

Inputs: limit.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.5/5.0

    Scored across 5 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose targeting different resources: account info, aggregated data, current visitors, events, and sites. There is no overlap in functionality, making it easy for an agent to select the right tool without confusion.

    Naming Consistency5/5

    All tool names follow a consistent verb_noun pattern using hyphen-separated lowercase words (e.g., get-account, list-sites). The naming is predictable and uniform across all tools, enhancing readability and usability.

    Tool Count5/5

    With 5 tools, the server is well-scoped for analytics purposes, covering key operations like retrieving account details, aggregated data, real-time visitors, events, and sites. Each tool earns its place without being overly sparse or bloated.

    Completeness4/5

    The tool set provides comprehensive read-only coverage for analytics data, including account, sites, events, and current visitors. A minor gap exists in write operations (e.g., creating or updating sites/events), but agents can still perform most common analytics tasks effectively.

    Maintenance

    ActivityInactive
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      C
      maintenance
      Enables AI assistants to query privacy-first web analytics from Measure.events, including pageviews, top pages, referrers, and custom event tracking, all via natural language.
      6
      2
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      Exposes DataFast analytics as tools for AI assistants, enabling natural language queries about website metrics such as visitors, referrers, revenue, and real-time data.
      22
      1
      MIT
    • F
      license
      Not graded
      quality
      D
      maintenance
      Connects AI assistants to the Fathom meeting recording API to retrieve meeting summaries, transcripts, and action items.
      -
    • A
      license
      A
      quality
      F
      maintenance
      Unofficial MCP server that lets AI agents query Aptabase analytics using cookie-authenticated dashboard endpoints, providing tools for metrics, events, and sessions.
      17
      1
      MIT