mcp-defold

mcp-defold

This MCP server drives Defold games through an in-game debug bridge, allowing MCP clients to build, launch, playtest, and interact with real game builds via tools for input, screen reading, state, and logs.

Category
Visit Server

README

mcp-defold

MCP server for driving Defold games through an in-game debug bridge. An MCP client can build the game, launch it, start a run, press inputs, and read the screen, state, and logs. Enough to playtest.

I built it because tests and simulators kept passing on builds of my own games that were actually broken or unplayable. Making the agent play the real build caught what they missed.

Tools

Tool What it does
defold_run Build with the bridge enabled and launch, detached. Returns when the bridge answers. skip_build relaunches fast.
defold_stop Quit the running game cleanly.
defold_start Skip the front-end (title/chargen) and begin a run. options passes game-defined start options through.
defold_input Press input triggers in order, then return the screen.
defold_screen The current screen as a composed text frame.
defold_state Compact game-state JSON (fields are game-defined).
defold_log Tail of the game's mirrored debug log.
defold_bridge Raw passthrough for game-specific bridge commands.
defold_test Run the project's headless test suite, if configured.

Install

git clone https://github.com/haksanlulz/mcp-defold
cd mcp-defold
npm install
cp projects.example.json projects.json   # register your game

Runs directly with tsx; no build step. Requires Node 18+ and PowerShell 7 (pwsh, cross-platform) for the run scripts.

Use it from an MCP client

{
  "mcpServers": {
    "defold": {
      "command": "npx",
      "args": ["tsx", "/absolute/path/to/mcp-defold/index.ts"]
    }
  }
}

Env: MCP_DEFOLD_PROJECTS overrides the registry path; MCP_DEFOLD_DEFAULT picks the default project.

What your game has to provide

Two things, both on the game side (this server is just the client):

  1. An in-game bridge: newline-delimited JSON over localhost TCP answering ping / screen / state / input / start / log / quit. Protocol in PROTOCOL.md; working skeleton in example/bridge.lua. Gate it behind a debug flag so it never ships in release builds.
  2. A run script: builds with the bridge compiled in, launches the engine detached, prints bridge LIVE on <port>.

The screen is text on purpose: compose whatever view carries your game's state (an ASCII map + HUD for a roguelike, a score readout for an arcade game).

Develop

npm test          # vitest: tool handlers against a fake in-process bridge (no Defold needed)
npm run typecheck

License

MIT © Abishai James. Defold is a trademark of the Defold Foundation; this project is unofficial.

Recommended Servers

playwright-mcp

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.

Official
Featured
TypeScript
Audiense Insights MCP Server

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.

Official
Featured
Local
TypeScript
Magic Component Platform (MCP)

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.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

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.

Official
Featured
TypeScript
Kagi MCP Server

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.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

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.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured