Open-source Defold MCP server for automating game development workflows and integrating AI tools
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 offers a comprehensive set of tools for developers to build, manage, and debug Defold projects programmatically, making it easier to integrate AI applications like Claude Desktop, Continue, Cursor, and Windsurf into their development processes.
defold-mcp provides extensive capabilities by exposing a range of Defold project management tools through the Model Context Protocol (MCP). These tools enable developers to:
The MCP architecture leverages the Model Context Protocol for seamless integration with AI applications. This server exposes Defold project management functions as API endpoints, allowing developers to control every aspect of their game development workflow from tools like Claude Desktop or Continue. The following are key components of the protocol implementation:
graph TD
A[AI Application] -->|MCP Client| B[MCP Protocol]
B --> C[MCP Server]
C --> D[Data Source/Tool]
style A fill:#e1f5fe
style C fill:#f3e5f5
style D fill:#e8f5e8
The table below highlights the compatibility of defold-mcp with various MCP clients:
MCP Client | Resources | Tools | Prompts | Status |
---|---|---|---|---|
Claude Desktop | ✅ | ✅ | ✅ | Full Support |
Continue | ✅ | ✅ | ✅ | Full Support |
Cursor | ❌ | ✅ | ❌ | Tools Only |
To install and run defold-mcp, follow these steps:
git clone https://github.com/yourusername/defold-mcp.git
cd defold-mcp
npm install
.env
file to set environment variables like DEFOLD_PATH
, MCP_PORT
, etc.node index.js
defold-mcp enables developers to automate repetitive tasks, improve project consistency, and integrate AI functionalities into their development workflows. Here are two realistic scenarios:
A developer using Continue or Cursor can automatically generate Lua scripts within a Defold project based on user-defined templates and prompts. This reduces the time spent writing repetitive code and ensures consistency across multiple game scenes.
With defold-mcp, developers can run Defold projects in debug mode and capture console output using MC clients like Continue or Windsurf. These clients can provide real-time analytics on project modifications, helping developers quickly identify and resolve issues.
deford-mcp is designed to be fully compatible with popular MCP clients such as Cursor, Continue, and Windsurf. To integrate defold-mcp with these tools, add the necessary configuration files in your Defold project directory:
mcp.json
Configuration for Cursor:{
"mcpServers": {
"defold-mcp": {
"command": "/path/to/your/node/binary",
"args": ["/path/to/where/you/cloned/defold-mcp/index.js"],
"env": {
"MCP_TRANSPORT": "stdio",
"DEFOLD_PATH": "/Applications/Defold.app/Contents/MacOS/Defold",
"MCP_PORT": "3000",
"MCP_HOST": "localhost",
"BOB_PATH": "/desired/path/for/bob.jar"
}
}
}
}
defold-mcp is optimized for performance and compatibility across various AI application environments. Here's a compatibility matrix showing the supported clients:
Client | Resources | Tools | Prompts | Status |
---|---|---|---|---|
Claude Desktop | ✅ | ✅ | ✅ | Full Support |
Continue | ✅ | ✅ | ✅ | Full Support |
Cursor | ❌ (Limited to Tools) | ✓ | ❌ | Tools Only |
To enhance security and customization, advanced users can configure the server with environment variables in a .env
file:
MCP_PORT=3000
DEFOLD_PATH=/Applications/Defold.app/Contents/MacOS/Defold
BOB_PATH=/desired/path/for/bob.jar
You can use the create_project
, update_project_settings
, and other tools provided by defold-mcp to automate project creation and configuration.
Yes, defold-mcp is fully compatible with these tools, allowing for seamless integration of AI features directly into your game development workflow.
defold-mcp includes standard security best practices such as input validation and secured communication channels between the MCP client and server.
Yes, you can manage multiple projects by specifying different project directories or paths in your .env
file.
defold-mcp provides detailed logging and error handling mechanisms that can be configured via environment variables or through custom scripts.
Contributions, bug reports, and feature requests are welcome. Please open an issue or submit a pull request to contribute to this project:
For more information on Model Context Protocol (MCP), visit the official documentation:
Join our community to stay informed about latest updates and developments related to defold-mcp:
By leveraging the power of MCP, developers can streamline their workflow, enhance productivity, and unlock new possibilities in AI-driven game development.
Next-generation MCP server enhances documentation analysis with AI-powered neural processing and multi-language support
Learn to connect to MCP servers over HTTP with Python SDK using SSE for efficient protocol communication
Python MCP client for testing servers avoid message limits and customize with API key
Discover easy deployment and management of MCP servers with Glutamate platform for Windows Linux Mac
Explore community contributions to MCP including clients, servers, and projects for seamless integration
Learn how to use MCProto Ruby gem to create and chain MCP servers for custom solutions