CodeCraft

io.github.TanerTalas由 GitHub 账号 TanerTalas 发布v0.1.0更新于 Nov 2, 2026

Checks whether generated Minecraft Bedrock content will actually load. Nine read-only tools.

发布方自己的服务:Craft

已验证Streamable HTTP可网页运行开发者工具AI 与机器学习

概览

AI 生成的概览

只读 MCP 服务器,用于检查生成的 Minecraft 基岩版行为包与资源包内容是否真的能在游戏中加载。

可以做什么
  • 检查可行性与版本号:请求能否实现,以及 min_engine_version、模块版本和各 format_version 应填什么
  • 查询模式与标识符:各类文档的必填字段,以及某个 minecraft: 标识符是否存在、类型和方块状态
  • 按官方模式与命令索引校验 JSON 文件和单条命令
  • 用真实 TypeScript 编译器校验行为包脚本,并校验游戏外的 Python 自动化脚本
  • 一次调用审查整个包,按文件类型选用相应校验器,并执行模式无法覆盖的检查(标识符、文件名、清单类型、贴图、组件、Molang、配方)
适用场景
当助手编写或审查 Minecraft 基岩版附加内容,希望找出那些能通过模式校验却会在游戏中静默失效的字段、标识符、命令或 API 调用时使用。它是测量层而非生成器:只报告问题,修复由调用方完成。
运行要求
需要一个远程 Streamable HTTP 端点(仅 POST、无状态),在客户端中作为自定义连接器添加;未声明认证、API 密钥或环境变量。工具界面为英文。
安装前请注意
九个工具均声明为只读,服务器称不写入、不保留用户数据,但它是第三方托管端点,请求会经过该主机。校验不等于保证:README 列出八类能通过校验却仍在游戏中出错的错误,部分检查(组件名、路径与音效引用)仅为警告。索引由定时任务刷新,可能延迟数小时,数据最旧约一天零五小时。

安装

在 SourceWeft 中

  1. 打开 控制台中的 CodeCraft,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Web executable,通过 Streamable HTTP。 远程服务在工作区中配置后即可从网页运行时运行。

交给智能体安装

把这段提示词粘贴到 Claude Code、Codex、Cursor 等智能体,或 SourceWeft 对话中。智能体会读取该服务器的安装指南,先向你展示发布者、端点和登录方式,经你同意后再把它添加到你的客户端。密钥不会写进任何命令。

阅读 https://sourceweft.com/mcp/io.github.TanerTalas%2Fcodecraft/install.md,并按其中说明把这个 MCP 服务器接入我的客户端。修改任何配置之前,先告诉我它的发布者、端点和登录方式,等我确认。不要把 API 密钥写进命令或我会提交的文件;问我密钥应从哪里获取。

查看智能体所依据的安装指南

其他 MCP 客户端

把它添加到你客户端的 mcpServers 配置中。

{
  "mcpServers": {
    "codecraft": {
      "type": "http",
      "url": "https://codecraft-ashy-seven.vercel.app/mcp"
    }
  }
}

README

CodeCraft

A validation and data-lookup MCP server for Minecraft Bedrock.

You bring the model. CodeCraft does not generate anything — it measures whether what was generated is actually going to work.

[data] [license] [MCP] [Bedrock]

Usage site · setup, tool reference, and where validation ends


Why it exists

In Bedrock, a field name recalled slightly wrong produces output that silently does not work. No error message, no red line. Everything looks fine until the pack is loaded into the game.

A real example — both lines pass the schema, one of them never loads:

diff
  "modules": [-   { "type": "javascript", "entry": "scripts/main.js" }+   { "type": "script", "language": "javascript", "entry": "scripts/main.js" }  ]

With the top line the pack did not appear in the behavior pack list at all. It did not even raise an error. The javascript type is left over from before 1.16 and the schemas keep it for backward compatibility, but it does not load with @minecraft/server 2.x. The schema says "valid type", the game says "I cannot load this type".

That one line was measured in the real game (30-08-2026). There are seven more classes like it, all in docs/VALIDATION-LIMITS.md with ContentLog evidence.

CodeCraft closes that gap: values are read from version-pinned data, and output is validated against the official schema and against a real tsc.

Nine tools

All nine are read-only. The server writes nothing, sends data nowhere, and keeps no user data.

ToolWhat it returnsWhen
check_feasibilityWhether Bedrock can do this at all; if not, why, and the alternativeBefore anything is generated
get_version_infoWhich version number goes where, which modules, which format_versions are validBefore writing files
get_schemaThe required fields and the field list at that nodeBefore writing files
lookup_idWhether an identifier exists, what type it is, what block states it hasFor every identifier recalled from memory
validate_jsonSchema errors carrying a JSON pointerFor every JSON file produced
validate_commandCommand, arity, selector, block stateBefore handing over a command
validate_scriptReal tsc diagnostics with line, column and TS codeFor every API call
validate_pythonSyntax, embedded commands, and the /connect envelopeFor out-of-game automation scripts
review_packEvery file, plus the things a schema structurally cannot seeThe last step before handing anything over

The order is not alphabetical, it is the order of use — and tools/list preserves it.

