MC-World-MCP
Offline MCP server for reading and writing Minecraft server files, including level data, datapacks, regions, and structures, with safety checks and backups.
README
MC-World-MCP
Offline-only MCP tools for operating on a Minecraft server directory.
This MCP intentionally does not use RCON, sockets, online player queries, or server start/stop controls. It only reads and writes local files such as level.dat, datapacks, structure templates, logs, and Anvil region files.
The complete write path targets Java Edition / Arclight 1.20.1 worlds with
DataVersion 3465. Other Java Anvil worlds are detected and exposed for
best-effort reads, but world writes are rejected unless the version adapter marks
them as fully supported. Bedrock LevelDB worlds are detected as unsupported.
Run
When this project lives at E:/VC/mc-world-mcp and a server workspace lives two levels below E:/VC, the workspace .vscode/mcp.json starts the server with:
{
"command": "python",
"args": ["-m", "mc_world_mcp.server"],
"env": {
"PYTHONPATH": "${workspaceFolder}/../../mc-world-mcp/src",
"MC_SERVER_ROOT": "${workspaceFolder}"
}
}
MC_SERVER_ROOT should point at the Arclight server root that contains server.properties and world/. If it is omitted, the server tries the current working directory first.
World selection follows server.properties level-name, so a server using
level-name=world_regen_source is operated through that directory rather than a
hardcoded world/. Set MC_WORLD_NAME to override this explicitly.
Safety
All write tools:
- reject paths outside
MC_SERVER_ROOT - reject writes when a server or unknown
java/javawprocess is running; recognized Minecraft client Java processes are ignored - reject Java world writes unless the selected world is DataVersion 3465
- back up every modified file under
backup/mc_world_mcp/<timestamp>/ - write a
manifest.jsondescribing the changed files
Read tools are allowed while the server is running.
Tool Groups
- Server/files: summaries, safe file read/write, logs, version/platform detection
- Source worlds: local world inventory, server-generation workflow guidance, source/target chunk comparison, and offline chunk import
- NBT:
level.dat, player data, world data, structure NBT - Datapacks: folder and zip datapack listing, validation, search, read, write
- Worldgen: datapack/mod/plugin interface listing, resource checks, source-world simulation, and report summaries
- Regions: scan, inspect chunks, get/read/set/fill/replace blocks, block state strings
- World diagnostics: dimensions, world coverage, chunk palettes, log issue grouping
- World data: block entities, external entity regions, POI regions, biome boxes, heightmap clearing, chunk pruning
- Templates: list/read/write
.nbtstructure templates, export/place blocks with block entities and best-effort entities - Preview: offline PNG map, slice, and structure-template previews under
backup/mc_world_mcp/previews/ - Safety: offline checks, backup listing, backup restore
Optional Preview Acceleration
Preview rendering and source-world generation simulation have pure-Python fallbacks and can optionally use a compiled Cython module for hot loops such as block-state index decoding, chunk surface projection, source-world floor projection, and structure-template projection.
On Windows, compile the extension in place:
python setup.py build_ext --inplace
The source distribution includes generated C code, so Cython is optional for
normal builds. Install mc-world-mcp[preview-accel] or python -m pip install Cython only when you want to regenerate the C file from _preview_accel.pyx.
For wheel builds, set MC_WORLD_MCP_BUILD_ACCEL=1 to opt in to compiling the
extension.
This creates a platform-specific mc_world_mcp._preview_accel.pyd next to the
Python sources. If the compiled module is present, preview and simulation tools
load it automatically; otherwise they continue using the pure-Python
implementation.
Building the .pyd requires the Microsoft C++ Build Tools matching the active
Python version.
The repository may include a prebuilt
src/mc_world_mcp/_preview_accel.cp311-win_amd64.pyd for Windows x64 CPython
3.11. Other Python versions, platforms, or architectures should rebuild the
extension locally.
Assistant MCP Instructions
AI assistants working on this Minecraft workspace should use MCP tools in this order:
-
Read MCP-provided instructions.
- The
mc-worldserver exposes this guidance in its server instructions. - Call
assistant_instructions()first when tool choice or workflow is unclear. - MCP clients that support resources can read
mc-world://assistant-instructions. - MCP clients that support prompts can use
mc_world_assistant_instructions.
- The
-
Read project context first.
- Read Copilot repo memory when available, especially project overview, datapacks, tool reference, gotchas, change history, and MCP server notes.
- Then read local files such as
README.md,.github/copilot-instructions.md,server.properties, datapack files, and logs as needed.
-
Use
minecodefor Minecraft reference lookups.- Command syntax: call
get_wiki_command_info, thenspyglass_get_commandswhen exact 1.20.1 syntax matters. - IDs and registries: call
spyglass_get_registriesfor blocks, items, entities, biomes, enchantments, and other registries. - Vanilla JSON: call Misode tools such as
misode_get_preset_data,misode_get_presets,misode_get_loot_tables, andmisode_get_recipes. - Wiki background: call
search_wiki, thenget_wiki_page_content.
- Command syntax: call
-
Use
mc-worldfor local server and world operations.- Start with
server_summary(),detect_world_version(),world_summary(), andcheck_offline_safety(). - For datapacks, use
list_datapacks(),validate_datapacks(),search_datapack_files(),read_datapack_file(), andwrite_datapack_file(). - For worldgen diagnosis, use
list_generation_interfaces(),worldgen_report(),list_worldgen_resources(), andvalidate_worldgen_references(). - For logs, use
analyze_latest_log(),read_server_log(), andgrep_server_log(). - For Anvil data, use
scan_regions(),scan_world_coverage(),inspect_chunk(),summarize_chunk_palette(),get_block(),read_block_box(),set_block(),fill_blocks(), andreplace_blocks(). - For NBT edits, use
read_level_dat(),write_level_dat_value(),read_nbt_file(),write_nbt_value(), andwrite_chunk_nbt_value(). - For entities, block entities, POI, biomes, and heightmaps, use
list_entities(),add_entity(),edit_entity(),delete_entities(),add_block_entity(),edit_block_entity(),list_poi(),delete_poi(),set_biome_box(), andrefresh_heightmaps(). - For structures, use
list_structure_templates(),read_structure_template(),write_structure_template(),write_structure_template_value(),export_region_to_template(), andplace_template_to_region(). - For previews, use
render_map_preview(),render_slice_preview(), andrender_template_preview(). - For backups, use
create_backup(),list_backups(), andrestore_backup_manifest().
- Start with
-
Respect the
mc-worldsafety boundary.- Do not use RCON, sockets, online player queries, or server start/stop controls.
- Read tools may run while the server is online.
- Write tools require the server to be offline and will reject writes while server or unknown
java/javawprocesses are running. Recognized Minecraft client Java processes are ignored. - World writes are supported only for Java Anvil
DataVersion3465. - Every write creates a backup under
backup/mc_world_mcp/<timestamp>/withmanifest.json.
-
Use source worlds for real datapack, mod, or plugin worldgen.
mc-worlddoes not execute biome modifiers, jigsaw placement, datapack worldgen, mod worldgen, or plugin worldgen.list_generation_interfaces()exposes the open datapack, mod jar, and plugin jar generation inputs visible to the server.- Generate chunks in Minecraft/Arclight first, then stop the server.
- Select the target world with
MC_WORLD_NAME, for exampleMC_WORLD_NAME=world. - Use
worldgen_source_plan("world_regen_source"),list_local_worlds(),simulate_worldgen_generation(...), andcompare_world_chunks(...)before importing. - Use
import_chunks_from_world("world_regen_source", chunks, confirm=true)only after confirming the source and target are different worlds.
-
Recommended diagnosis workflows.
- Datapack load issue:
validate_datapacks()->worldgen_report()->analyze_latest_log()->search_datapack_files()->read_datapack_file(). - Structure generation issue:
list_generation_interfaces()->worldgen_report()->list_worldgen_resources(type="worldgen/structure")->validate_worldgen_references()->simulate_worldgen_generation(...)->read_level_dat("Data.WorldGenSettings")->grep_server_log("structure"). - Map visual check:
scan_world_coverage()->render_map_preview(..., "top")->render_map_preview(..., "ocean_floor")->inspect_chunk()orsummarize_chunk_palette(). - Offline edit:
check_offline_safety()-> create or rely on automatic backup -> perform one focused write -> render or inspect the affected area.
- Datapack load issue:
Current Server Workflow
For the current Arclight 1.20.1 server workspace, server.properties uses
level-name=world_regen_source. With the README MCP config above, all world
tools automatically target that active world instead of the default world/.
This MCP still does not execute Minecraft worldgen. Datapack biome modifiers, jigsaw structures, mod structures, plugin-provided generation, coral placement, and sand dunes must be generated by Minecraft/Arclight in a source world first. The MCP can then inspect that generated source world offline, simulate the result from the generated files, and copy selected generated chunks into the active target world.
For import work, launch the MCP with the target world selected, for example
MC_WORLD_NAME=world, and pass the generated source world as
source_world_name="world_regen_source". The source and target worlds must be
different local directories.
Useful checks:
worldgen_report()summarizes datapacks, worldgen resources, validation findings, and log-derived resource issues.list_generation_interfaces()summarizes datapack resources plus mod/plugin jar generation interfaces and metadata.validate_worldgen_references()finds common missing same-namespace worldgen and structure references.list_local_worlds()lists source and target world directories under the server root.worldgen_source_plan("world_regen_source")explains the safe source-world generation/import workflow.simulate_worldgen_generation("world_regen_source", min_cx, min_cz, max_cx, max_cz)treats server-generated source chunks as a simulation sample, returns success/completeness signals, Cython acceleration status, block/height summaries, and preview PNG paths.compare_world_chunks("world_regen_source", min_cx, min_cz, max_cx, max_cz)shows which generated source chunks exist and which target chunks would be overwritten.import_chunks_from_world("world_regen_source", [{"cx": 0, "cz": 0}], confirm=true)copies terrain, entity, and POI chunk records from an already-generated source world into the active world.write_chunk_nbt_value(cx, cz, path, snbt_value)edits one chunk NBT path while offline.add_block_entity(x, y, z, block_state, block_entity_snbt)places a block and writes its block entity NBT.add_entity(entity_snbt)appends an entity to an existing external entity chunk selected by itsPos.
Offline visual checks:
render_map_preview(x1, z1, x2, z2, "surface")renders a top-down PNG.y_modealso acceptstop,ocean_floor,seafloor, or an integer Y level such as"26". Previews can render up to 1,048,576 output pixels; passsample=2or higher for faster downsampled overviews of larger areas.render_slice_preview("x", fixed, min_z, max_z, min_y, max_y)renders a vertical slice.render_template_preview(template_path)renders a structure.nbtprojection.
Preview tools are read-only against the world data and write PNG files under
backup/mc_world_mcp/previews/<timestamp>/.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.