返回市场
MCP-洞察分析服务器

MCP-洞察分析服务器

作者:mackenly2 星标更新:2025-06-17

项目介绍

MCP Fathom Analytics

一个非官方的模型上下文协议(MCP)服务器,用于通过AI助手访问Fathom Analytics的数据。此实现使用了@mackenly/fathom-api非官方SDK与Fathom Analytics API进行交互。本项目未得到Fathom Analytics的关联、认可或支持。已发布到npm作为npx脚本

smithery 徽章

<p float="left"> <a href="https://glama.ai/mcp/servers/56cxbakbc4" width="33%"> <img width="380" height="200" src="https://gips1.baidu.com/it/u=1916178473,502365475&fm=3081&app=3081&f=PNG?w=760&h=400" alt="Fathom Analytics MCP 服务器" /> </a> <a href="https://mseep.ai/app/mackenly-mcp-fathom-analytics" width="33%"> <img width="200" src="https://gips0.baidu.com/it/u=3254699088,2755018337&fm=3081&app=3081&f=PNG?w=520&h=180" alt="MseeP.ai 安全评估徽章" /> </a> </p>

功能

该MCP服务器提供了以下Fathom Analytics工具:

账户信息

  • get-account:获取您的Fathom Analytics账户详情

站点管理

  • list-sites:列出您所有的Fathom Analytics站点

事件

  • list-events:列出特定站点的事件

分析

  • get-aggregation:生成具有灵活过滤和分组选项的聚合分析报告

访客追踪

  • get-current-visitors:获取当前站点访客的实时数据

使用方法

如果您正在使用Claude Desktop,可以通过json配置添加MCP服务器(更多信息)。这里有一个示例:

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

您可以在这里找到其他MCP客户端的更多信息:模型上下文协议示例客户端

API 结构

该MCP服务器使用@mackenly/fathom-api SDK与Fathom Analytics API端点进行交互:

  1. 账户APIhttps://api.usefathom.com/v1/account
  2. 站点APIhttps://api.usefathom.com/v1/sites
  3. 事件APIhttps://api.usefathom.com/v1/sites/SITE_ID/events
  4. 聚合APIhttps://api.usefathom.com/v1/aggregations
  5. 当前访客APIhttps://api.usefathom.com/v1/current_visitors

聚合示例

聚合工具非常灵活。这里有一些示例用法:

  1. 过去30天每日页面浏览统计
{
  "entity": "pageview",
  "entity_id": "SITE_ID",
  "aggregates": "pageviews,uniques,visits",
  "date_grouping": "day",
  "date_from": "2023-08-01 00:00:00"
}
  1. 单个页面的表现
{
  "entity": "pageview",
  "entity_id": "SITE_ID",
  "aggregates": "pageviews,uniques,avg_duration",
  "field_grouping": "pathname",
  "sort_by": "pageviews:desc",
  "limit": 10
}
  1. 来自特定国家的流量
{
  "entity": "pageview",
  "entity_id": "SITE_ID",
  "aggregates": "visits",
  "field_grouping": "country_code",
  "sort_by": "visits:desc"
}

贡献

欢迎贡献!请随时提交Pull Request。

许可证

本项目采用MIT许可证——请参阅LICENSE文件以获取详细信息。 </中文翻译>