Set up Tiled MCP Pro with Claude Code or Cursor
Tiled MCP Pro has two parts: the Tiled extension tiled_mcp_pro.js, a single JavaScript file that Tiled loads at startup, and a Node.js MCP server that your AI client starts. This guide installs both and connects Claude Code, Cursor or Claude Desktop. It follows INSTALL.md from the download and takes about ten minutes.
Requirements
- Tiled Map Editor 1.11 or later. Verified: Tiled 1.12.2 on Windows 11 (all 105 tools, live test suite). macOS and Linux are untested; they should work, see the note in Troubleshooting.
- Node.js 18 or later (
node --versionto check). - An MCP client: Claude Code, Cursor, Claude Desktop, Windsurf, Cline, or another client that can start a local stdio server.
Unzip the download to a permanent place, for example C:\tools\tiled-mcp-pro or ~/tools/tiled-mcp-pro. The AI client runs the server from there.
tiled-mcp-pro-v1.1.0/
extension/tiled_mcp_pro.js Tiled extension
server/ MCP server (build/ + package.json + package-lock.json)
scripts/ extension install scripts
README.md INSTALL.md CHANGELOG.md LICENSE
1. Install the Tiled extension
Windows
powershell -ExecutionPolicy Bypass -File scripts\install-extension.ps1
Or copy extension\tiled_mcp_pro.js by hand into a folder under %LOCALAPPDATA%\Tiled\extensions\, for example C:\Users\<you>\AppData\Local\Tiled\extensions\tiled-mcp-pro\tiled_mcp_pro.js. Create the folders if they do not exist yet.
macOS and Linux (untested)
bash scripts/install-extension.sh
Or copy extension/tiled_mcp_pro.js to ~/Library/Preferences/Tiled/extensions/tiled-mcp-pro/ (macOS) or ~/.config/tiled/extensions/tiled-mcp-pro/ (Linux).
Any platform
Tiled shows its extensions folder in Edit > Preferences > Plugins (the Extensions path; Open... opens it). If yours differs from the defaults, copy the file there, or pass the folder to the install script (-ExtensionsDir <dir> / first argument).
Copy only tiled_mcp_pro.js: Tiled loads every .js / .mjs file in the extensions folder.
Restart Tiled. Map > MCP: Show Status shows the extension version and the connection, and the Tiled console (View > Views and Toolbars > Console) logs [Tiled MCP Pro] Extension 1.1.0 loaded.
2. Install the MCP server
cd server
npm ci --omit=dev
node build/index.js --version # prints 1.1.0
npm ci installs the exact dependency versions from package-lock.json. Use npm install --omit=dev if npm ci is not available. You do not start the server yourself; your AI client starts it when it needs it.
3a. Connect Claude Code
Use the absolute path of server/build/index.js. Forward slashes work on Windows too.
claude mcp add tiled -- node C:/tools/tiled-mcp-pro/server/build/index.js
3b. Connect Cursor, Claude Desktop and others
Claude Desktop (claude_desktop_config.json), Cursor (~/.cursor/mcp.json or .cursor/mcp.json), Windsurf, Cline and other clients with the same format:
{
"mcpServers": {
"tiled": {
"command": "node",
"args": ["C:/tools/tiled-mcp-pro/server/build/index.js"]
}
}
}
Restart the client after editing its config.
4. Check the connection
Start Tiled and your AI client in any order. The extension finds the server within a few seconds (on Windows it retries continuously; on macOS and Linux see Troubleshooting). Then ask:
Call get_editor_info and tell me the Tiled and extension versions.
You should get the Tiled version, the platform and extensionVersion back. In Tiled, Map > MCP: Show Status shows the same connection from the other side.
The extension long-polls the server over HTTP on loopback, ports 6520 to 6524, so it uses almost no CPU while idle. The server accepts only local, non-browser requests and sends nothing to the internet. Several AI clients can share one Tiled: each runs its own server on a free port, and the extension serves all of them.
5. Full or lite mode, server options
By default the server registers all 105 tools. For clients with a tool cap (about 100 across all servers), add --lite for the 63 core tools:
"args": ["C:/tools/tiled-mcp-pro/server/build/index.js", "--lite"]
| Option | Effect |
|---|---|
--lite | Core tools only: map, layer, tile, tileset, object, property, editor (63 tools). Leaves out Smart Tiles, Wang placement, terrain set editing, export, analysis, project and image tools. |
--version, --help | Print version / usage. |
env TILED_MCP_PORT=N | Bind exactly port N (default: first free port of 6520-6524). The extension only looks at 6520-6524. |
env TILED_MCP_TIMEOUT_MS=N | Per-command timeout (default 30000). |
Auto-tiling and export are in full mode only, so use full mode if your client allows it.
6. First prompts
Create a 30x20 map with 16 px tiles at C:/maps/test.tmx using
C:/art/tiles.png, fill the floor, add walls around the edge and
show me a render.
Show me the tileset preview, then add layers Ground, Walls and
Objects. Render the map with return_image and check the walls.
Next: build a level map from a prompt.
Updating and uninstalling
Replace both parts with the new version: install the new tiled_mcp_pro.js (run the install script again; Tiled reloads changed extensions automatically) and replace the server/ folder (run npm ci --omit=dev again). get_editor_info reports the running extensionVersion.
To uninstall: scripts\install-extension.ps1 -Uninstall on Windows, scripts/install-extension.sh --uninstall on macOS / Linux (or delete the tiled-mcp-pro folder in the extensions folder), then remove the server entry from your AI client and delete the folder.
Troubleshooting
| Symptom | Fix |
|---|---|
Tiled did not connect to port 6520 within 8000ms | Tiled is not running, or the extension is not installed. Check Map > MCP: Show Status. If the menu entries are missing, the file is not in Tiled's extensions folder (see Edit > Preferences > Plugins). |
| Status says "Not connected" while the AI client is running | Use Map > MCP: Reconnect (Ctrl+Shift+M). Make sure nothing else uses ports 6520-6524 and that a firewall does not block loopback connections. |
Could not bind to port 6520-6524 | Five servers are already running (five AI client sessions), or other programs use those ports. Close some sessions. |
Method not found: ... | The extension is older than the server. Install the tiled_mcp_pro.js from the same release and restart Tiled. |
| A tool reports that an action "opens a dialog" | Intentional: a modal dialog would block Tiled until someone closes it. Use the dedicated tool (for example save_map with file_path) or pass allow_dialog: true while someone is at the editor. |
No map is currently open / The active document is a tileset | Open or create a map (open_map, create_map) or switch with set_active_map. |
| Tool calls time out | A very large operation (for example rendering a huge map) took longer than 30 s. Raise TILED_MCP_TIMEOUT_MS. |
| Edited tileset changes are lost | External tilesets (.tsx) are separate documents. Save them with trigger_action SaveAll or in Tiled. |
| macOS / Linux: the extension connects only after you click in Tiled | Where a refused connection fails instantly, the extension retries a few times and then waits for editor activity (switching or opening files) or MCP: Reconnect. Start the AI client first, or use Reconnect once. |
| Two Tiled windows | Only the most recently started Tiled instance receives commands. |
Logs: the MCP server writes to stderr (visible in your AI client's MCP log); the extension writes to the Tiled console.
Get Tiled MCP Pro
$10 once on itch.io, free updates.