tiled-map-builder
Enables optional, explicitly opt-in generation of isometric tile sprites and complete theme sprite sets via FLUX.1-dev on Hugging Face Inference Providers. Includes a free prompt-preview tool, paid single-tile and whole-theme sprite generation, and a way to override a tile's image with a generated sprite (with background removal and resizing applied).
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
✨ Features
🗺️ 31 MCP tools to create maps, paint tiles, generate rooms and corridors, and place doors, chests, traps, levers, stairs and spawns.
🏰 3 layout presets: a crypt, a castle floor and a werewolf den, each built in one call.
🎨 20 themes, 12 of them with bundled isometric sprites ready to use.
🛡️ Guard rails for agents: placing a chest on a wall, outside a room or on another object fails with a message that says how to fix it, and
validate_mapchecks the map before export.📐 Correct Tiled output: object positions follow Tiled's isometric convention, and saved files point at their sprites with relative paths, so they open directly in Tiled.
🧠 Agent skill and MCP prompt (
map_builder): a step-by-step workflow with an ASCII sketch confirmation, theme heuristics and tactical rules.🖌️ Optional sprite generation with FLUX.1-dev through Hugging Face. It is paid, opt-in, and never runs by accident.
🔌 Works with any MCP client: Claude Code, Claude Desktop, Cursor, VS Code, Zed, OpenCode, and agents running NVIDIA Nemotron.
Related MCP server: material-workbench
🖼️ Preview
🧱 Tech stack
Technology | Role in this project | |
How agents discover and call the map tools (stdio transport) | ||
Server source in | ||
Node.js 20.9+ | Runtime for the server and the scripts | |
Validates every tool input and generates the JSON schemas agents see | ||
🗺️ | Map editor that opens the generated | |
Hugging Face Inference + FLUX.1-dev | Optional, paid tile sprite generation | |
🖼️ | Background removal and resizing of generated sprites, PNG previews | |
One of the agent models this server was designed and tested with |
🚀 Quick start
Requirements: Node.js 20.9 or newer and git. Tiled is optional, to view and edit the maps.
git clone https://github.com/4math2379/Tiled-MCP-Server.git
cd Tiled-MCP-Server
npm install # installs the server workspace
npm run build # compiles tiled-mcp/src to tiled-mcp/dist
npm run smoke # optional: 39 offline end-to-end checksThen register the server with your MCP client. With Claude Code, from the repository folder:
claude mcp add tiled-map-builder -- node "$(pwd)/tiled-mcp/dist/index.js"Most other clients take the same JSON block (replace the path with your absolute path):
{
"mcpServers": {
"tiled-map-builder": {
"command": "node",
"args": ["/absolute/path/to/Tiled-MCP-Server/tiled-mcp/dist/index.js"]
}
}
}👉 Per-client instructions for Claude Desktop, Cursor, VS Code, Zed, OpenCode, Windsurf and the MCP Inspector are in docs/client-setup.md.
Now ask your agent:
Build a 28x18 crypt under an abandoned chapel with two skeletons in the nave, a locked chest in the north chamber and a dart trap before the deep crypt. Save it as crypt-chapel.tmj.
The map lands in maps/crypt-chapel.tmj. Open it in Tiled, or render a preview without Tiled:
npm run preview -- maps/crypt-chapel.tmj🧭 How it works
flowchart LR
A["AI agent<br/>(Claude, Nemotron, ...)"] -- MCP tools --> S["tiled-map-builder<br/>server"]
S --> M[("Maps in memory<br/>ground · walls · decorations<br/>objects · spawns")]
M --> V{"validate_map"}
V --> F["save_to_disk<br/>maps/*.tmj"]
V --> U["upload_to_dungeon<br/>(optional API)"]
F --> T["Tiled editor<br/>or a game engine"]create_mapmakes an empty map in a theme and returns amapId.Tiles are painted by role (
walkable_floor,wall,hazard_primary,obstacle_decor, ...) and the theme picks the sprite.Each map has three tile layers, ground, walls and decorations, and two object layers, objects (doors, chests, traps, levers, stairs) and spawns (player, enemy, NPC).
Coordinates are grid cells:
xis the column andythe row; (0,0) is the top corner of an isometric map.Maps live in server memory until you call
save_to_diskorexport_json.
Details, properties and importer formulas: docs/map-format.md.
🧰 Tools
Group | Tools |
Map lifecycle |
|
Painting |
|
Rooms and corridors |
|
Layout presets |
|
Objects |
|
Spawns |
|
Validation and export |
|
Sprites |
|
Full parameters, generated from the server itself: docs/tools.md.
🎨 Themes
Theme key | Display name | Setting | Sprites |
| Crypte mournevaldienne | Burial vaults, cracked flagstones, poison vents | ✅ |
| Castel Von Drak | Black marble halls, throne room, grand stairs | ✅ |
| Tanière de loups-garous | Damp caves, bones, blood pools | ✅ |
| Auberge du Prince Sanglant | Tavern interior, oak tables, hearth | ✅ |
| Village mournevaldien | Wet cobblestones, half-timbered houses, well | ✅ |
| Forêt de Drakenmark | Dark undergrowth, brambles, parasitic mist | ✅ |
| Mausolée | Veined marble, fallen-angel statues, urns | ✅ |
| Tombeau de sang | Ritual sanctuary, bleeding runes, altar | ✅ |
| Eaux Croupies | Stagnant water, water lilies, sunken ruins | ✅ |
| Toundra Glacée | Black ice, frozen statues, thin ice | ✅ |
| Cote Inondee | Drowned city, kelp, deep currents | ✅ |
| Reseau Electronique | Circuit boards, cables, mainframe cores | ✅ |
| Pente Volcanique | Lava flows, obsidian, ash | ➖ |
| Foret Sombre | Twisted woods, quicksand, standing stones | ➖ |
| Plaine Enneigee | Snowfields, frozen lakes, cairns | ➖ |
| Prairie Printaniere | Flowering meadows, streams, maypole | ➖ |
| Plaine Estivale | Golden wheat, cracked earth, scarecrows | ➖ |
| Foret d'Automne | Russet leaves, bog mire, mushrooms | ➖ |
| Terre Desolee | Ash pits, charred trees, ruins | ➖ |
| Cite Futuriste | Chrome, neon, plasma leaks, server racks | ➖ |
✅ sprites bundled in assets/ · ➖ no sprites yet: the maps are valid and Tiled shows placeholders until you generate the sprites.
More about each theme's roles and hazards: docs/themes.md.
🤖 Agent skill and prompt
skills/map-builder/SKILL.md teaches an agent the whole workflow: infer the theme, sketch the layout in ASCII and ask for confirmation, build, validate, save.
Claude Code: copy the folder to
~/.claude/skills/map-builder/(all projects) or.claude/skills/map-builder/(one project), then type/map-builder crypt 28x18 ....Any MCP client: the server exposes the same workflow as the prompt
map_builder, which takes a free-formdescription.
⚙️ Configuration
Nothing is required for map building. Optional settings go in tiled-mcp/.env (copy tiled-mcp/.env.example) or in the env block of your MCP client:
Variable | Default | Purpose |
|
| Where |
|
| Sprite folder ( |
|
|
|
| none | Only for paid sprite generation |
|
| Only for |
All variables, the .env lookup order and security notes: docs/configuration.md.
💸 Sprite generation (optional, paid)
Map building is free and offline. Generating new sprites calls FLUX.1-dev through Hugging Face Inference Providers and costs money per sprite. The tools never overwrite an existing sprite unless you pass force, and the batch script asks for --yes:
node scripts/gen-theme-set.mjs VOLCAN --dry-run # free: shows what would be generated
node scripts/gen-theme-set.mjs VOLCAN --yes # paid: about 10 spritesRead docs/sprite-generation.md before you start.
🟩 Using it with NVIDIA Nemotron
The server works with any model that supports tool calling. It was built alongside agents running Nemotron 3.5 Super-VL on the NVIDIA API free tier, for example through OpenCode. The NVIDIA key belongs to your agent, not to this server. Setup: docs/nemotron.md.
🗂️ Repository layout
tiled-mcp/ MCP server (TypeScript): src/, package.json, tsconfig.json, .env.example
src/tools/ tool groups: lifecycle, paint, procedural, layout-presets, objects, export, generation
src/themes/ 20 theme definitions and the FLUX prompt catalog
skills/map-builder/ agent skill, also served as the map_builder MCP prompt
maps/ sample .tmj maps (default output folder of save_to_disk)
assets/ isometric sprites per theme: <theme>/<role>.png
scripts/ example map scripts, preview renderer, sprite batch, docs generator, smoke test
docs/ documentation, banner and preview images🛠️ Scripts
Command | What it does |
| Compile the server |
| Start the server and run 39 offline end-to-end checks |
| Open the server in the MCP Inspector |
| Render a map to PNG without Tiled |
| Rebuild the three scripted sample maps in |
| Regenerate |
| Generate a theme's missing sprites (paid) |
🤝 Contributing
Issues and pull requests are welcome. See CONTRIBUTING.md for the development loop and CHANGELOG.md for what changed.
📄 License
MIT. Tiled is an independent project by Thorbjørn Lindeijer. Some theme names evoke classic gothic-horror settings; this project is not affiliated with or endorsed by their rights holders.
This server cannot be deployed
Maintenance
Related MCP Connectors
AI game assets for agents: consistent sprites, 2D animations, tiles, maps, music and engine exports.
Generate game assets with AI for 2D games, including sprites, tilesets, and animations.
Make games with AI: one MCP server that connects your agent to Unity, Unreal and Godot editors.
Gamedev tools for AI agents: level design, renders, sprites, GLB optimizer. Pay per call with x402.
Related MCP Servers
- AlicenseCqualityDmaintenanceEnables AI models to develop and automate RPG Maker MZ projects by creating maps, events, and plugins through natural language commands. It provides comprehensive tools for database management, asset integrity checks, and direct map tile manipulation.284 npm1ISC
- AlicenseBqualityDmaintenanceExposes procedural material and isometric terrain generation as MCP tools, allowing agents to create deterministic PBR textures and 2:1 isometric tiles from JSON recipes.121MIT

Sprixen MCP serverofficial
AlicenseNot gradedqualityCmaintenanceEnables AI agents to create style-locked game projects and generate sprites, animations, tiles, maps, music, 3D models, and VFX, then export engine-ready packages for Godot, Phaser, Unity, GameMaker, or RPG Maker MZ.MIT- AlicenseBqualityCmaintenanceEnables AI agents to procedurally design and render stylized 2:1 dimetric isometric game assets in Blender, including NPR cel-shaded scenes, modular tilesets, 8-angle avatar turnarounds, and mathematically exact subpixel collision diamonds, with turnkey engine manifests for Phaser, Godot 4, and retro web games.10Apache 2.0