mcpField
M
MCP Fathom Analytics

MCP Fathom Analytics

Local
npmjs.comData & Analytics4Updated 71w ago

About MCP Fathom Analytics

MCP Fathom Analytics is an unofficial server that lets AI assistants access Fathom Analytics account and site data. It includes tools for events, aggregated analytics, and current visitor counts.

Key features

  1. 01Retrieve account details
  2. 02List analytics sites
  3. 03List site events
  4. 04Generate filtered analytics aggregations
  5. 05View current visitors

Use cases

  1. 01Check site visitor counts in real time
  2. 02Analyze pageviews and visits by date
  3. 03Compare page performance or country traffic

MCP support

The server exposes Fathom Analytics account, site, event, aggregation, and current-visitor data as tools for MCP clients.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"fathom-analytics": {
"command": "npx",
"args": [
"-y",
"mcp-fathom-analytics"
],
"env": {
"FATHOM_API_KEY": "<FATHOM_API_KEY>"
}
}
}
}
Run commandnpx -y mcp-fathom-analytics
Environment variables to set
FATHOM_API_KEYSecret

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npmmcp-fathom-analytics

Tools

No tool list yet

Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.

Details

From the project README

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.

smithery badge

Fathom Analytics MCP server MseeP.ai Security Assessment Badge

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

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.

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.