Guide · MCP · v9.0.0
MCP Setup Guide & 102-Tool Reference
Connect AI Art Engine to Claude Code, Cursor, Codex, Windsurf, and other AI agents: the desktop app runs a local Streamable HTTP
MCP server on 127.0.0.1:43110 (93 tools on /mcp + 9 live Blender bridge tools on /mcp/blender = 102 tools total) plus a zero-dependency npx -y ai-art-engine-mcp stdio bridge. External agents can orchestrate typed DAG node graphs, search & install Skill Marketplace workflows, run 4-axis video forensics and multi-track NLE edits, and ship Game UI / Machinations economy simulations / playable HTML5 games — 100% local with zero cloud account lock-in. Meanwhile, the built-in ◈ AI Chat panel (powered by the v9.0 in-process Pi Agent runtime) invokes this exact tool surface directly in-process with zero HTTP loopback overhead and dynamically mounts toolsets via load_toolset to eliminate the 128-tool limit.
1. What is MCP
MCP (Model Context Protocol) is the standard protocol for AI agents to invoke external tools. Once connected, your coding agent gains the full AI Art Engine industrial asset toolset and drives the desktop app through conversation:
Claude Code / Cursor / Codex / Windsurf ──stdio(MCP)──▶ npx ai-art-engine-mcp (or mcp-bridge.mjs) ──HTTP──▶ AI Art Engine (127.0.0.1:43110)
Built-in ◈ AI Chat (in-process Pi Agent) ──────────────Direct in-process calls (zero HTTP overhead + load_toolset)─────────────▶ 102 Studio Tools
- On startup the app launches a Bearer-token-protected Streamable HTTP server on
127.0.0.1:43110(auto-advancing if busy) and writes connection info to%APPDATA%/aiartengine/mcp.json(macOS / Linux paths below). The file persists across restarts and the token stays stable — configure clients once, or manage the token under Settings → MCP. - The zero-dependency bridge
npx -y ai-art-engine-mcp(or the bundledresources/mcp-bridge.mjs/ in-reposcripts/mcp-bridge.mjs) is spawned by your external agent client to translate stdio frames and forward HTTP calls automatically. - Traffic never leaves the loopback interface; every endpoint except the health check requires the Bearer token, and request-level Craft (Agent) / Plan / Ask mode scoping is enforced via
X-MCP-Mode/X-AIArt-Mode.
npx -y ai-art-engine-mcp or mcp-bridge.mjs) requires Node.js 18+ (HTTP direct needs no Node.js); running generation nodes on canvas requires the corresponding modality provider to be enabled under Settings → Models.
2. Connect Claude Code in 3 steps (choose one of two)
Option A: stdio bridge (recommended · one-line zero-path npx)
- Start the AI Art Engine desktop app.
-
Register the MCP server (run the zero-dependency npm bridge, or point to your bundled
resources/mcp-bridge.mjs/ reposcripts/mcp-bridge.mjs):
or write it into your MCP config file manually (works in Cursor, Codex, Windsurf, Trae, …):# Option A1: Zero-path npx bridge (recommended) claude mcp add aiartengine -- npx -y ai-art-engine-mcp # Option A2: Local script bridge (offline / repo checkout) claude mcp add aiartengine -- node C:/path/to/ai-art-engine/scripts/mcp-bridge.mjs{ "mcpServers": { "aiartengine": { "command": "npx", "args": ["-y", "ai-art-engine-mcp"] } } } - Restart your external agent session and all 102 tools are live.
Option B: HTTP direct (no Node.js required)
Clients that support Streamable HTTP can skip the bridge. Read the persistent token from mcp.json:
claude mcp add --transport http aiartengine http://127.0.0.1:43110/mcp --header "Authorization: Bearer <token>"
Config template (.mcp.json)
.mcp.json is optional and must be created manually — create a file named .mcp.json with the template below in the root of the project where you run Claude Code. Commit it so teammates get the integration on clone.
claude mcp add aiartengine -- npx -y ai-art-engine-mcp and
Claude Code writes the config into ~/.claude.json automatically. Pick either option — no need to do both.
stdio bridge variant (path-free npx recommended for shared repos; or use node + scripts/mcp-bridge.mjs):
{
"mcpServers": {
"aiartengine": {
"command": "npx",
"args": ["-y", "ai-art-engine-mcp"]
}
}
}
HTTP direct variant (no Node.js required — token from the app-side mcp.json):
{
"mcpServers": {
"aiartengine": {
"type": "http",
"url": "http://127.0.0.1:43110/mcp",
"headers": {
"Authorization": "Bearer <token from the app-side mcp.json>"
}
}
}
}
%APPDATA%/aiartengine/mcp.json, structured
{ "port": 43110, "token": "…", "pid": …, "version": "…" }) is managed automatically by the app — do not edit it by hand. Delete the file and restart the app if you ever want to rotate the token.
3. Full 102-Tool Reference (93 on /mcp + 9 on /mcp/blender)
studio_core: 12 MCP tools + 12 native coding/file/shell tools ≈ 24 initial tools) plus 6 on-demand domain toolsets (project_assets, video_timeline_audio, director_3d_blender, game_production, tutorial_recording, skills_web_vision) loaded dynamically via load_toolset; meanwhile external MCP clients connecting to /mcp and /mcp/blender access the full catalog directly:
① Typed DAG Graph Orchestration: inspect available node schemas via
graph_node_types → wire nodes, deep dot-path params, and presets via graph_edit → execute and poll via task_run / task_status;
② Skill Marketplace Workflows: discover domain bundles via
skill_search → install atomically via skill_install → materialize onto a host asset via workflow_use_installed.
| Domain Group (Count) | Exact Live Tools | Capabilities |
|---|---|---|
| 1. System, Multi-Project Workspace, Git & Schedules (14) Endpoint: /mcp |
app_status · models_list · storage_status ·
project_list · project_open · project_create ·
project_memory_read · project_memory_write · project_memory_append ·
project_git_status · project_git_diff ·
schedule_list · schedule_delete · ask_user
|
Inspect app version, enabled model catalog, and object-storage health; list/open/create projects and read/write persistent project memory; inspect project Git status & diffs; manage 24h scheduled automations; prompt the user for structured confirmation (ask_user). |
| 2. Asset Library, Packages, Voice Profiles, QC & Spine/SVG (21) Endpoint: /mcp |
asset_list · asset_read_file · asset_write_text ·
asset_create · asset_import · asset_rename ·
asset_move · asset_delete ·
folder_list · folder_create · folder_move ·
asset_package_export · asset_package_import · storage_upload ·
voice_profile_list · voice_profile_upsert · voice_profile_delete ·
asset_qc · asset_qc_fix · stage2d_spine_export · render_svg
|
Full CRUD over project assets and folders, batch local file import, .aipackage bundle export/import, and cloud storage upload; persistent cross-episode TTS voice profiles; engine-readiness alpha/fringe/debris QC & edge decontamination rework; Spine 2D skeleton export (skeleton.json + .atlas) and SVG rasterization. |
| 3. DAG Node Graph, 3D Director, Task Execution & Skill Marketplace (18) Endpoint: /mcp |
graph_node_types · graph_read · graph_edit · graph_icon_refine ·
director_stage_read · director_stage_edit ·
task_run · task_status · video_job_list · video_job_get ·
list_model3d_animations · decide ·
skill_list · skill_search · skill_inspect_github ·
skill_install · skill_uninstall · workflow_use_installed
|
Inspect addable node types/ports/schemas, batch-edit host graphs, refine single icons in an icon pack, and drive the 56-bone 3D Director Stage; run graphs & poll async tasks/video jobs; query 3D animations; run typed OpenRouter probability decisions (noul / choice / score); search, preflight-inspect GitHub repos, install/uninstall skills, and materialize installed marketplace workflows. |
| 4. Local Vision, Audio, Video Forensics & Timeline NLE (15) Endpoint: /mcp |
vision_local_ocr · vision_local_yolo ·
transcribe_audio · audio_separate ·
extract_video_frames · grab_video_frames · detect_video_keyframes ·
analyze_video_beats · semantic_analyze_video · semantic_timeline_read ·
timeline_read · timeline_rough_cut · timeline_export ·
timeline_edit · timeline_preview
|
Cross-platform offline OCR and local ONNX YOLO detection; WhisperX-grade transcription and Demucs stem separation; frame extraction, scene-cut detection, Librosa beat analysis, and 4-axis semantic video forensics; multi-track NLE timeline read/edit, silence-ripple rough cut, filter-accurate frame preview, and MP4 export. |
| 5. Web Extraction & Screen-Recorded Tutorials (10) Endpoint: /mcp |
web_extract_article · web_fetch_video ·
screen_record_start · screen_record_step · screen_record_wait ·
screen_record_stop · screen_record_status ·
ui_bounds · ui_click · tutorial_compose
|
Extract clean article Markdown and fetch reference videos; locate live UI DOM bounds and click controls (ui_bounds / ui_click), record step-annotated screen sessions, and auto-dub + burn subtitles into finished video tutorials via tutorial_compose. |
| 6. Game Production, Playable HTML5 & Machinations Studio (15) Endpoint: /mcp |
gameplay_prepare_project · gameplay_build · gameplay_job_status ·
game_tile_pbr_process · game_audio_variants · game_bundle_export ·
game_data_table_generate · game_level_map_generate ·
game_shader_particle_generate · game_systems_graph_generate ·
game_one_sentence_create · game_ui_suite_create · game_playable_preview_compile ·
machinations_building_blocks · machinations_studio
|
Procedural 2D/3D Node+esbuild playable HTML5 scaffolding, single-file build & headless Chromium smoke gate; seamless PBR tiles, SFX variants, data tables, level maps, shaders/particles, one-sentence game asset packs, full Game UI suites (exporting native TySh PSD / Unity / Godot), and playable preview compilation; Machinations v2 59-block catalog, Monte Carlo/sensitivity simulation, Goal-Seek curve solving, and C#/GDScript export. |
| 7. Blender Live Bridge (9) Endpoint: /mcp/blender |
get_scene_info · get_world_state_snapshot · get_object_info ·
get_viewport_screenshot · execute_blender_code · export_scene ·
describe_node_type · bpy_api_lookup · get_addon_status
|
Outbound socket bridge to a running local Blender (localhost:9876): inspect scene/mesh bounding-box snapshots, query live RNA & shader nodes, execute full bpy Python scripts, capture multimodal viewport screenshots, and export GLB/FBX/USD straight into asset_import (see §7). |
4. Example conversations
Once connected, give natural-language instructions — the agent perceives your active workspace and chains the live tools:
- "List my recent projects, open the first one, and read its project memory" →
project_list+project_open+project_memory_read - "Search the Skill Marketplace for the short-drama workflow, install it, and instantiate a new episode graph" →
skill_search+skill_install+workflow_use_installed - "Add an image generation node wired into the 10-in-1 image processor on this canvas and render a 9:16 poster" →
graph_node_types+graph_edit(node_upsert+edge_connect) +task_run+task_status - "Hide Lin Xiaoman, move her 2m left, rotate 45°, and set her pose to sitting" →
director_stage_edit(works in both standalone.dstageandstage.3dDive) - "Run 4-axis video forensics on this reference clip and read the shot breakdown and transcript cuts" →
semantic_analyze_video+semantic_timeline_read - "Icon #3 in the pack looks blurry — redraw just that cell and re-pack the atlas" →
graph_icon_refine(cellKey+hint; writes back and re-runs packing) - "Build a gacha economy loop, run 200 Monte Carlo trials to check Day-30 gold inflation, and export Unity C#" →
machinations_building_blocks+machinations_studio - "Create a dark-fantasy inventory + shop + combat HUD Game UI suite workflow" →
game_ui_suite_create+task_run - "Build a low-poly 3D space-station energy collector game with WASD movement" →
gameplay_prepare_project(3d) → writesrc/assets/**&src/game/**→gameplay_build+gameplay_job_status(auto-verified by the headless Chromium smoke gate)
5. Configuration & environment
The bridge reads %APPDATA%/aiartengine/mcp.json by default (macOS:
~/Library/Application Support/aiartengine/; Linux:
~/.config/aiartengine/). To override:
| Environment variable | Purpose |
|---|---|
AIAE_MCP_CONFIG |
Absolute path to mcp.json |
AIAE_MCP_PORT + AIAE_MCP_TOKEN |
Connect directly with a given port and token (overrides the file) |
The app tries ports 43110–43119 in order and skips occupied ones; the actual
port is whatever mcp.json contains.
5.1 stdio bridge settings
Settings → MCP tool server → stdio bridge tab visualizes the
bridge config — no env vars to hand-edit. You can set: the bridge command
(default is still node + the in-repo scripts/mcp-bridge.mjs or the
installer's bundled <install dir>/resources/mcp-bridge.mjs), the
bridge port (default HTTP port the bridge listens on), the
BLENDER_HOST / BLENDER_PORT passthrough for the Blender addon.
Changes persist immediately; external agents just reconnect — no app
restart needed.
scripts/mcp-bridge.mjs (installers bundle one at
<install dir>/resources/mcp-bridge.mjs), while online setups can use zero-dependency
npx -y ai-art-engine-mcp with no path setup. You can also attach any third-party external
stdio or HTTP MCP server in Skill Marketplace / Settings (see
§5.2 External MCP & Lazy Toolset Engine).
5.2 External MCP Servers & On-Demand Lazy Toolset Engine (In-App Pi Agent 9.0)
Beyond exposing AI Art Engine to external coding agents, the built-in ◈ AI Chat panel (powered by the
in-process Pi Agent runtime in src/main/agent/, built on
@earendil-works/pi-agent-core & @earendil-works/pi-ai) invokes all 102 built-in tools directly in-process with zero HTTP loopback overhead — and also connects to any third-party stdio or HTTP MCP server you attach.
Attaching 100+ built-in tools alongside multiple external MCP servers normally triggers the hard
OpenAI / DeepSeek tools > 128 API limit error and bloats prompt latency. AI Art Engine v9.0.0 permanently eliminates this bottleneck with its On-Demand Lazy MCP Toolset Engine (load_toolset):
-
Lean initial footprint (~24 tools): every session starts with
12native Pi Agent tools (file read/write/edit, cross-platform bash,skill,load_toolset, etc.) +12corestudio_coreMCP tools. -
6 Studio/Blender domain toolsets + external MCP servers: domain tools are grouped into
project_assets,video_timeline_audio,director_3d_blender,game_production,tutorial_recording, andskills_web_vision, while external MCP servers mount asext:<serverId>(keyword-scored top 32 tools when a server exposes an oversized catalog). -
Zero-turn intent pre-warming + LRU eviction (
MAX_ACTIVE_TOOLS = 96 < 128): before each turn, matching domain toolsets pre-warm automatically from prompt intent, and the model can callload_toolsetanytime mid-task. Active tools stay strictly capped at96 < 128via LRU eviction while keeping mid-turn tool arrays stable (supportsMidConvoToolAdditions: false) — eliminating 128-tool errors while preserving LLM prompt prefix cache hit rates. -
Unified audit & mode governance: external MCP calls share
<userData>/logs/mcp-audit.jsonl, never gain automatic write access to/mcp, and obey the exact sameCraft / Plan / Askgating below.
6. Dual-Layer Mode Governance (Craft / Plan / Ask), Live Sandbox & Safety Rails
-
Dual-layer mode scoping (
agent.state.tools+beforeToolCall+src/shared/mcpModeAccess.ts): enforced both in-process inside Pi Agent and per HTTP request viaX-MCP-Mode/X-AIArt-Modeheaders (dynamically filteringtools/listand hard-rejecting unauthorizedtools/callinvocations):- Craft (Agent) mode: full read + write + generate tool surface (external CLI clients such as Claude Code / Cursor / Codex / Windsurf without mode headers default to full Craft access).
- Plan mode: exposes only read-only inspection tools (
app_status,graph_read,graph_node_types,asset_qc,skill_search,vision_local_ocr, etc.) plus interactiveask_userconfirmation cards until the user approves the step-by-step plan — after approval, write and generate tools unlock. - Ask mode: returns an empty
tools/liston HTTP MCP and blocks all mutating/execution calls for strictly read-only Q&A.
-
Live sandbox switching & fail-closed permission cards (in-app Pi Agent): switch live mid-turn between
🛡️ Restricted Mode(workspace-write) and🔓 Full Access(danger-full-access); out-of-sandbox actions trigger single-use fail-closed approval cards (Allow Once/ project-scopedAlways Allow/Reject). Conversations persist in a lock-free atomic JSON store under<userData>/dsh-harness/pi-sessions/<sessionId>.jsonsupporting 6-session multi-project parallel execution, instant cross-provider model switching, rewind/fork, and.zipsession export. - The server binds strictly to
127.0.0.1with Bearer token auth; file reads and writes are confined to the project root (the sole exception isasset_import, which copies explicit local paths you pass into the project); provider API keys are never exposed. - Concurrency gate: credit-spending or heavy synchronous tools (
decide,transcribe_audio,semantic_analyze_video,tutorial_compose,gameplay_build, etc.) cap at 3 concurrent executions (AIAE_MCP_GEN_LIMITtunable) and reject overflow cleanly. - Audit trail: every tool invocation is appended to
<userData>/logs/mcp-audit.jsonl(arguments truncated, 5MB log rotation). graph_edit/graph_icon_refineprotect graphs currently open in an editor from conflicting in-memory overwrites; workflow execution runs asynchronously and is tracked viatask_run+task_status(orvideo_job_list/video_job_getfor video jobs).- Two external connection options: the stdio bridge (zero-dependency
npx -y ai-art-engine-mcp, bundled<install dir>/resources/mcp-bridge.mjs, orscripts/mcp-bridge.mjs; Node.js 18+ required) or HTTP direct (no Node.js needed).
7. Blender tools (advanced)
These tools are not part of the main /mcp toolset — they live on a sibling
endpoint /mcp/blender on the same service (enabled by default in
Settings → MCP → Blender tools; the endpoint returns 403 if you turn it off, and the
main toolset is unaffected).
Let AI drive Blender directly — build scenes, write bpy code, screenshot for self-check,
export GLB / GLTF / FBX into your project. The app makes an outbound socket to the
addon's localhost:9876 — no uv, no Python subprocess, no Blender config tweaks.
Prerequisites
-
Blender is running with an MCP addon enabled (pick the matching type in
Settings → MCP → Blender tools — the two wire protocols are incompatible; mismatch shows up as a
connect timeout or "connection reset"):
-
Community (default):
blender-mcp's
addon.py, installed underEdit → Preferences → Add-ons - Official: the Blender Lab "MCP Server" extension on the Blender Extensions platform — start the service in the extension's preferences
-
Community (default):
blender-mcp's
- Both addons listen on
9876by default; if you change it, update the port in Settings. -
External agents need a second MCP server registered to reach these tools
(
<token>from the app-sidemcp.json):claude mcp add --transport http blender http://127.0.0.1:43110/mcp/blender --header "Authorization: Bearer <token>"The in-app ◈ AI chat panel wires it automatically (the built-in Pi Agent mounts the
director_3d_blendertoolset in-process via zero-turn intent pre-warming orload_toolset), so just say "use Blender …" in the conversation.
Tool reference
Tool names, schemas and outputs are identical across both addons — the model side doesn't care which is running:
| Tool | What it does | Prerequisite |
|---|---|---|
get_scene_info |
Scene overview: scene name, object / material counts, name · type · location of the first few objects | Blender running |
get_world_state_snapshot |
Full snapshot: geometry / relations / animation summary, current frame & frame range, FPS, selection, active camera & lights | Blender running |
get_object_info |
Single-object detail (mesh objects include vert / edge / face count and world bounding box) | Blender running |
get_viewport_screenshot |
3D viewport screenshot, returned to multimodal clients in-band (offscreen capture, fallback to window grab) | Blender UI visible |
execute_blender_code |
Run Python inside the Blender process (full bpy access); print returns verbatim; errors carry exception type & traceback |
Blender running |
export_scene |
Export the scene (or selection / named objects) to glb / gltf / fbx / obj / usd / stl — chain with asset_import to land in the asset library |
Blender running |
describe_node_type |
Look up a node type (e.g. ShaderNodeTexImage): sockets and settable properties — call this before writing shader / geometry-node scripts |
Blender running |
bpy_api_lookup |
Look up bpy API in the running Blender (operators / types / properties / functions) — names and defaults come from live RNA | Blender running |
get_addon_status |
Addon version / protocol version / capability list / Blender version — tells you whether "can't connect" means disabled, version mismatch, or Blender not running | Blender running |
Typical loop
get_scene_info Inspect state
↓
execute_blender_code Write bpy: model / material / camera
↓
get_viewport_screenshot Self-check the viewport (multimodal client sees the image)
↓
export_scene Export GLB / GLTF / FBX …
↓
asset_import Land it in the asset library
execute_blender_code steps and parameters — iterate from the screenshot if it's not right.
Safety rails
-
execute_blender_codeno longer applies a lexical code guard: full Python / bpy is allowed (includingclass/lambda/open, etc.). The real write backstop is the §6 mode constraint — Ask / Plan make the whole group read-only, and write calls are rejected. -
Screenshots go through a one-shot temp file:
get_viewport_screenshotwrites to a system temp file the app reads and deletes immediately; the image is returned only in-band to multimodal clients and never touches the project or the audit log. -
Mode is bound to the request, not the client: the Blender endpoint shares the
service's token; Ask / Plan flow through
X-AIArt-Mode/X-AIArt-Run-Id. Ask returns nothing; Plan returns only the read-only tools (get_scene_info/get_world_state_snapshot/get_object_info/get_viewport_screenshot/describe_node_type/bpy_api_lookup/get_addon_status);execute_blender_codeandexport_scenecount as write and are rejected + audited. -
The addon is a socket server: close Blender and the whole group fails
(the error explicitly says "can't connect to addon", not a vague timeout). The app
does not launch Blender and has no headless mode —
get_viewport_screenshoteven requires the window to be visible (minimized captures fail and fall back to the window grab). Connection state refreshes every 4 seconds in the Settings panel;get_addon_statuschecks versions on demand.