返回 MCP 目录
public公开dns本地运行

appsflyer-mcp

一个用于集成AppsFlyer分析数据与AI助手的MCP服务器,支持多种报告类型和安全认证。

article

README

🚀 AppsFlyer MCP服务器

AppsFlyer MCP服务器是一个模型上下文协议(MCP)服务器,用于将AppsFlyer分析数据与AI助手集成,为数据分析和应用提供有力支持。

🚀 快速开始

AppsFlyer MCP服务器可帮助你将AppsFlyer的分析数据与AI助手集成。按照以下步骤操作,即可快速启动并使用该服务器。

✨ 主要特性

  • 从AppsFlyer Pull API获取聚合数据报告。
  • 支持多种报告类型,包括合作伙伴报告(partners_report)、按日期的合作伙伴报告(partners_by_date_report)、每日报告(daily_report)、地理报告(geo_report)和按日期的地理报告(geo_by_date_report)。
  • 采用安全的API令牌认证机制。
  • 使用Pydantic进行类型安全的输入验证。

📦 安装指南

git clone https://github.com/ysntony/appsflyer-mcp
cd appsflyer-mcp
uv sync

📚 详细文档

配置

你可以通过以下两种方式设置AppsFlyer API凭证:

方式一:设置环境变量

export APPSFLYER_API_BASE_URL="https://hq1.appsflyer.com"
export APPSFLYER_TOKEN="your_api_token_here"

方式二:创建.env文件

APPSFLYER_API_BASE_URL=https://hq1.appsflyer.com
APPSFLYER_TOKEN=your_api_token_here

使用方法

运行MCP服务器

uv run python run_server.py

MCP配置

将以下内容添加到你的MCP配置文件中:

{
  "mcpServers": {
    "appsflyer": {
      "command": "uv",
      "args": ["run", "python", "run_server.py"],
      "cwd": "/path/to/appsflyer-mcp",
      "env": {
        "APPSFLYER_API_BASE_URL": "https://hq1.appsflyer.com",
        "APPSFLYER_TOKEN": "your_api_token_here"
      }
    }
  }
}

可用工具

  • get_aggregate_data:从AppsFlyer Pull API获取聚合数据报告。
  • test_appsflyer_connection:测试与AppsFlyer API的连接。

报告类型

  • partners_report:合作伙伴绩效数据。
  • partners_by_date_report:每日合作伙伴绩效数据。
  • daily_report:每日聚合数据(默认)。
  • geo_report:地理绩效数据。
  • geo_by_date_report:每日地理绩效数据。

开发

uv sync --dev
pytest

📄 许可证

本项目采用MIT许可证。

help

运行方式说明

cloud

托管运行

托管运行通常表示这个 MCP Server 由服务方环境承载,用户一般按页面提供的连接方式或授权流程接入,不需要在本地长期启动一个 MCP 进程

  1. 打开服务方连接页
  2. 完成授权或复制端点
  3. 在 MCP 客户端中连接
terminal

本地运行 / 其它方式

本地运行通常需要用户在自己的电脑或服务器上安装依赖,把 server_config 复制到 MCP 客户端,并按 env_schema 补齐环境变量、密钥或其它配置

  1. 复制 server_config
  2. 安装所需依赖
  3. 补齐环境变量后重启客户端