GM-Maker MCP Server

GM-Maker MCP Server

Enables AI-assisted GameMaker project development in Cursor IDE, allowing users to create projects, add scripts, objects, and sprites using natural language.

Category
访问服务器

README

GM-Maker MCP Server

Build GameMaker projects with AI in Cursor

An MCP (Model Context Protocol) server that brings GameMaker Studio development directly into your AI-powered workflow. Create YYP projects, add scripts, objects, and sprites using natural language in Cursor IDE.

🎮 What This Does

This server exposes GameMaker project manipulation as MCP tools, letting you:

  • Create new GameMaker YYP projects from scratch
  • Add GML scripts with your code
  • Create objects with event definitions
  • Import sprite animations from image sequences
  • List and manage project resources
  • Maintain proper YYP/YY file structure automatically

All through natural language conversations with AI in Cursor.

🙏 Attribution

This project is built on the excellent work by Butterscotch Shenanigans, the indie game studio behind Crashlands, Levelhead, and other amazing games. They've open-sourced their entire GameMaker tooling suite called Stitch.

Specifically, this MCP server uses:

  • @bscotch/yy - Robust parsing and writing of GameMaker YY/YYP files
  • Their extensive TypeScript type definitions for GameMaker resources
  • Their battle-tested approach to programmatic GameMaker project manipulation

Without their incredible open-source contributions to the GameMaker ecosystem, this project wouldn't be possible. Thank you, Butterscotch Shenanigans! 🧈

💡 How This Was Made

Origin Story

This MCP server was created while building Soulbound, a game project that needed better AI-assisted GameMaker development workflows in Cursor. The goal was simple: make Cursor understand GameMaker projects so it could help write GML code, create objects, and manage resources without breaking the YYP structure.

Instead of manually creating GameMaker resources and switching between the IDE and Cursor, this tool lets you stay in the AI-powered flow and have Cursor handle the tedious project setup work.

Technical Architecture

This MCP server bridges GameMaker Studio development with modern AI-assisted workflows:

  1. Foundation: Built on Butterscotch's @bscotch/yy library, which provides safe, validated reading and writing of GameMaker's JSON-like YY/YYP file formats.

  2. MCP Protocol: Implements the Model Context Protocol from Anthropic, which allows AI assistants to call structured tools via a standard interface.

  3. Cursor Integration: Configured to run as a stdio-based MCP server that Cursor can launch and communicate with, exposing GameMaker operations as callable tools.

  4. Type Safety: Written in TypeScript with full type definitions from the @bscotch packages, ensuring robust file generation.

  5. Architecture: Each tool (create_project, add_script, etc.) follows a consistent pattern:

    • Validate parameters with Zod schemas
    • Load existing YYP or create new project structure
    • Generate proper YY resource files
    • Update YYP resource registry
    • Write everything back using Butterscotch's safe write methods

The result: You can now say "create a player object with a step event" in Cursor, and the AI will generate a proper GameMaker object with all the right YY file structure, registered in the YYP, ready to open in GameMaker Studio.

Born from real game development needs, this tool makes AI-assisted GameMaker development actually practical.

Features

Available Tools

  • create_project - Scaffold a new .yyp project
  • add_script - Create a GML script and register it in the YYP
  • add_object - Create a .yy object with optional event stubs
  • add_sprite_from_images - Import frames from a directory and register a sprite
  • list_resources - Enumerate resources by type (scripts, objects, sprites)

Installation

Prerequisites

  • Node.js 18+
  • npm or pnpm
  • Cursor IDE

Setup

  1. Clone and install dependencies:
cd /Users/webb/Repos/mcp-yyp
npm install
  1. Build the server:
npm run build
  1. Test with MCP Inspector (optional but recommended):
npm run inspect

This opens the MCP Inspector to validate your tools before using them in Cursor.

Cursor Configuration

Option 1: Global Configuration

Add to ~/.cursor/mcp.json:

{
  "mcpServers": {
    "gm-maker": {
      "command": "node",
      "args": ["/Users/webb/Repos/mcp-yyp/dist/index.js"],
      "env": {}
    }
  }
}

Option 2: Project-Local Configuration

Add to .cursor/mcp.json in your workspace:

{
  "mcpServers": {
    "gm-maker": {
      "command": "node",
      "args": ["${workspaceFolder}/dist/index.js"]
    }
  }
}

