友盟MCP

@umengfe/mcp-server-umeng-openapi
Hosted
4 Stars 2.3k 次浏览 umengfe 更新于 2026-08-23

Umeng MCP(Model Context Protocol)API 的 Node.js 客户端库对 Umeng 统计 API 进行了一系列封装。

MCP 服务配置

复制以下 JSON 到 OPClaw 或其他 MCP 客户端的配置文件中即可使用

{
  "mcpServers": {
    "umeng-openapi": {
      "args": [
        "-y",
        "@umengfe/mcp-server-umeng-openapi"
      ],
      "command": "npx",
      "env": {
        "UMENG_API_KEY": "your-api-key",
        "UMENG_API_SECRET": "your-api-secret"
      }
    }
  }
}

该服务需要配置环境变量:UMENG_API_KEY、UMENG_API_SECRET

可用工具 (27 个)

该服务在 MCP 协议中暴露的工具,AI 可按需调用

com.umeng.uapp/umeng.uapp.getAllAppData

友盟开放API,获取所有App统计数据

该工具无需必填参数,直接调用即可

com.umeng.uapp/umeng.uapp.getAppCount

友盟开放API,获取App的总数量

该工具无需必填参数,直接调用即可

com.umeng.uapp/umeng.uapp.getAppList 3 个参数

友盟开放API,获取App列表

该工具无需必填参数,直接调用即可

com.umeng.uapp/umeng.uapp.getNewAccounts 5 个参数 需填 3 项

友盟开放API,获取单个应用或者说appkey的新增账号(仅游戏类型app)

必填参数:appkey、startDate、endDate

com.umeng.uapp/umeng.uapp.getActiveAccounts 5 个参数 需填 3 项

友盟开放API,获取活跃账号(仅游戏类型app)

必填参数:appkey、startDate、endDate

com.umeng.uapp/umeng.uapp.getLaunchesByChannelOrVersion 6 个参数 需填 4 项

友盟开放API,根据渠道或版本条件,获取App启动次数

必填参数:appkey、startDate、endDate、periodType

com.umeng.uapp/umeng.uapp.getActiveUsersByChannelOrVersion 6 个参数 需填 4 项

友盟开放API,根据渠道或版本条件,获取App活跃用户数

必填参数:appkey、startDate、endDate、periodType

com.umeng.uapp/umeng.uapp.getNewUsersByChannelOrVersion 6 个参数 需填 4 项

友盟开放API,根据渠道或版本条件,获取App新增用户数

必填参数:appkey、startDate、endDate、periodType

com.umeng.uapp/umeng.uapp.event.param.getValueDurationList 5 个参数 需填 5 项

友盟开放API,获取事件参数值时长列表

必填参数:appkey、eventName、startDate、endDate、eventParamName

com.umeng.uapp/umeng.uapp.getTodayYesterdayData 1 个参数 需填 1 项

友盟开放API,获取App今天与昨天的统计数据

必填参数:appkey

com.umeng.uapp/umeng.uapp.getYesterdayData 1 个参数 需填 1 项

友盟开放API,获取App昨天统计数据

必填参数:appkey

com.umeng.uapp/umeng.uapp.getTodayData 1 个参数 需填 1 项

友盟开放API,获取App今天统计数据

必填参数:appkey

com.umeng.uapp/umeng.uapp.getUniqueUsers 4 个参数 需填 4 项

友盟开放API,获取自定义事件的独立用户数

必填参数:appkey、eventName、startDate、endDate

com.umeng.uapp/umeng.uapp.getChannelData 4 个参数 需填 2 项

友盟开放API,获取渠道维度统计数据

必填参数:appkey、date

com.umeng.uapp/umeng.uapp.getVersionData 4 个参数 需填 2 项

友盟开放API,获取版本维度统计数据

必填参数:appkey、date

com.umeng.uapp/umeng.uapp.event.param.getData 6 个参数 需填 6 项

友盟开放API,获取事件参数值统计数据

必填参数:appkey、eventName、startDate、endDate、eventParamName、paramValueName

com.umeng.uapp/umeng.uapp.event.param.getValueList 5 个参数 需填 6 项

友盟开放API,获取事件参数值列表

必填参数:appkey、eventName、startDate、endDate、eventParamName、paramValueName

com.umeng.uapp/umeng.uapp.event.getData 4 个参数 需填 4 项

友盟开放API,获取自定义事件的统计数据

必填参数:appkey、eventName、startDate、endDate

com.umeng.uapp/umeng.uapp.event.list 4 个参数 需填 4 项

友盟开放API,获取事件参数列表

必填参数:appkey、startDate、endDate、eventId

com.umeng.uapp/umeng.uapp.event.list 6 个参数 需填 3 项

友盟开放API,获取事件列表

必填参数:appkey、startDate、endDate

com.umeng.uapp/umeng.uapp.getRetentions 7 个参数 需填 3 项

友盟开放API,获取App新增用户留存率,获取指定App某个时间范围内的新增用户留存率

必填参数:appkey、startDate、endDate

com.umeng.uapp/umeng.uapp.getDurations 5 个参数 需填 2 项

友盟开放API,获取App使用时长

必填参数:appkey、date

com.umeng.uapp/umeng.uapp.getLaunches 4 个参数 需填 3 项

友盟开放API,获取App启动次数

必填参数:appkey、startDate、endDate

com.umeng.uapp/umeng.uapp.getActiveUsers 4 个参数 需填 3 项

友盟开放API,获取App活跃用户数

必填参数:appkey、startDate、endDate

com.umeng.uapp/umeng.uapp.getNewUsers 4 个参数 需填 3 项

友盟开放API,获取App新增用户数

必填参数:appkey、startDate、endDate

com.umeng.uapp/umeng.uapp.getDailyData 4 个参数 需填 2 项

友盟开放API,获取App统计数据

必填参数:appkey、date

com.umeng.uapp/umeng.uapp.event.create 4 个参数 需填 3 项

友盟开放API,创建自定义事件

必填参数:appkey、eventName、eventDisplayName

服务介绍

@umengfe/mcp-server-umeng-openapi

A Node.js client library for the Umeng MCP (Model Context Protocol) API, providing a series of encapsulations for Umeng statistical data APIs.

Installation


npm install @umengfe/mcp-server-umeng-openapi

Configuration in Cursor

Add the following to the mcp.json file in Cursor:

{
	"mcpServers": {
		"umeng-openapi": {
			"command": "npx",
			"args": [
        "-y",
        "@umengfe/mcp-server-umeng-openapi"
			],
			"env": {
				"UMENG_API_KEY": "xxx",
				"UMENG_API_SECRET": "xxx"
			}
		}
	}
}

On Windows, you need to add a separate configuration

{
  "mcpServers": {
    "umeng-openapi": {
          "command": "cmd",
          "args": [
            "/c",
            "npx",
            "-y",
            "@umengfe/mcp-server-umeng-openapi"
          ],
          "env": {
            "UMENG_API_KEY": "xxx",
            "UMENG_API_SECRET": "xxx"
          }
        }
  }
}

Umeng OpenAPI Signature Helper

This library provides a signature helper. Input your API key and API security key, fill in the function and parameters to generate a signed request URL.


import UmengOpenAPI from '@umengfe/mcp-server-umeng-openapi/dist/src/umopenapi.js';

const client = new UmengOpenAPI('your_api_key','your_api_security');

const signedUrl = client.generateSignedUrl('param2/1/com.umeng.uapp/umeng.uapp.getAllAppData', {a:1,b:2});

fetch(signedUrl).then(res => res.json()).then(data => console.log(data));

API Documentation

Umeng Statistical Data

Get statistical data for all applications.




// 示例返回数据(数字仅供参考)

{

  "allAppData": [

    {

      "yesterdayNewUsers": 1234,        // 昨天新增用户

      "yesterdayUniqNewUsers": 1234,    // 昨天新增独立用户

      "todayLaunches": 5000,            // 今天启动次数

      "totalUsers": 100000,             // 总用户数

      "todayNewUsers": 500,             // 今天新增用户

      "yesterdayUniqActiveUsers": 2000,  // 昨天活跃独立用户

      "todayActivityUsers": 1500,        // 今天活跃用户

      "yesterdayLaunches": 4800,         // 昨天启动次数

      "yesterdayActivityUsers": 2100     // 昨天活跃用户

    }

  ]

}

License

MIT

Changelog

[1.0.6] - 2025-05-20

Fixes

  • Fixed parameter extraction serialization error

[1.0.5] - 2025-05-19

Added

  • Get event parameter value duration list.
  • Get today and yesterday's application statistics.
  • Get yesterday's application statistics.
  • Get today's application statistics.
  • Get unique user count for custom events.
  • Get channel dimension statistics.
  • Get version dimension statistics.
  • Get event parameter value statistics.
  • Get event parameter value list.
  • Get custom event statistics.
  • Get event parameter list.
  • Get event list.
  • Get new user retention rate for the application.
  • Get application usage duration.
  • Get application launch counts.
  • Get active users for the application.
  • Get new users for the application.
  • Get application statistics.
  • Create a custom event.

[1.0.4] - 2025-05-12

Added

  • Get new accounts for a single application.
  • Get active accounts for a single application.
  • Get application launch counts based on channel or version conditions.
  • Get active users for an application based on channel or version conditions.
  • Get new users for an application based on channel or version conditions.

[1.0.3] - 2025-10-06

Added

  • Added the ability to get the total number of all applications.
  • Added the ability to get the application list.

Frequently Asked Questions (FAQ)

  • How to get UMENG_API_KEY and UMENG_API_SECRET?
    Please visit the Open API status page on the Umeng Developer Platform to obtain this information.

相关 MCP 服务