Setup

Endpointhttps://codecraft-ashy-seven.vercel.app/mcp
Usage sitecodecraft-ashy-seven.vercel.app — four pages: home, setup, tools, limits
TransportStateless Streamable HTTP, POST only
AuthenticationNone — the endpoint is read-only and returns nothing private

In Claude, open Customize → Connectors (not Settings; older guides point there, and there is no custom connector field on that screen):

  1. Customize → Connectors → add a custom connector
  2. Paste the endpoint address
  3. Save

Three things you should see once it connects — a single "it worked" is not enough:

  • The tool count is 9, complete
  • The client classifies them as "read only tools" — a separate permission class
  • Our own titles are visible, e.g. "Can Bedrock do this" — the tool surface is English

More: docs/MCP.md

Where validation ends

This table is not advertising, it is a statement of limits. "Passed validation" and "works in the game" are not the same thing — eight classes of error get through validation and break in the game, and every one of them was measured in a real game.

ClassDoes the schema catch itWhat CodeCraft does
A · identity referenceNo, but resolvablecheckIdentities finds it
A′ · path / sound referenceNocheckReferences, checkSounds — warning; the game itself says nothing
B · filename ↔ identifierStructurally nocheckFileNames tells you the right name
C · texture / asset referenceNocheckAssets checks against the vanilla atlas
D · valid but not intendedStructurally nocheckPatterns measures the known patterns
E · manifest that never loadsNo — the stale type is still listedcheckManifest names the right type
F · MolangNo — nothing looks inside the stringcheckMolang; unknown-query is an error, measured in game
G · component nameNo — both schema sources let it throughcheckComponents, still a warning (see below)
H · version-dependent required fieldStructurally no — the requirement rides on format_versioncheckRecipes — error, the recipe never loads

F and G are worth reading twice. The game rejects both exactly as hard — the whole block definition is dropped. F was raised to error and G was not, because our own component index has a measured gap of 126 names. What decides severity is not only "what does the game do" but "how complete is our list" — two separate questions, and neither is answered without measuring.

The tools find and report, they do not write — the endpoint is read-only, fixing is the caller's job. The half that is still open is written down too: docs/VALIDATION-LIMITS.md

Bedrock has five separate version numbers

This is where the confusion hurts most, and it is half the reason the tool exists:

NumberExampleWhere it is used
Marketing number26.40Announcements only. Never written into any file
Game / data version1.26.40.5data/ folder name, data indexes
min_engine_version[1, 26, 40]manifest.json — a three-part array
@minecraft/server module version2.9.0manifest.json → dependencies
format_version1.21.100, 1.13.0, 2Content files

format_version is an axis of its own and has nothing to do with the game version: it is the schema version of that file type. Block 1.21.100, feature rule 1.13.0, spawn rule 1.8.0, manifest 2. It does not change when the game version changes.

The module version is a trap of its own — the game version arrives embedded inside the prerelease tag:

2.9.0                              stable module version (npm "latest")2.11.0-beta.1.26.50-preview.27     module 2.11.0, game 1.26.50-preview.27

Correct values are not recalled, they are read from the schema — which is exactly what get_schema and get_version_info are for.

Architecture

mermaid
flowchart LR    C["Claude<br/>you bring the model"] -->|MCP / HTTP| M["packages/mcp<br/>9 read-only tools"]    M --> V["packages/validator<br/>ajv · tsc · commands · python"]    V --> K["packages/knowledge<br/>lookup · version resolution"]    K --> D[("data/<br/>indexes per version")]    P["pipeline/<br/>daily cron"] -->|produces| D    U["Mojang · Blockception<br/>npm · MicrosoftDocs"] -->|fetches| P

Dependencies point one way: mcp → validator → knowledge → data. Nothing imports backwards.

There is no build step. Node runs the .ts files directly; tsc is used only for type checking and, as a subprocess, for validate_script.

Data

data/ is not a database — it is a set of indexes that live in git and are versioned there. Eight collectors produce it from four upstream sources.