Option 3: Development Mode (TypeScript)

For development with hot-reload:

{
  "mcpServers": {
    "gm-maker": {
      "command": "npx",
      "args": ["tsx", "/Users/webb/Repos/mcp-yyp/src/index.ts"]
    }
  }
}

After adding the configuration, restart Cursor to load the MCP server.

Usage Examples

Once configured, you can use natural language in Cursor to interact with GameMaker projects:

Creating a New Project

"Create a new GameMaker project called MyGame at /Users/webb/Projects/MyGame"

Or explicitly:

Call gm-maker.create_project with { "projectDir": "/Users/webb/Projects/MyGame", "name": "MyGame" }

Adding a Script

"Add a script called player_movement to my GameMaker project at /Users/webb/Projects/MyGame"

Or with code:

Call gm-maker.add_script with {
  "projectDir": "/Users/webb/Projects/MyGame",
  "scriptName": "player_movement",
  "code": "function move_player(spd) {\n  x += spd;\n}"
}

Adding an Object with Events

"Create an object called obj_player with a Create event in my project"

Or explicitly:

Call gm-maker.add_object with {
  "projectDir": "/Users/webb/Projects/MyGame",
  "objectName": "obj_player",
  "events": [{"eventType": 0, "eventNum": 0}]
}

Common GameMaker event types:

  • 0 = Create
  • 1 = Destroy
  • 2 = Alarm
  • 3 = Step
  • 4 = Collision
  • 8 = Draw

Importing a Sprite

"Import PNG frames from /Users/webb/Assets/portal as a sprite called spr_portal"

Or explicitly:

Call gm-maker.add_sprite_from_images with {
  "projectDir": "/Users/webb/Projects/MyGame",
  "spriteName": "spr_portal",
  "framesDir": "/Users/webb/Assets/portal"
}

Listing Resources

"Show me all scripts in my GameMaker project"

Or explicitly:

Call gm-maker.list_resources with {
  "projectDir": "/Users/webb/Projects/MyGame",
  "kind": "scripts"
}

Development

Scripts

  • npm run dev - Run in development mode with tsx
  • npm run build - Build for production
  • npm run start - Run built version
  • npm run inspect - Open MCP Inspector for testing

Project Structure

gm-maker/
├── src/
│   ├── index.ts           # MCP server entrypoint
│   └── gm/
│       ├── types.ts       # TypeScript types
│       ├── yyp.ts         # YYP project operations
│       ├── scripts.ts     # Script creation
│       ├── objects.ts     # Object creation
│       └── sprites.ts     # Sprite creation
├── dist/                  # Built output
├── package.json
├── tsconfig.json
└── README.md

Technical Details

Dependencies

  • @modelcontextprotocol/sdk - MCP protocol implementation
  • @bscotch/yy - Safe GameMaker YY/YYP file parsing and writing
  • zod - Runtime type validation

Architecture

This server uses the stdio transport protocol to communicate with Cursor. Each tool:

  1. Validates input parameters using Zod schemas
  2. Loads the existing YYP file (or creates a new one)
  3. Performs file system operations for the resource
  4. Updates the YYP resource list
  5. Writes the updated YYP back to disk

The @bscotch/yy library ensures all YY/YYP files maintain proper structure and don't get corrupted.

Limitations & Future Enhancements

Current limitations:

  • Sprite metadata (width, height, bbox) uses defaults - manual adjustment may be needed
  • No support for rooms, sounds, or other advanced resources yet
  • Event GML files are created with stub comments

Potential enhancements:

  • Add update_script to modify existing script code
  • Add delete_resource for removing resources
  • Add create_room for room creation
  • Add build_project using GameMaker CLI/Igor
  • Integration with @bscotch/gml-parser for code refactoring

🔗 References & Resources

Core Technologies

GameMaker Resources

🤝 Contributing

This is an experimental project exploring AI-assisted GameMaker development. Contributions, ideas, and feedback are welcome!

Areas for improvement:

  • Additional resource types (rooms, sounds, shaders, etc.)
  • Better sprite metadata handling
  • GML code parsing and refactoring
  • Project build automation
  • Integration with GameMaker CLI/Igor

📄 License

MIT License - See LICENSE file for details

❤️ Special Thanks


Built with ☕ while developing Soulbound. Created for the GameMaker community. Made possible by Butterscotch Shenanigans' amazing open-source tools.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选