ice-puzzle-mcp
An MCP server for building, validating, and publishing Ice Puzzle levels with AI assistants, featuring integrated solver feedback and quality checks. It provides over 60 tools for level design, difficulty analysis, and benchmarking AI performance on design tasks.
README
ice-puzzle-mcp
MCP (Model Context Protocol) server for building, validating, and publishing Ice Puzzle levels with AI assistants.
Why Use This
- Build puzzle levels quickly with solver-backed feedback after each edit.
- Keep design fun: sketch an idea, ask the AI to iterate, and immediately test solvability and quality gates.
- Compare AI (Codex vs Claude Code) models on the same level-design task with objective outputs (
solve_level,analyze_difficulty,validate_quality_gate,check_publish_readiness). - Publish with confidence using preview + readiness checks instead of one-shot blind publishing.
Quick Start (Codex / Claude)
1) Install
npm install -g ice-puzzle-mcp
Or run without global install:
npx -y ice-puzzle-mcp setup
2) Get an API key (required for remote drafts, preview, publish)
- Open https://ice-puzzle-game.web.app/settings.
- Open
Settings > Developer. - Sign in with Google.
- Click generate API key.
- Copy the key (
ipk_...) and keep it private.
3) Run setup
ice-puzzle-mcp setup
If you did not install globally, use:
npx -y ice-puzzle-mcp setup
Setup will:
- Validate your API key by exchanging it once.
- Save config to
~/.ice-puzzle-mcp/config.jsonwith0600permissions. - Register MCP in Codex and Claude when available.
- Auto-discover Codex CLI from PATH and standard app locations (including
/Applications/Codex.app/Contents/Resources/codex).
4) Verify registration
codex mcp list --json
You should see an ice-puzzle-mcp entry. Restart your AI client after setup.
What It Does
- Exposes 63 tools for level editing, solve diagnostics, design assistance, layout seeding, quality gates, campaign examples, local snapshots, preview staging, and Firebase publishing.
- Mirrors gameplay mechanics from the
ice_puzzleapp solver/runtime. - Enforces canonical publish checks:
par == shortest, timeout death atmoves >= par, warp-stop semantics, and hot coals shortcut diagnostics. - Adds design-assist workflow helpers: dry-run placement tests, reachability maps, stop-point suggestions, layout seeding, undo/redo, and revert-to-last-solvable recovery.
- Supports offline-first design (all local tools work without auth).
Install
npm install ice-puzzle-mcp
Run
npx ice-puzzle-mcp serve
Optional Auth Setup (for remote drafts + publishing)
- Open https://ice-puzzle-game.web.app/settings.
- Sign in with Google.
- Go to
Settings > Developerand generate an API key. - Run setup and paste your key when prompted:
npx ice-puzzle-mcp setup
By default, setup uses the correct exchange URL automatically and does not prompt for it. Only use advanced mode if you need to override it:
npx ice-puzzle-mcp setup --advanced
Setup stores config at ~/.ice-puzzle-mcp/config.json with mode 0600, registers ice-puzzle-mcp in Codex via codex mcp add when Codex is installed (including app-bundle fallback discovery at /Applications/Codex.app/Contents/Resources/codex), and updates your Claude MCP config (~/.claude/.mcp.json or ~/.claude/mcp.json) using a unique server key (ice-puzzle-mcp, ice-puzzle-mcp-2, ... if needed).
Firebase client config is no longer hardcoded in the package. By default, it is loaded from
https://<project-id>.web.app/__/firebase/init.json (project ID from config/env, default ice-puzzle-game),
or you can provide explicit ICE_PUZZLE_FIREBASE_* environment variables / firebase overrides in config.
AI Model Comparison Workflow
Use this project as a repeatable level-design benchmark between models.
- Give each model the same prompt and constraints.
- Require title provenance in every generated level name:
- Prefix with
[Claude]for Claude-generated levels. - Prefix with
[Codex]for Codex-generated levels. - Example:
[Codex] L14 - Warp Plate Gauntlet.
- Require the same build loop: edit one mechanic at a time and run
solve_levelafter each change. - Collect objective outputs:
solve_level(solvable, shortest path, moves)analyze_difficulty(difficulty signals, direction balance)validate_quality_gate(pass/fail checks)check_publish_readiness(publish blockers)
- Compare results on:
- Correctness (solvable, no shortcuts, par integrity)
- Design quality (path structure, mechanic integration, anti-shortcut robustness)
- Efficiency (how many edits/iterations needed to pass all checks)
- Optionally publish or preview top candidates and run playthrough feedback.
This makes AI-vs-AI comparisons concrete instead of subjective.
Tool Categories
Level Management (10)
create_levelget_levelsave_local_draftload_local_draftlist_draftsdelete_draftimport_levelexport_levelrename_levelclear_level
History + Recovery (3)
undoredorevert_to_last_solvable
Tile + Region Operations (6)
place_tileremove_tilemove_tileplace_tiles_batchfill_regionclear_region
Grid + Positions (5)
set_grid_sizeset_startset_goalset_parset_par_to_shortest
Special Elements (10)
add_warp_pairremove_warpadd_thin_iceremove_thin_iceadd_pushable_rockremove_pushable_rockset_pressure_plateremove_pressure_plateset_barrierremove_barrier
Solver + Validation (10)
solve_leveltest_placementreachable_fromsuggest_stop_pointssimulate_movesimulate_playthroughanalyze_difficultyvalidate_quality_gatecheck_publish_readinessvisualize_level
Layout Seeding (2)
seed_layout_patternsuggest_skeleton_layout
Rules + Docs (4)
get_game_rulesget_tile_typesget_level_requirementsinteraction_faq
Campaign Examples (2)
list_campaign_examplesget_campaign_example
Firebase / Publishing (11)
save_draftload_draftlist_remote_draftsdelete_remote_draftlist_my_published_levelsget_my_published_levelunpublish_levelrestore_published_levelpublish_levelpreview_levelauth_status
Canonical Rules Enforced
- Non-tutorial levels may have tied optimal paths, but shortest optimal length must equal
par. - Any path shorter than
paris a hard failure. - Timeout death is strict: if moves
>= parand goal not reached, run fails (WASTED). - Warp behavior: stepping on warp teleports to pair and ends movement.
- Hot Coals/hot tile behavior:
-5 HPon landing and-5 HP/secwhile standing. - Thin ice behavior: crossing marks tile broken; entering broken thin ice is fatal.
- Draft payload parity: thin ice and pushables must use dedicated fields (
thinIceTiles,pushableRocks).
Local + Remote Drafts
- Local snapshots are in-memory (this MCP process).
- Remote drafts/publishing use Firebase (
draftLevels,communityLevels,notifications). - Use
preview_levelfor staging links andcheck_publish_readinessbeforepublish_level. - Published level lifecycle tools are available via
list_my_published_levels,get_my_published_level,unpublish_level, andrestore_published_level.
Development
npm install
npm run build
npm test
License
MIT
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。