探查监控添加福利群:解决AI开发者的「MCP实战痛点」一个非官方的模型上下文协议(MCP)服务器,用于通过AI助手访问Fathom Analytics数据。该实现使用@mackenly/fathom-api非官方SDK与Fathom Analytics API进行交互。与Fathom Analytics无关,未经其认可或支持。已发布为npm上的npx脚本。
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客户端的更多信息:模型上下文协议示例客户端
MCP服务器使用@mackenly/fathom-api SDK与Fathom Analytics API端点进行交互:
https://api.usefathom.com/v1/accounthttps://api.usefathom.com/v1/siteshttps://api.usefathom.com/v1/sites/SITE_ID/eventshttps://api.usefathom.com/v1/aggregationshttps://api.usefathom.com/v1/current_visitors聚合工具非常灵活。以下是一些示例用例:
{
"entity": "pageview",
"entity_id": "SITE_ID",
"aggregates": "pageviews,uniques,visits",
"date_grouping": "day",
"date_from": "2023-08-01 00:00:00"
}

{
"entity": "pageview",
"entity_id": "SITE_ID",
"aggregates": "pageviews,uniques,avg_duration",
"field_grouping": "pathname",
"sort_by": "pageviews:desc",
"limit": 10
}

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

欢迎贡献!请随时提交Pull Request。
本项目根据MIT许可证授权 - 详情请参阅LICENSE文件。