MobileAction MCP工具
此软件包提供了一套用于与MobileAction应用商店API交互的MCP工具,包括关键字排名、应用程序详细信息、评论、评估等。
需求
- Python 3.10或更高版本
- 紫外线 用于环境和依赖关系管理
- MCP SDK 1.2.0或更高版本
- Claude for Desktop(或其他兼容MCP的客户端)
- python dotenv 用于从加载环境变量
.env文件 - 您必须创建一个
.env使用MobileAction API密钥在项目根目录中创建文件:
MOBILEACTION_API_KEY=your_api_key_here如何跑步
1.设置您的环境
# Install uv (if not already installed)
curl -LsSf https://astral.sh/uv/install.sh | sh
# Create a new directory for your project (if needed)
uv init mobile-action-mcp
cd mobile-action-mcp
# Create and activate a virtual environment
uv venv
source .venv/bin/activate
# Install dependencies
uv add "mcp[cli]" httpx python-dotenv2.将API密钥添加到 .env 文件
创建一个名为的文件 .env 在项目根目录中包含以下内容:
MOBILEACTION_API_KEY=your_api_key_here3.运行MCP服务器
uv run mamcp/appinfo.py4.为桌面配置Claude
在以下位置编辑(或创建)您的Claude Desktop配置文件:
~/Library/Application Support/Claude/claude_desktop_config.json(MacOS/Linux)
添加您的服务器配置:
{
"mcpServers": {
"mobile-action-mcp": {
"command": "uv",
"args": [
"--directory",
"/ABSOLUTE/PATH/TO/PARENT/FOLDER/mobile-action-mcp",
"run",
"mamcp/appinfo.py"
]
}
}
}- 替换
/ABSOLUTE/PATH/TO/PARENT/FOLDER/mobile-action-mcp包含项目目录的完整路径。 - 您可能需要使用到的完整路径
uv可执行文件(参见which uv).
保存配置后重新启动Claude for Desktop。
5.日志记录
- 不要使用
print()用于日志记录 (它将破坏基于STDIO的MCP服务器)。 - 使用
logging用于记录到stderr或文件的模块。
______________________________________________________________________
工具说明和示例提示
下面是所有可用的工具、它们的描述以及您可以与Claude或任何MCP客户端一起使用的示例提示。
______________________________________________________________________
1.get_track_id
说明: 获取给定应用程序名称的App Store trackId。 提示示例:
What is the App Store track id for Instagram in the US?
Call: get_track_id(app_name="Instagram", country_code="US")2.获取关键字_银行
说明: 获取给定关键字的单日关键字排名,并在AppStore中跟踪应用程序的id。 提示示例:
Show me the keyword ranking for Instagram (track id 389801252) in the US for keywords "photo, social" on 2024-07-01.
Call: get_keyword_ranking(track_id=389801252, country_code="US", keywords="photo,social", date="2024-07-01")3.获取关键字历史
说明: 获取给定关键字的历史关键字排名,并在AppStore中跟踪应用程序的id(最多30天)。 提示示例:
Show me the keyword ranking history for Instagram (track id 389801252) in the US for the keyword "insta" from 2024-07-01 to 2024-07-15.
Call: get_keyword_history(track_id=389801252, country_code="US", keyword="insta", start_date="2024-07-01", end_date="2024-07-15")4.获取关键字
说明: 在AppStore中获取应用程序给定曲目id的单日热门关键字。 提示示例:
What were the top 15 keywords for Instagram (track id 389801252) in the US on 2024-07-01 for IPHONE?
Call: get_top_keywords(track_id=389801252, country_code="US", date="2024-07-01", device="IPHONE")5.获取关键字元数据
说明: 获取AppStore中给定关键字的最后一天关键字元数据。 提示示例:
Show me the metadata for the keyword "insta" in the US.
Call: get_keyword_metadata(country_code="US", keyword="insta")6.获取关键字应用程序
说明: 获取AppStore中给定关键字的应用程序列表。 提示示例:
Which apps are ranking for the keyword "insta" in the US?
Call: get_keyword_apps(country_code="US", keyword="insta")7.获取有机关键词
说明: 在AppStore中获取给定应用程序的自然关键字及其排名。 提示示例:
List the organic keywords for Instagram (track id 389801252) in the US for IPHONE on 2024-07-01.
Call: get_organic_keywords(track_id=389801252, country_code="US", device="IPHONE", date="2024-07-01")8.获取_组织_印象_分享
说明: 获得App Store关键字的自然印象份额。 提示示例:
What is the organic impression share for the keyword "insta" in the US for IPHONE?
Call: get_organic_impression_share(keyword="insta", country_code="US", device="IPHONE")9.获取_共享_类别
说明: 获取应用元数据中使用的搜索关键字的顶级类别。 提示示例:
Show me the top categories for the keyword "insta" in the US for IPHONE.
Call: get_share_of_category(keyword="insta", country_code="US", device="IPHONE")10.获取顶部图表
说明: 获取给定类别、国家、排名类型和设备的排行榜信息。 提示示例:
Show me the top FREE charts for category 6000 in the US for IPHONE on 2024-07-01 (API v2).
Call: get_top_charts(version="v2", category_id=6000, country_code="US", ranking_type="FREE", target_device="IPHONE", date="2024-07-01")11.分类银行
说明: 在AppStore中获取应用程序的类别排名历史记录(最多30天)。 提示示例:
Show me the category ranking history for Instagram (track id 389801252) in the US for category 6000, daily average, from 2024-07-01 to 2024-07-15 (API v2).
Call: get_category_ranking(version="v2", track_id=389801252, country_code="US", hourly="false", start_date="2024-07-01", end_date="2024-07-15")12.获取_全球_最新_类别_排名
说明: 提供app Store中应用程序最后一天的全球类别排名。 提示示例:
Get the global last day category rankings for Instagram (track id 389801252) on IPHONE.
Call: get_global_last_day_category_rankings(track_id=389801252, device="IPHONE")13.获取新应用程序
说明: 为特定国家和类别的新发布应用程序提供应用程序信息。 提示示例:
Show me new FREE apps in category 6000 for the US on 2024-07-01.
Call: get_new_apps(category_id=6000, country_code="US", ranking_type="FREE", date="2024-07-01")14.获取app_detail
说明: 提供AppStore中应用程序的详细信息。 提示示例:
Get detailed info for Instagram (track id 389801252) in the US.
Call: get_app_detail(track_id=389801252, country_code="US")15.获取app_simple_info
说明: 为AppStore中的给定应用程序提供简化信息。 提示示例:
Get simple info for Facebook and Instagram in the US.
Call: get_app_simple_info(country_code="US", track_ids="284882215,389801252")16.获取版本
说明: 提供AppStore中应用程序的版本列表(应用程序更新时间线)。 提示示例:
Show me the version history for Instagram (track id 389801252) in the US from 2024-01-01 to 2024-07-01.
Call: get_app_versions(track_id=389801252, country_code="US", start_date="2024-01-01", end_date="2024-07-01")17.获取版本详情
说明: 提供带有AppStore中应用程序更改值的版本列表(应用程序更新时间线)。 提示示例:
Show me detailed version changes for Instagram (track id 389801252) in the US from 2024-01-01 to 2024-07-01.
Call: get_app_versions_detailed(track_id=389801252, country_code="US", start_date="2024-01-01", end_date="2024-07-01")18.get_developler_apps
说明: 提供给定国家/地区给定开发人员拥有的应用程序列表。 提示示例:
List all apps by developer 447553567 in the US.
Call: get_developer_apps(developer_id=447553567, country_code="US")19.发现\_ app
说明: 排队查找给定的App Store应用程序。 提示示例:
Queue Instagram (track id 389801252) for discovery.
Call: discover_app(track_id=389801252)20.获取app_reviews
说明: 提供AppStore中应用程序的评论列表。 提示示例:
Get reviews for Instagram (track id 389801252) from 2024-01-01 to 2024-07-01 in the US with rating 5.
Call: get_app_reviews(track_id=389801252, start_date="2024-01-01", end_date="2024-07-01", rating="5", countries="US")21.获取app_review_analysis
说明: 为给定应用程序的评论提供基于单词的分析。 提示示例:
Analyze review keywords for Instagram (track id 389801252) from 2024-01-01 to 2024-07-01 in the US.
Call: get_app_review_analysis(track_id=389801252, start_date="2024-01-01", end_date="2024-07-01", countries="US")22.get_download_revenue_estimations
说明: 提供AppStore中应用程序的下载收入估算。 提示示例:
Estimate downloads and revenue for Instagram (track id 389801252) in the US on IPHONE from 2024-01-01 to 2024-01-31.
Call: get_download_revenue_estimations(track_id=389801252, country_code="US", start_date="2024-01-01", end_date="2024-01-31", device="IPHONE")23.获取_每月_全球_下载_分发
说明: 提供app Store中应用程序上个月的全球下载收入估算。 提示示例:
Get last month's global download and revenue for Instagram (track id 389801252).
Call: get_monthly_global_download_revenue(track_id=389801252)24.get_dau_估计
说明: 提供日期之间给定应用程序和国家的每日活跃用户(DAU)估计值。 提示示例:
Get DAU estimations for Instagram (track id 389801252) in the US from 2024-01-01 to 2024-01-07.
Call: get_dau_estimations(track_id=389801252, country_code="US", start_date="2024-01-01", end_date="2024-01-07")25.获取最大估计值
说明: 提供日期之间给定应用程序和国家的月度活跃用户(MAU)估计值。 提示示例:
Get MAU estimations for Instagram (track id 389801252) in the US from 2024-01-01 to 2024-01-31.
Call: get_mau_estimations(track_id=389801252, country_code="US", start_date="2024-01-01", end_date="2024-01-31")26.get_featured_app
说明: 检索有关应用程序如何在App Store的特定类别中显示的详细信息。 提示示例:
Show me how Instagram (track id 389801252) is featured in category 6014 in the US for 2024-07-01.
Call: get_featured_app(track_id=389801252, category_id=6014, country_code="US", start_date="2024-07-01")27.特征分析
说明: 分析应用程序在不同App Store类别中的功能。 提示示例:
Analyze featuring for Instagram (track id 389801252) in the US from 2024-01-01 to 2024-07-01.
Call: get_featuring_analysis(track_id=389801252, country_code="US", start_date="2024-01-01", end_date="2024-07-01")______________________________________________________________________
有关每个工具的更多详细信息,请参阅 appinfo.py.
