umeng-openapi-mcp-server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@umeng-openapi-mcp-server show today's app summary"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
umeng-openapi-mcp-server
友盟 U-App 移动统计 OpenAPI 的 MCP Server。可接入 Codex、Claude Desktop、Cursor 等支持 MCP 的 Agent,让 Agent 直接查询友盟应用列表、核心统计、留存、渠道/版本维度、自定义事件和游戏账号统计数据。
当前覆盖官方 com.umeng.uapp 命名空间下的 28 个 U-App 接口,并提供常用聚合工具与原始 OpenAPI 调用能力。
功能
查询当前账号下的 U-App 应用列表,并定位
appkey查询今日、昨日、指定日期的 App 统计数据
查询新增用户、活跃用户、启动次数、使用时长和留存数据
查询渠道维度、版本维度数据
查询自定义事件、事件参数和事件参数值统计
查询游戏类型 App 的新增账号、活跃账号数据
创建 U-App 数据源和自定义事件
使用
umeng_raw_call调用同命名空间下的 OpenAPI
Related MCP server: umami-mcp-server
环境要求
Node.js >= 20
npm
友盟 OpenAPI 的
apiKey和apiSecurity
apiKey / apiSecurity 是友盟 OpenAPI 账号级鉴权信息;appkey 是具体 App 的应用 ID,可通过 umeng_get_all_apps 或 umeng_uapp_get_app_list 查询。
MCP 配置
在 Agent 的 MCP 配置中添加:
{
"mcpServers": {
"umeng": {
"command": "npx",
"args": [
"-y",
"github:devhuang0714/umeng-openapi-mcp-server",
"--transport",
"stdio"
],
"env": {
"UMENG_API_KEY": "你的apiKey",
"UMENG_API_SECURITY": "你的apiSecurity",
"UMENG_HOST": "gateway.open.umeng.com",
"UMENG_TIMEOUT_MS": "20000",
"UMENG_DEFAULT_APPKEY": ""
}
}
}
}UMENG_DEFAULT_APPKEY 可选。设置后,带 appkey 的工具可以省略 appkey 参数,默认查询该 App。
快速验证
配置完成后,可先让 Agent 调用:
umeng_ping返回 ok: true 表示 MCP Server 已启动,并且环境变量已正确加载。
随后查询应用列表:
umeng_get_all_apps拿到目标应用的 appkey 后,即可调用统计工具,例如:
{
"appkey": "你的AppKey",
"date": "2026-06-16"
}常用工具
MCP tool | 用途 |
| 检查服务状态 |
| 分页查询应用列表 |
| 自动翻页查询全部应用 |
| 按关键词搜索应用 |
| 聚合查询今日/昨日及指定日期统计 |
| 按 |
U-App 接口工具
这些工具一一对应官方 com.umeng.uapp 的 U-App 移动统计接口,统一使用 umeng_uapp_* 命名。
MCP tool | 官方 API |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
参数示例
查询新增用户趋势:
{
"appkey": "你的AppKey",
"startDate": "2026-06-01",
"endDate": "2026-06-16",
"periodType": "daily"
}查询单日统计:
{
"appkey": "你的AppKey",
"date": "2026-06-16",
"channel": "App Store",
"version": "1.0.0"
}原始 OpenAPI 调用:
{
"apiName": "umeng.uapp.getDailyData",
"namespace": "com.umeng.uapp",
"version": 1,
"method": "GET",
"params": {
"appkey": "你的AppKey",
"date": "2026-06-16"
}
}本地运行
需要在本地直接运行时:
git clone git@github.com:devhuang0714/umeng-openapi-mcp-server.git
cd umeng-openapi-mcp-server
npm install
npm run build
npm run start也可以使用 .env:
cp .env.example .envUMENG_API_KEY=你的友盟OpenAPI_apiKey
UMENG_API_SECURITY=你的友盟OpenAPI_apiSecurity
UMENG_HOST=gateway.open.umeng.com
UMENG_TIMEOUT_MS=20000
UMENG_DEFAULT_APPKEY=Docker
docker build -t umeng-openapi-mcp-server .
docker run --rm -i \
-e UMENG_API_KEY="你的apiKey" \
-e UMENG_API_SECURITY="你的apiSecurity" \
-e UMENG_HOST="gateway.open.umeng.com" \
-e UMENG_TIMEOUT_MS="20000" \
umeng-openapi-mcp-serverMCP stdio 需要保持标准输入打开,因此 Docker 运行时需要 -i。
常见问题
如何获取 appkey?
调用 umeng_get_all_apps 或 umeng_uapp_get_app_list,返回结果中的 appkey 即为后续统计查询使用的 App ID。
已配置 UMENG_DEFAULT_APPKEY,为什么仍然查不到数据?
确认 UMENG_DEFAULT_APPKEY 是目标 U-App 的应用 appkey,不是友盟 OpenAPI 的 UMENG_API_KEY。
友盟返回鉴权或权限错误
检查 UMENG_API_KEY / UMENG_API_SECURITY 是否正确,以及当前友盟账号是否拥有目标 App 的 OpenAPI 访问权限。
npx 运行时出现 npm cache 权限错误
可以临时指定 npm cache:
npm_config_cache=/tmp/npm-cache npx -y github:devhuang0714/umeng-openapi-mcp-server --transport stdioAvailable Tools
40 toolsumeng_find_appsFind Umeng apps by keywordB
Search applications by app name, platform, or appkey. This is useful when the agent only knows part of the app name.
Inputs: keyword (required), maxPages.
umeng_get_active_usersGet active users trendC
Get active-user trend data for a date range.
Inputs: startDate (required), endDate (required), appkey, periodType.
umeng_get_all_appsGet all Umeng appsA
Fetch all Umeng U-App applications by paging through umeng.uapp.getAppList and normalize common appkey fields.
Inputs: maxPages.
umeng_get_app_listGet Umeng app list by pageA
Query Umeng U-App application list. Use this to find appkey before calling statistics tools.
Inputs: page, perPage, accessToken.
umeng_get_app_summaryGet app summaryC
Convenience tool: returns today/yesterday data and optionally daily data for a specified date.
Inputs: appkey, date, channel.
umeng_get_daily_dataGet daily statisticsB
Get daily core statistics for a specific Umeng U-App appkey and date.
Inputs: date (required), appkey, channel.
umeng_get_durationsGet usage duration statisticsC
Get app usage-duration statistics for one date.
Inputs: date (required), appkey, statType, channel, +1 more.
umeng_get_launchesGet launches trendB
Get app launches/startup count trend data for a date range.
Inputs: startDate (required), endDate (required), appkey, periodType.
umeng_get_new_usersGet new users trendC
Get new-user trend data for a date range.
Inputs: startDate (required), endDate (required), appkey, periodType.
umeng_get_today_yesterday_dataGet today and yesterday statisticsB
Get today and yesterday core statistics for a specific Umeng U-App appkey.
Inputs: appkey.
umeng_pingCheck Umeng MCP server statusA
Check whether this MCP server is running and whether required environment variables were loaded.
Inputs: no named parameters.
umeng_raw_callCall raw Umeng OpenAPIA
Advanced tool for calling any Umeng OpenAPI by apiName. Use this when a specific endpoint is not wrapped yet.
Inputs: apiName (required), params, namespace, version, +1 more.
umeng_uapp_create_appU-App create app data sourceB
Create a U-App data source. Official API: umeng.uapp.createApp.
Inputs: name (required), type (required), platform (required), language (required), +3 more.
umeng_uapp_event_createU-App create custom eventC
Create a custom event. Official API: umeng.uapp.event.create.
Inputs: eventName (required), eventDisplayName (required), appkey, eventType.
umeng_uapp_event_get_dataU-App get custom event dataC
Get statistics for a custom event. Official API: umeng.uapp.event.getData.
Inputs: startDate (required), endDate (required), eventName (required), appkey.
umeng_uapp_event_get_unique_usersU-App get custom event unique usersA
Get unique user statistics for a custom event. Official API: umeng.uapp.event.getUniqueUsers.
Inputs: startDate (required), endDate (required), eventName (required), appkey.
umeng_uapp_event_listU-App list custom eventsC
List custom events. Official API: umeng.uapp.event.list.
Inputs: startDate (required), endDate (required), appkey, perPage, +2 more.
umeng_uapp_event_param_get_dataU-App get event parameter value dataC
Get custom event parameter statistics grouped by parameter value. Official API: umeng.uapp.event.param.getData.
Inputs: startDate (required), endDate (required), eventName (required), eventParamName (required), +2 more.
umeng_uapp_event_param_get_value_duration_listU-App get event parameter value duration listB
Get usage duration by custom event parameter value. Official API: umeng.uapp.event.param.getValueDurationList.
Inputs: startDate (required), endDate (required), eventName (required), eventParamName (required), +1 more.
umeng_uapp_event_param_get_value_listU-App get event parameter value listB
Get available values for a custom event parameter. Official API: umeng.uapp.event.param.getValueList.
Inputs: startDate (required), endDate (required), eventName (required), eventParamName (required), +1 more.
umeng_uapp_event_param_listU-App list custom event parametersC
List parameters for a custom event. Official API: umeng.uapp.event.param.list.
Inputs: startDate (required), endDate (required), eventId (required), appkey.
umeng_uapp_get_active_accountsU-App get active accountsA
Get active account trend data. This API is only for game apps. Official API: umeng.uapp.getActiveAccounts.
Inputs: startDate (required), endDate (required), appkey, periodType, +1 more.
umeng_uapp_get_active_usersU-App get active usersC
Get active user trend data. Official API: umeng.uapp.getActiveUsers.
Inputs: startDate (required), endDate (required), appkey, periodType.
umeng_uapp_get_active_users_by_channel_or_versionU-App get active users by channel or versionC
Get active users by channel or version filters. Official API: umeng.uapp.getActiveUsersByChannelOrVersion.
Inputs: startDate (required), endDate (required), appkey, periodType, +2 more.
umeng_uapp_get_all_app_dataU-App get all app dataB
Get yesterday and today base statistics for all apps. Official API: umeng.uapp.getAllAppData.
Inputs: no named parameters.
umeng_uapp_get_app_countU-App get app countA
Get the number of apps for the current OpenAPI account. Official API: umeng.uapp.getAppCount.
Inputs: no named parameters.
umeng_uapp_get_app_listU-App get app listB
Get the current user app list. Official API: umeng.uapp.getAppList.
Inputs: page, perPage, accessToken.
umeng_uapp_get_channel_dataU-App get channel dataC
Get statistics grouped by distribution channel. Official API: umeng.uapp.getChannelData.
Inputs: date (required), appkey, perPage, page.
umeng_uapp_get_daily_dataU-App get daily dataC
Get statistics for a specific app and date. Official API: umeng.uapp.getDailyData.
Inputs: date (required), appkey, version, channel.
umeng_uapp_get_durationsU-App get durationsC
Get app usage duration statistics. Official API: umeng.uapp.getDurations.
Inputs: date (required), appkey, statType, channel, +1 more.
umeng_uapp_get_launchesU-App get launchesC
Get app launch count trend data. Official API: umeng.uapp.getLaunches.
Inputs: startDate (required), endDate (required), appkey, periodType.
umeng_uapp_get_launches_by_channel_or_versionU-App get launches by channel or versionC
Get launch counts by channel or version filters. Official API: umeng.uapp.getLaunchesByChannelOrVersion.
Inputs: startDate (required), endDate (required), appkey, periodType, +2 more.
umeng_uapp_get_new_accountsU-App get new accountsB
Get new account trend data. This API is only for game apps. Official API: umeng.uapp.getNewAccounts.
Inputs: startDate (required), endDate (required), appkey, periodType, +1 more.
umeng_uapp_get_new_usersU-App get new usersC
Get new user trend data. Official API: umeng.uapp.getNewUsers.
Inputs: startDate (required), endDate (required), appkey, periodType.
umeng_uapp_get_new_users_by_channel_or_versionU-App get new users by channel or versionB
Get new users by channel or version filters. Official API: umeng.uapp.getNewUsersByChannelOrVersion.
Inputs: startDate (required), endDate (required), appkey, periodType, +2 more.
umeng_uapp_get_retentionsU-App get retentionsB
Get retention statistics for new or active users. Official API: umeng.uapp.getRetentions.
Inputs: startDate (required), endDate (required), appkey, periodType, +3 more.
umeng_uapp_get_today_dataU-App get today dataC
Get today statistics for an app. Official API: umeng.uapp.getTodayData.
Inputs: appkey.
umeng_uapp_get_today_yesterday_dataU-App get today and yesterday dataC
Get today and yesterday statistics for an app. Official API: umeng.uapp.getTodayYesterdayData.
Inputs: appkey.
umeng_uapp_get_version_dataU-App get version dataC
Get statistics grouped by app version. Official API: umeng.uapp.getVersionData.
Inputs: date (required), appkey.
umeng_uapp_get_yesterday_dataU-App get yesterday dataB
Get yesterday statistics for an app. Official API: umeng.uapp.getYesterdayData.
Inputs: appkey.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 40 tools
Many tools have overlapping purposes, e.g., multiple tools for active users (umeng_get_active_users, umeng_uapp_get_active_users, umeng_uapp_get_active_accounts) and daily data (umeng_get_daily_data, umeng_uapp_get_daily_data, umeng_uapp_get_today_data). This makes it difficult for an agent to distinguish which tool to use.
Naming follows two patterns: 'umeng_get_*' and 'umeng_uapp_*', with variations like 'find' vs 'get'. While each pattern is internally consistent, the mix creates inconsistency. The snake_case convention is consistent overall.
40 tools is high but justifiable for a comprehensive analytics platform. However, many tools are redundant (e.g., multiple wrappers for similar data), suggesting the set could be streamlined.
The tool set covers a wide range of analytics endpoints: app management, events, channels, versions, retention, and various time-based statistics. Gaps are minor (e.g., lack of update/delete for events).
Maintenance
Related MCP Connectors
Clamp Analytics MCP server: traffic, revenue, funnels, cohorts, errors, and search, for AI agents.
MCP server for querying and analyzing data from ad platforms, analytics tools, and spreadsheets
MCP server for building and testing AI agents with multi-model experimentation and insights.
Analytics your AI agent can actually use. Track, experiment, and optimize via MCP.
Related MCP Servers
- AlicenseBqualityDmaintenanceAn MCP server that provides access to the Mixpanel REST API, enabling AI agents to query events, funnels, retention data, and user profiles. It allows users to perform complex analytics tasks and export raw event data through natural language prompts.1619 npmMIT
- AlicenseNot gradedqualityDmaintenanceMCP server for Umami Analytics that provides read-only tools to query website stats, events, sessions, reports, and more, enabling natural language analytics queries.24 npm3MIT
- AlicenseAqualityDmaintenanceA read-only MCP server for Umami analytics, enabling natural language queries of website stats, traffic trends, events, sessions, and analytics reports.1310 npm1Elastic 2.0
- AlicenseNot gradedqualityBmaintenanceMCP server that provides product and web analytics capabilities, allowing AI coding assistants to query funnels, retention, trends, feature flags, A/B tests, and more in natural language.4MIT