SourceWhat it givesLicense
Mojang/bedrock-samplesBlock/item/entity identifiers, command grammar, texture atlasMinecraft EULA — derived facts only
Blockception/…json-schemasThe schemas validation runs againstBSD-3-Clause
npm @minecraft/*Script type definitionsMIT
MicrosoftDocs/minecraft-creatorRelease notesCC-BY-4.0

A scheduled GitHub Action refreshes it, and a freshness check reports when the data goes stale. The cron is set to 05:00 UTC — but it does not run then. All five scheduled runs measured on 03-09-2026 started late, the earliest by 4h24m, ~5h on average; GitHub queues scheduled jobs and delays them under load. So the indexes can be up to 1 day + ~5 hours old.

Raw upstream data never enters the repo. Only derived facts are indexed: whether an identifier exists, the name of a field, a version number. Reasoning and measurements: docs/SOURCES.md

Invariants

  1. The validation layer never calls an LLM. No package in this repo depends on an LLM SDK. The rule is not a sentence, it is a measurement: packages/mcp/test/no-llm.test.ts
  2. The endpoint is read-only. All nine tools carry readOnlyHint
  3. data/ lives in git. No database
  4. The free tier is a requirement, not a constraint
  5. Raw upstream data never enters the repo

How measurement is written down

In this repo, "it works" and "it was measured" are different things. A claim is written only once it has been measured, and how it was measured is written next to it — with the date. A measurement that turns out wrong is not deleted; it is struck through and where it went is written down.

That is what the "measured (date)" comments in the code are: each one is the record of something that really did break, once.

Documents

The documents below are in Turkish — they are the developer's notebook. The product surface is English: the tools, the server instructions, every finding and error message, and the site.

CLAUDE.mdArchitecture, invariants, version axes
docs/MCP.mdEndpoint, setup, tool contract
docs/mcp-kullanim.mdThe tools in real use, measurement log
docs/site-icerik.mdThe usage site's content and measurement log
docs/SOURCES.mdData sources and their licenses
docs/VALIDATION-LIMITS.mdWhat validation does not catch
docs/COMMANDS.mdCommand validation and its scope
docs/WEBSOCKET.mdThe WebSocket bridge and its measurement

License

The code is Apache-2.0. The repo carries third-party content under three separate licenses and produces data derived from a fourth — THIRD-PARTY-NOTICES.md says which is which.


NOT AN OFFICIAL MINECRAFT PRODUCT. NOT APPROVED BY OR ASSOCIATED WITH MOJANG OR MICROSOFT.

来源:README.md,提交 a5c59f5

工具

9

check_feasibility

Can Bedrock do this

Checks whether a user request can be built with a behavior pack and the @minecraft/server API. If it is blocked, returns why, the evidence behind that rule, and a workable alternative. Call this BEFORE writing any code or JSON: input simulation, file system access and network access do not exist in the Bedrock scripting API, and those are the most commonly hallucinated APIs.

输入参数request必填

get_version_info

Bedrock version and schema context

Returns which version number belongs where for this game version: min_engine_version (a three-part array), @minecraft/server module versions, the valid format_version values for every document type, and the list of recognised document types. format_version is an axis of its own and is unrelated to the game version. Call this before writing any behavior pack file.

输入参数version

get_schema

Schema summary for a document type

Summarises the schema of a Bedrock document type: required fields, valid format_version values, and the name, type and description of every field on that node. It does not return the raw schema — that is far too large. When a node has many fields the summary narrows and says what was shortened in the truncated field; use path to descend into a child node for full detail. Call this before writing a file to learn which fields are required and what format_version must be.

输入参数pathtype必填version

lookup_id

Verify a vanilla identifier

Tells you whether a minecraft: identifier actually exists in this version and what kind it is (block, item, entity, biome, effect, enchantment, feature, dimension, camera preset, particle, potion). For a block it also returns the valid block states and the values they accept. An identifier without a namespace is treated as minecraft:. Verify every identifier here before writing it — an identifier that does not exist fails silently in the game.

输入参数id必填version

validate_json

Validate Bedrock JSON against its schema

Validates a behavior or resource pack JSON file against the official schema and returns the JSON pointer, the violated rule and a readable message for every error. Unexpected property names and the valid enum values are included in the message. Run every JSON file you produce through this before handing it to the user.

输入参数type必填content必填version

validate_command

Validate a Bedrock command

Validates a single Bedrock command line against the official command index: does the command exist, does the argument count match, are the selectors and block states valid. When no overload matches it returns the valid usages, and it tells you whether the command requires cheats. Run every command through this before giving it to the user. `execute ... run <command>` chains are resolved: the command after run is validated too, including nested execute.

输入参数line必填version

validate_script

Compile an @minecraft/server script

Compiles a behavior pack script with the real TypeScript compiler against the actual @minecraft/server type definitions for that version. Returns diagnostics with line, column, TS error code and message, and reports which module versions it compiled against. Catch non-existent APIs and calls removed in later versions here — Bedrock scripting APIs written from memory are the most common source of output that fails silently.

输入参数code必填channelversion

validate_python

Validate an automation script

Validates a Python automation script that runs OUTSIDE the game, on three axes: Python syntax (using the real interpreter), Minecraft commands embedded in the script (against the official command index), and the shape of the /connect WebSocket message envelope. For behavior pack scripts use validate_script instead — Python does not run inside a pack. The embedded command check is the most valuable one: a command written from memory can look syntactically fine and still do nothing in the game. Only strings starting with / are treated as commands. If syntax could not be checked, syntaxChecked is false in the result; ok:true alone does not mean the syntax is valid.

输入参数code必填version

review_pack

Validate a whole pack

Validates every file of a behavior or resource pack in one call: it applies the right validator to each file (JSON schema, script compilation, command syntax) and then runs the checks a schema structurally cannot do — identifier consistency, filename rules, manifest module type, texture keys, component names, Molang queries and loot/trade table paths. This is the LAST step before handing a pack to the user, and it is both faster and broader than validating each file separately.

输入参数files必填version

版本历史

1
  1. v0.1.0最新Sep 16, 2026

评分

已满足适用检查项的 75%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通必需25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式必需10 分
  • 已列出工具必需15 分
  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分

其他 Craft 集成