Defold MCP Server

My attempt to create a MCP server that can be used with cursor to work on a defold project

Local serverstdio

What is the Defold MCP server?

My attempt to create a MCP server that can be used with cursor to work on a defold project. That is what the defold mcp server brings to an AI assistant: the same capability, reachable through the Model Context Protocol rather than a separate app or dashboard.

The short version

defold-mcp is an open-source Model Context Protocol (MCP) server designed to bridge the Defold game engine with modern developer tools and AI-powered workflows. It provides a set of powerful tools to automate, inspect, and manage Defold projects programmatically, making it easier for developers to:

Getting it running

Setup follows the usual MCP pattern — install or clone the server, register it in your client's configuration file, restart the client.

The tools it exposes

The server publishes 14 tools. What each one is for:

  • launch_defold — Launch the Defold editor for a project
  • run_project — Run a Defold project in debug mode and capture output
  • create_project — Create a new Defold project with a basic structure
  • list_projects — List all Defold projects in a directory
  • get_project_settings — Read settings from game.project
  • update_project_settings — Update settings in game.project
  • create_script — Create a new Lua script
  • edit_script — Edit an existing Lua script
  • create_lua_module — Create a reusable Lua module
  • create_collection — Create a new collection
  • add_game_object — Add a game object to a collection
  • add_component — Add a component (sprite, script, etc.) to a game object

What it needs from you

Configuration is passed through the environment: MCP_TRANSPORT, DEFOLD_PATH, MCP_PORT, MCP_HOST, BOB_PATH. Treat anything key-shaped as a real credential — scope it to the minimum the server needs, and rotate it if it ever lands in a shared config.

Things to watch

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • With 14 tools registered it takes up a noticeable share of the context window; turn it off in projects that never touch Defold.
  • Keep per-call confirmation enabled while you learn its behaviour; it is the cheapest safeguard you have.

How it compares

This sits in the file and storage access group, where several servers overlap in what they claim to do but differ sharply once you actually set them up. Defold's toolset — launch_defold, run_project, create_project and 11 more — is a fair guide to whether it matches your workflow. It is maintained by ChadAragorn; worth a glance at recent repository activity before you build anything load-bearing on it.

We check each listing at SyncDev against the project's documentation before it goes live — if something here drifts out of date, it is a bug worth reporting.

Available tools

ToolWhat it does
launch_defoldLaunch the Defold editor for a project
run_projectRun a Defold project in debug mode and capture output
create_projectCreate a new Defold project with a basic structure
list_projectsList all Defold projects in a directory
get_project_settingsRead settings from game.project
update_project_settingsUpdate settings in game.project
create_scriptCreate a new Lua script
edit_scriptEdit an existing Lua script
create_lua_moduleCreate a reusable Lua module
create_collectionCreate a new collection
add_game_objectAdd a game object to a collection
add_componentAdd a component (sprite, script, etc.) to a game object
create_spriteCreate and add a sprite asset
create_tilemapCreate and add a tilemap asset

Configuration

VariableDescriptionRequired
MCP_TRANSPORTConfiguration value read at startup.Optional
DEFOLD_PATHFilesystem location the server is allowed to use.Optional
MCP_PORTConfiguration value read at startup.Optional
MCP_HOSTEndpoint or connection string the server talks to.Optional
BOB_PATHFilesystem location the server is allowed to use.Optional

Example prompts to try

  • Use Defold to launch defold.
  • Use Defold to run project.
  • Use Defold to create project.

Frequently asked questions

Add a `.cursor/mcp.json` file to your project with the path to your Node.js binary and the `index.js` file, along with environment variables such as `MCP_TRANSPORT`, `DEFOLD_PATH`, and `BOB_PATH`. The client will automatically start and manage the server.