minecraft-mod-mcp-server
minecraft-mod-mcp-server
用于 Minecraft 模组包开发的 Cloudflare Workers MCP 服务器。生成 FTB Quests 章节和任务、KubeJS 脚本(武器、护甲、配方),验证 SNBT/配置文件,并提供诊断检查。
部署
此 MCP 运行在 Cloudflare Workers 上。部署后,可通过以下地址访问:
https://<your-worker>.<your-subdomain>.workers.dev/mcp本地开发使用 wrangler dev 在部署前进行预览。
工具
FTB Quests 生成
工具 | 描述 |
| 生成完整的 FTB Quests 章节文件(SNBT 格式),包含多个任务、依赖和奖励 |
| 生成单个 FTB Quests 任务定义(item/kill/advancement/checklist 类型) |
| 为 FTB Quests 章节/任务 ID 生成 16 位随机十六进制 ID |
| 生成 |
| 生成 |
KubeJS 脚本生成
工具 | 描述 |
| 生成 KubeJS 武器注册代码(攻击伤害、速度、耐久度、技能) |
| 生成 KubeJS 护甲套装注册代码(头盔/胸甲/护腿/靴子及等级定义) |
| 生成 KubeJS 有型合成配方代码(3x3 合成模式及材料映射) |
| 生成 KubeJS 无型合成配方代码(仅材料和输出) |
| 生成 KubeJS 熔炼/熔炉/烟熏炉配方代码 |
| 生成 KubeJS 配方移除代码(覆盖或禁用原版/模组配方) |
验证与诊断
工具 | 描述 |
| 验证 SNBT 文件语法(检查未匹配的花括号、Count 格式问题等) |
| 检查 KubeJS 脚本中的常见错误(已弃用的 API、Rhino 引擎兼容性问题) |
| 生成 KubeJS 物品/护甲纹理路径指南,以确保文件放置正确 |
特性
FTB Quests 生成 — 完整的 SNBT 输出,用于带依赖、奖励和分组的任务书
KubeJS 脚本生成 — 武器、护甲、有型/无型/熔炼配方及配方移除
SNBT 验证 — 在语法错误导致游戏内运行时问题之前捕获它们
KubeJS 诊断 — 检测已弃用的 API 和 Rhino 引擎兼容性问题
零网络依赖 — 所有生成均为纯算法实现;不调用外部 API
Cloudflare Workers 部署 — 通过 Workers 边缘网络在全球范围内低延迟运行
安装(本地开发)
先决条件
Node.js 18+
npm
设置
cd minecraft-mcp-server
npm install本地运行
npm start
# or
npx wrangler dev然后通过 MCP 客户端连接到 http://localhost:8788/mcp。
部署到 Cloudflare
npm run deployMCP 客户端配置
部署后,将以下内容添加到 MCP 客户端配置中:
{
"mcpServers": {
"minecraft-mod": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-stdio"],
"env": {
"MCP_SERVER_URL": "https://<your-worker>.<your-subdomain>.workers.dev/mcp"
}
}
}
}或者如果使用基于 HTTP 的 MCP 客户端:
{
"mcpServers": {
"minecraft-mod": {
"url": "https://<your-worker>.<your-subdomain>.workers.dev/mcp"
}
}
}将 <your-worker> 和 <your-subdomain> 替换为您实际的 Cloudflare Workers 部署 URL。
架构
minecraft-mcp-server/
├── src/
│ ├── index.ts # Cloudflare Worker entry point + MCP server setup
│ ├── types.ts # Cloudflare Workers environment types
│ ├── tools/
│ │ ├── quest.ts # FTB Quests generation logic
│ │ ├── kubejs.ts # KubeJS script generation logic
│ │ └── validate.ts # SNBT validation + KubeJS diagnostics
│ └── templates/
│ ├── quest_chapter.ts
│ ├── kubejs_item.ts
│ └── kubejs_recipe.ts
├── __tests__/
│ └── unit.test.ts # Unit tests (fully offline, 49 tests)
├── vitest.config.ts # Vitest config (ESM, globals: false)
├── package.json # Dependencies (@modelcontextprotocol/sdk, agents, zod, wrangler)
└── wrangler.jsonc # Cloudflare Workers deployment config该 MCP 服务器基于 @modelcontextprotocol/sdk v1.x 构建,并使用 agents 库的 createLegacyMcpHandler 部署为 Cloudflare Worker。
测试
npm test
# or
npx vitest run全部 49 个单元测试均可完全离线运行——测试无需网络或 Cloudflare 账户。
平台兼容性
方面 | Windows | macOS | Linux |
本地开发( | ✅ | ✅ | ✅ |
单元测试( | ✅ | ✅ | ✅ |
生产环境部署 | ✅ (Cloudflare) | ✅ (Cloudflare) | ✅ (Cloudflare) |
MCP 客户端连接 | ✅ | ✅ | ✅ |
此 MCP 完全运行在 Cloudflare Workers 基础设施上。唯一的平台依赖是拥有一个启用了 Workers 的 Cloudflare 账户。所有生成逻辑均为纯 JavaScript/TypeScript,完全跨平台。
许可证
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Create, validate, edit, export (markdown/svg/png/mermaid), and search JSON Canvas files.
MEOK AGENTS.md Linter MCP — validates the cross-vendor coding-agent spec (Cursor / Claude Code /
Read and write your Fresh Jots notes from Claude, Cursor, and any MCP client.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/dcd887/minecraft-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server