starrail-gacha
Click on "Install 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., "@starrail-gacha角色池现在垫了多少、最近五星是谁"
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.
星穹铁道抽卡记录 MCP
用 Python + FastMCP 读取《崩坏:星穹铁道》账号跃迁(抽卡)记录,供 Cursor Agent 同步、查询与统计。
它做什么
保存抽卡 API 链接(含临时
authkey),或从本机游戏webCaches自动提取调用官方
getGachaLog分页拉取记录到本地data/在 Cursor 里用 tools 查记录、看垫数 / 五星
不会索要账号密码;authkey 大约 24 小时过期,过期后需重新进游戏打开跃迁记录。
Related MCP server: Claude Viewer
环境准备
cd E:\code\mcpTraining
py -3.10 -m venv .venv
.\.venv\Scripts\Activate.ps1
pip install -e . -i https://pypi.tuna.tsinghua.edu.cn/simple --trusted-host pypi.tuna.tsinghua.edu.cn在 Cursor 中接入
见 docs/cursor-setup.md。
如何获取抽卡链接见 docs/get-gacha-url.md。
推荐 MCP 配置:
{
"mcpServers": {
"starrail-gacha": {
"command": "E:/code/mcpTraining/.venv/Scripts/python.exe",
"args": ["-m", "starrail_gacha_mcp.server"]
}
}
}典型用法(对 Agent 说)
「用游戏缓存检测崩铁抽卡链接」→
detect_gacha_url_from_game_cache「同步抽卡记录」→
sync_gacha_logs「角色池现在垫了多少、最近五星是谁」→
gacha_stats/list_gacha_logs
本地网页看板
同步记录后,可启动本地网页查看统计(分池垫数、品阶分布、五星历程):
.\.venv\Scripts\Activate.ps1
starrail-gacha-web
# 或: python -m starrail_gacha_mcp.webapp浏览器会打开 http://127.0.0.1:8765/。加 --no-open 可只启动服务;--port 9000 可改端口。
在 Cursor 里也可直接让 Agent 调用 open_gacha_dashboard(会自动开浏览器)。
边改边看(开发模式)
调 web/ 排版时用开发模式:保存文件后浏览器自动刷新。
starrail-gacha-web --dev
# 或让 Agent: open_gacha_dashboard(dev=True)停止后台看板:starrail-gacha-web --stop 或 MCP stop_gacha_dashboard。
项目结构
src/starrail_gacha_mcp/
server.py # MCP 入口与 tools
webapp.py # 本地网页服务
auth.py # URL 解析 / 游戏缓存扫描
client.py # 官方 API 分页
store.py # 本地 JSON
stats.py # 统计与垫数
web/ # 看板静态页(HTML/CSS/JS)
data/ # auth.json、gacha_logs.json(已 gitignore)卡池类型
ID | 名称 |
1 | 常驻跃迁 |
2 | 新手跃迁 |
11 | 角色活动跃迁 |
12 | 光锥活动跃迁 |
说明
官方接口通常只保留约近半年记录,不是无限全历史。
Windows 下自动检测最省事;其它系统可用
set_gacha_url粘贴链接。本项目仅供学习与个人查询,请遵守游戏与平台服务条款。
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
No tool schema history has been recorded yet.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Privacy-first web analytics. Query pageviews, referrers, trends, and AI insights.
Personal finance tracker — log transactions, view summaries, and browse a dashboard
Analytics for MCP servers. Query your tool calls, first-call success, retries and schema cost.
1Track, curate, and analyze data about your health, habits, and goals.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables tracking and analyzing development time through the Wakapi API. Provides tools to retrieve coding statistics, project details, leaderboards, and recent activity logs for productivity insights.81Apache 2.0
- AlicenseNot gradedqualityDmaintenanceEnables querying and analyzing Claude Desktop/Code conversation history across all users on a machine, including conversation search, token usage statistics, model/tool insights, and opening a web dashboard for detailed visualization.4MIT
- AlicenseBqualityBmaintenanceMCP server that provides local caching, sync, and tools for Zepp Life health data including steps, sleep, heart rate, workouts, and body measurements, supporting both file exports and cloud session access.1010MIT
- AlicenseAqualityCmaintenanceEnables searching and analyzing GitHub Copilot's conversation history stored locally, providing tools for full-text search, session listing, statistics, and file-based retrieval.64MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/cf21683/starrail-gacha-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server