hx-multianim-mcp

hx-multianim-mcp

Connects MCP clients to a running hx-multianim game via DevBridge for scene inspection, state manipulation, input injection, and diagnostics.

Category
访问服务器

README

hx-multianim-mcp

An MCP server that connects Claude (or any MCP client) to a running hx-multianim application via its DevBridge.

Call connect first. All other tools return a not_connected error until connect succeeds. The DevBridge port is printed to game stdout as [DevBridge] Listening on port N (default 9001).

Tools

Connection & health

Tool Description
connect Connect to a game instance on a specific port/host. Must be called first.
ping Lightweight health check — uptime and port
performance FPS, draw calls, triangle count, object count, scene dimensions

Scene inspection

Tool Description
list_screens Registered screens with active/failed status
list_builders Loaded .manim builders and their parameter definitions
scene_graph Recursive scene tree dump (depth)
inspect_element Position, size, visibility, text of a named element
inspect_programmable Deep inspection of a live programmable (params, slots, refs, elements)
find_element_at Hit-test scene coords, front-to-back list of objects
get_screen_state Screen manager state: mode, transitions, pause, counts
get_tween_state All active tweens with target, duration, progress
list_interactives Interactive hit-test regions with IDs and bounds
list_slots Swappable container slots of a programmable
list_active_programmables Live incremental-mode programmables with current state
list_resources Loaded sprites, fonts, .manim, .anim files
list_fonts Registered font names
list_atlases Loaded sprite atlases and tile/sprite names
coordinate_transform Convert between scene and element-local coordinates
check_overlaps Detect overlapping interactives/visuals to find layout bugs

Screenshots

Tool Description
screenshot Capture current frame as PNG (optional width/height scale-down)

State manipulation

Tool Description
set_parameter Modify a programmable parameter at runtime (incremental mode)
get_parameters Current parameter values and definitions for a programmable
set_visibility Toggle element visibility
reload Hot-reload .manim files (specific file or all changed)
eval_manim Parse and validate .manim snippets

Game control

Tool Description
pause Pause/resume the game loop
step Advance N frames while paused (max 100)
wait_for_idle Check if no tweens/transitions are active
quit Cleanly shut down the game

Input injection

Tool Description
send_event Inject a single mouse/keyboard/wheel event
send_events Sequence of events with frame steps (drag, scrub, multi-step gestures)
click_button Click an interactive by ID, bypassing hit testing

Diagnostics

Tool Description
get_traces Recent trace() output (ring buffer)
get_errors Accumulated runtime errors/exceptions
get_debugger_hits Poll DevBridge.debugger(data, pause?) breakpoint hits (cursor-based)

Breakpoints from game code

Call DevBridge.debugger(data, pause) anywhere in your game code to capture a data snapshot (with auto-captured file/line/method):

screenManager.devBridge.debugger({hp: unit.hp, target: unit.target?.name});     // pauses by default
screenManager.devBridge.debugger({fps: hxd.Timer.fps()}, false);                 // push-only, no pause

Hits are delivered two ways:

  • Push — real-time debugger SSE events surfaced as warning-level MCP log notifications.
  • Pollget_debugger_hits tool with since_id cursor (in case the agent missed the push).

If pause=true, resume with pause({paused:false}).

Usage

Claude Code

// .mcp.json
{
  "mcpServers": {
    "hx-multianim": {
      "command": "npx",
      "args": ["-y", "@bh213/hx-multianim-mcp"]
    }
  }
}

Environment variables

Variable Default Description
HX_DEV_PORT 9001 DevBridge port
HX_DEV_HOST localhost DevBridge host

License

BSD-3-Clause

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选