Dm Mcp — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited Dm Mcp (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
为 DM3 游戏引擎打造的 Model Context Protocol (MCP) 服务器,让 AI 助手帮你开发游戏!
npm install -g dm3-mcp-server安装后,可以直接使用 npx 运行:
npx dm3-mcp-server#### Windows 用户推荐安装路径
为了避免路径问题,强烈建议将项目放在简单的路径下:
C:\dm-mcpD:\dm-mcpC:\Users\你的用户名\Documents\项目\dm-mcp(路径太长,可能有中文)#### 1. 克隆项目
Windows 用户(推荐):
# 打开命令提示符(CMD)或 PowerShell
cd C:\
git clone https://github.com/LegnaOS/dm-mcp.git
cd dm-mcpmacOS/Linux 用户:
git clone https://github.com/LegnaOS/dm-mcp.git
cd dm-mcp#### 2. 安装依赖
npm install💡 如果没有安装 Node.js,请先从 nodejs.org 下载安装(推荐 LTS 版本)
npm run buildWindows 用户:
# 在 Git Bash 中运行
bash scripts/verify-setup.sh
# 或者手动检查
dir dist
dir dm_fwmacOS/Linux 用户:
./scripts/verify-setup.sh看到 "✅ 所有检查通过!" 就说明安装成功了!
📚 完整配置指南:查看 MCP 客户端配置指南 了解所有支持的编辑器(Kiro、Claude Desktop、Cursor、VS Code、Windsurf、Zed、Cody 等)的详细配置方法。
以下是 Kiro IDE 和 Claude Desktop 的快速配置示例。其他编辑器请查看完整配置指南。
#### 使用 npx(推荐,无需关心路径)
{
"mcpServers": {
"dm3": {
"command": "npx",
"args": ["dm3-mcp-server"],
"env": {
"DM3_PROJECTS_DIR": "C:/dm-projects"
},
"disabled": false,
"autoApprove": [
"dm3_list_projects",
"dm3_search_docs",
"dm3_get_api_reference"
]
}
}
}#### 使用本地安装(从源码)
##### Windows 用户配置示例
假设你将项目安装在 C:\dm-mcp:
.kiro/settings/mcp.json{
"mcpServers": {
"dm3": {
"command": "node",
"args": ["C:/dm-mcp/dist/index.js"],
"env": {
"DM3_PROJECTS_DIR": "C:/dm-mcp/projects"
},
"disabled": false,
"autoApprove": [
"dm3_list_projects",
"dm3_search_docs",
"dm3_get_api_reference"
]
}
}
}或者使用双反斜杠:
{
"mcpServers": {
"dm3": {
"command": "node",
"args": ["C:\\dm-mcp\\dist\\index.js"],
"env": {
"DM3_PROJECTS_DIR": "C:\\dm-mcp\\projects"
},
"disabled": false
}
}
}##### macOS/Linux 用户配置示例
{
"mcpServers": {
"dm3": {
"command": "node",
"args": ["/绝对路径/dm-mcp/dist/index.js"],
"env": {
"DM3_PROJECTS_DIR": "/绝对路径/projects"
},
"disabled": false,
"autoApprove": [
"dm3_list_projects",
"dm3_search_docs",
"dm3_get_api_reference"
]
}
}
}#### Windows 用户配置
%APPDATA%\Claude\claude_desktop_config.json快速打开方式:
Win + R%APPDATA%\Claudeclaude_desktop_config.json{
"mcpServers": {
"dm3": {
"command": "node",
"args": ["C:/dm-mcp/dist/index.js"],
"env": {
"DM3_PROJECTS_DIR": "C:/dm-mcp/projects"
}
}
}
}#### macOS 用户配置
~/Library/Application Support/Claude/claude_desktop_config.json{
"mcpServers": {
"dm3": {
"command": "node",
"args": ["/绝对路径/dm-mcp/dist/index.js"]
}
}
}#### ❌ 错误示例
"args": ["dm-mcp/dist/index.js"] // 相对路径,不推荐
"args": ["C:\dm-mcp\dist\index.js"] // 单反斜杠,JSON 中会出错
"args": ["C:\\用户\\文档\\dm-mcp\\dist\\index.js"] // 包含中文,可能出错#### ✅ 正确示例
"args": ["C:/dm-mcp/dist/index.js"] // 推荐:使用斜杠
"args": ["C:\\dm-mcp\\dist\\index.js"] // 可以:双反斜杠
"args": ["D:/Projects/dm-mcp/dist/index.js"] // 可以:D盘也行在 AI 助手中输入:
使用 dm3_create_project 创建一个名为 "my_rpg" 的项目,标题为 "我的RPG游戏"项目会自动包含完整的 DM3 引擎和框架!
使用 dm3_generate_actor 在 my_rpg 项目中创建主角:
- 名称:勇者
- 生命值:1000
- 魔法值:500
- 速度:5使用 dm3_generate_item 创建生命药水:
- 项目:my_rpg
- 名称:生命药水
- 类型:consumable
- 可堆叠:true使用 dm3_search_docs 搜索 "技能系统"查看 examples/create-rpg-game.md 了解如何创建一个完整的 RPG 游戏。
| 工具 | 说明 |
|---|---|
dm3_create_project | 创建新的 DM3 游戏项目 |
dm3_build_project | 编译项目 |
dm3_run_project | 运行项目 |
dm3_list_projects | 列出所有项目 |
| 工具 | 说明 |
|---|---|
dm3_generate_actor | 生成角色配置 |
dm3_generate_item | 生成道具配置 |
dm3_generate_skill | 生成技能配置 |
dm3_generate_window | 生成窗口配置 |
| 工具 | 说明 |
|---|---|
dm3_search_docs | 搜索文档 |
dm3_get_api_reference | 获取 API 参考 |
dm3_get_example | 获取代码示例 |
dm3_get_control_doc | 获取控件文档 |
| 工具 | 说明 |
|---|---|
dm3_validate_lua | 验证 Lua 语法 |
dm3_check_encoding | 检查文件编码 |
dm3_lint_config | 检查配置规范 |
dm3_check_resources | 检查资源引用 |
详细 API 文档请查看 docs/API.md
dm-mcp/
├── dm_fw/ # 内置 DM3 框架(完整引擎)
│ ├── App.exe # DM3 引擎可执行文件
│ ├── Dat/ # 引擎数据文件
│ └── MapRes/ # 地图资源
├── src/ # 源代码
│ ├── index.ts # MCP 服务器入口
│ ├── tools/ # 工具实现
│ │ ├── project.ts # 项目管理
│ │ ├── generator.ts # 代码生成
│ │ ├── docs.ts # 文档查询
│ │ └── validator.ts # 代码验证
│ └── utils/ # 工具函数
│ └── encoding.ts # GBK 编码处理
├── docs/ # 文档
├── examples/ # 示例
└── scripts/ # 脚本项目内置完整的 DM3 v0.9.3 引擎(dm_fw 目录),创建项目时会自动复制到项目目录。这意味着:
DM3 引擎要求所有 Lua 文件使用 GBK 编码,MCP 服务器会自动处理:
使用 Handlebars 模板引擎,生成符合 DM3 规范的代码:
欢迎贡献!请查看 CONTRIBUTING.md 了解如何参与。
查看 CHANGELOG.md 了解版本更新历史。
开始你的游戏开发之旅吧! 🎮✨
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.