Skip to content

AI connection (MCP)

AI connection lets MCP clients such as Claude Desktop and Claude Code use NP Editor directly. The AI places blocks, takes screenshots to see the result, runs checks and exports. With the AI map generator (build_map), it can also build a whole map with terrain, roads, buildings and towns in one go.

AI app ──(MCP)── NPEditorMcp.exe ──(127.0.0.1, token)── NP Editor (live mode when it is open)
└── file mode when the editor is not running: opens and edits the .npworld directly
WhatWhere
Turn on/offTools › Toggle AI connection (MCP)
Copy the config snippetTools › Copy AI connection settings (for Claude Desktop)
PreferencesEdit › Editor Preferences… (Ctrl+,) › AI connection
Consolemcp on · mcp off · mcp status
  1. Check that mcp\NPEditorMcp.exe exists in the install folder.
  2. In the editor, click Tools › Copy AI connection settings (for Claude Desktop). The config snippet is copied to the clipboard.
  3. Register it in your AI app.
    • Claude Desktop: Paste it under mcpServers in %APPDATA%\Claude\claude_desktop_config.json and restart Claude Desktop.
    • Claude Code: claude mcp add npeditor -- "<install folder>\mcp\NPEditorMcp.exe"
  4. Turn it on in the editor with Tools › Toggle AI connection (MCP). It is remembered for the next launch.
  5. Tell the AI “Check the editor status.”
  6. If the result of the status call the AI makes is mode: live, you are connected.

The installation also includes the skill skills\np-editor-builder\SKILL.md, which teaches the AI how to use these tools well. Add it as an account skill in the Claude app, or copy it to ~/.claude/skills/np-editor-builder/SKILL.md for Claude Code.

Since 0.9.3: NPEditorMcp also requires an account signed in through the editor to start. Open NP Editor and sign in first.

ModeWhenDifference
LiveWhen the editor is open and AI connection is onThe AI’s edits appear in the viewport immediately. camera and screenshot are available. Shader looks apply to the preview immediately.
FileWhen the editor is not runningOpens and edits the .npworld directly. Instead of screenshots, view results with map_image and view_image. Shader looks exist only within this MCP session.
  • The default (--mode auto) is live mode when the editor is running and file mode otherwise.
  • If the mode changes midway, the first line of the result says so.
RuleDetails
Off by defaultThe AI can use the editor only while it is on.
This PC onlyThe bridge listens only on 127.0.0.1 and checks a random token on every connection (%APPDATA%\NPEditor\mcp\bridge.json).
UndoOne edit = 1 undo step + 1 Outliner actor. build groups several operations into one step and rolls everything back on error.
No overwritingSaves and exports append _v2 · _v3 if the same name exists. Overwriting happens only when saving the currently open file with overwrite=true.
Unsaved change protectionworld_new and world_open are refused if there are unsaved changes. Use discard_unsaved=true only when the user agrees.
Respects locksLocked actors and co-building locked cells are skipped and reported in the result.
Size limitsUp to 8 million cells can be changed at once, and up to 64 million cells scanned.

All tool names and arguments are in MCP tool list.

GroupTools
Status · worldstatus · world_new · world_open · world_save · undo · redo · actors · select
Readinspect_region · read_blocks · surface · find_blocks · block_search · block_info · palette
Editset_blocks · fill · shape · replace · clear · transform · build · generate
Authoringbuild_script · furnish · furnish_building · terrain_sculpt
Terrain · natureterrain_water · terrain_shape · scatter · props
AI map generatorblueprints · place_blueprint · build_map
Viewcamera · screenshot · map_image · view_image · view_sheet
Shaders · resource packshader_looks · shader_look · shader_formulas · build_shaderpack · build_resourcepack · items · item_set · sky
Soundsounds · sound_set · sound_generate · block_sounds_set
World logic · actorsscene_rules · scene_rule_set · anim_clips · anim_clip_set · meta_actor · actor_components
Designbom · design_report · travel_times
Exportexport
Web 3D viewerworld_info · world_chunks
ToolWhat it does
blueprintsDescribes the buildable parts, styles and map spec format, with examples.
place_blueprintBuilds one part on the existing ground. Parts are house · tower · hall · castle · road · plaza · fountain · portal · stall · well · street lamp · bridge · castle wall · grand stairs · tree · rock.
build_mapBuilds a whole map from one map spec (np-mapspec JSON) in the order terrain → roads → structures → towns (houses along roads) → nature. Up to 1024×1024.
Detail level (detail)Result
lowMassing (form) only
mediumTypical Minecraft building (default for place_blueprint)
highThe most detail possible with vanilla blocks — recessed windows · trim · overhangs · interiors · gardens
maxhigh + decoration — weathering · hedges · ivy · props
  • Styles (style) are medieval · fantasy_kingdom · nordic · desert.
  • Write "terrain": "keep" in the spec to build on the existing ground.
  • With review=true, a result summary is appended (building count per type · road connectivity · flooded roads · overlapping buildings, etc.).
  • One map = 1 undo step.

Example: if you say “Build a medieval town at high detail, with a central plaza, one castle and a river”, the AI checks the format with blueprints and calls build_map.

SettingDefaultMeaning
Enable AI connection (MCP)OffOpens the bridge when on.
Bridge port0 (auto)0 picks a free port. If the given port cannot be opened, a free port is used and logged.
OptionMeaning
--mode auto|live|fileFix the mode (default auto)
--jar <client.jar>The Minecraft client jar to use
--no-jarNeither looks for nor reads a jar. Same as the environment variable NPEDITOR_NO_JAR=1.
--dir <folder>Base folder (default Documents\NPEditor)
--configPrints the Claude Desktop config snippet and the Claude Code command.
--versionVersion number
  • --no-jar takes precedence over --jar. Features that need the jar (palette, etc.) are unavailable, and colors come from a built-in approximate color table. Use it where a jar cannot be used, such as a public service.
  • If no jar is given, the 1.21.11 jar is searched for in the launcher folders by the same rules as the editor.
  • Results are saved under shaderpacks · resourcepacks · exports · looks in the base folder.

This feature has no default shortcuts. You can assign keys to the menu items in Tools › Shortcuts….

  • Asking the AI to check the result with screenshot or view_sheet after a big job and fix it improves quality.
  • If you don’t like the result, undo it in the editor with Ctrl+Z. AI edits go into the same undo history.
  • If the connection does not work, check on/off, port and call count with mcp status.
  • If the copy-settings notification says “NPEditorMcp.exe not found”, check the mcp\NPEditorMcp.exe path in the install folder.
  • The zone trigger wizard (trigger + rule in one step) is still available only in the editor.