PE

phaserjs/editor-mcp-server

浏览器自动化

本页由 AI 翻译,技术细节请以原文为准。 查看原文

36 stars 4 forks 质量 50 趋势 12

相位编辑器的MCP服务器

概览

该模型上下文协议(MCP)服务器提供了将LLM与相位编辑器v5连接的工具。它设计为无缝兼容相位编辑器的集成开发环境功能,使开发者能够高效创建和管理游戏场景。 该服务器作为NPM包提供,你可以在MCP主机配置中使用它,如Cursor、Claude Desktop、GitHub Copilot等...... 这是一个光标配置文件示例: 该服务器连接 Phaser Editor v5 桌面应用的运行实例。项目中的所有更改均通过运行中的 Phaser Editor 实例完成。 该服务器提供的所有工具均专门针对相位编辑器功能(如 、 、 等)进行定制。这些工具旨在直接修改您的项目源代码。

概述(AI 翻译)

该模型上下文协议(MCP)服务器提供了将LLM与相位编辑器v5连接的工具。它设计为无缝兼容相位编辑器的集成开发环境功能,使开发者能够高效创建和管理游戏场景。

安装

该服务器作为NPM包提供,你可以在MCP主机配置中使用它,如Cursor、Claude Desktop、GitHub Copilot等…

这是一个光标配置文件示例:

该服务器连接 Phaser Editor v5 桌面应用的运行实例。项目中的所有更改均通过运行中的 Phaser Editor 实例完成。

编码

该服务器提供的所有工具均专为配合相位编辑器功能设计,如场景编辑器、资产包编辑器等。这些工具并非用于直接修改项目源代码。但当与Cursor等代码编辑器配合使用时,服务器可同时与相位编辑器的自定义文件和项目源代码交互,创建强大集成的开发流程。

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

MCP Server for Phaser Editor v5

This Model Context Protocol (MCP) server provides the tools to connect an LLM with Phaser Editor v5. It is designed to work seamlessly with Phaser Editor’s IDE features, allowing developers to create and manage game scenes efficiently.

Installation

This server is available as an NPM package and you can use it in the configuration of MCP hosts like Cursor, Claude Desktop, GitHub Copilot, etc…

This is an example of a configuration file for Cursor:

{
    "mcpServers": {
        "phaser-editor": {
            "command": "npx",
            "args": ["@phaserjs/editor-mcp-server"]
        }
    }
}

This servers connects with a running instance of the Phaser Editor v5 desktop application. All changes on the project are made through the Phaser Editor running instance.

Coding

All tools provided by this server are specifically tailored to work with Phaser Editor features, such as the Scene Editor, Asset Pack Editor, and others. These tools are not intended for direct modification of your project’s source code. However, when used alongside code editors like Cursor, the server enables simultaneous interaction with both Phaser Editor’s custom files and the project’s source code—creating a powerful, integrated development workflow.

We recommend starting with one of the Phaser Editor project templates, which are preconfigured for seamless integration with Cursor. These templates include all necessary configurations and the rules for the LLMs to understand how to interact with Phaser Editor’s custom files and the project’s source code.

Using Training Levels to Enhance LLM-Based Content Generation

Large Language Models (LLMs) excel at generating new content when provided with high-quality, contextual examples. This is especially effective for game level generation. To take full advantage of this capability, it’s a good practice to create training levels that clearly express the concepts and elements you want the model to replicate.

Why Training Levels Matter

Training levels serve as concrete examples that define the structure and logic of your game. These examples help the LLM understand the components involved and how they interact, enabling it to generate new levels that align with your design.

For example, if you’re working with tilemap-based levels, you can create a TrainingLevel scene that includes the key objects used in your game. To improve clarity and semantic understanding:

  • Use one layer per object.
  • Name each layer with a descriptive identifier, such as pipe, cloud, or mountain.

This organization helps the LLM detect patterns and apply them to new content generation tasks.

Visual Tools Help—but Context is Key

在 GitHub 查看完整 README

安装

npx @phaserjs/editor-mcp-server
新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "phaser-editor": { "command": "npx", "args": ["@phaserjs/editor-mcp-server"] } } }