Frostdev

KilnAPI reference Guide

The Kiln MCP server: tools for modding agents

Kiln provides an MCP server (Model Context Protocol) for AI agents that write Kiln mods. It answers what an agent otherwise greps the skill for (an API's signature and the mod API that added it, a capability row and what to do when it is off, a schema, what a release changed) and checks what the agent wrote (a manifest, a block, a data pack, a kiln.log), with a link to the wiki page for each answer. Locally it also runs the kiln commands an agent needs while it works: new, build, lint, test, deploy and reload, logs, blocks and the catalog.

It extends the agent skill (agent/skills/kiln-modding, https://frostdev.io/kiln/agents); the skill says when to use it. The server is the kiln CLI (kiln mcp), so it ships wherever the CLI does: in the SDK (sdk/kiln, sdk/kiln.exe) and with the runtime.

Two ways to use it

Hosted Local
Address https://frostdev.io/kiln/mcp (Streamable HTTP) kiln mcp (stdio)
Tools the knowledge and checking tools the same, plus the project tools
Data the newest release's the release your kiln came with, else the newest
Touches your files never only the paths you or the agent pass, and the project's settings
# Claude Code
claude mcp add --transport http kiln https://frostdev.io/kiln/mcp        # hosted
claude mcp add kiln -- kiln mcp                                           # local (kiln on PATH)
# Codex (~/.codex/config.toml)
#   [mcp_servers.kiln]
#   url = "https://frostdev.io/kiln/mcp"                                   # hosted
#   command = "kiln"; args = ["mcp"]                                       # or local
# Cursor (.cursor/mcp.json)
#   {"mcpServers": {"kiln": {"url": "https://frostdev.io/kiln/mcp"}}}
#   {"mcpServers": {"kiln": {"command": "kiln", "args": ["mcp"]}}}

Any other client: Streamable HTTP at https://frostdev.io/kiln/mcp, or the command kiln mcp over stdio. No sign-in.

Tools

Knowledge and checks (hosted and local; they read only the server's data bundle, never run what you paste):

Tool Gives
kiln_search ranked snippets of the wiki, the docs and the skill's references for a question
kiln_api one type or member: signature, summary, the mod API and Kiln release that added it, experimental or not, the capability row it needs, a docs link
kiln_api_list the types of a service (Combat, Kiln.Items) or the members of a type
kiln_capabilities capability rows (state on the last checked build, why not), the reason codes with their meaning and the fix
kiln_schema the schemas of kiln.mod.json, JSON blocks, data packs, registries and Kiln's other mod files: a summary or a part
kiln_validate a pasted kiln.mod.json, block file or data pack checked against its schema and the linter's file rules (64 KiB at most)
kiln_versions releases, the mod API of each, the channel, and which releases a manifest's apiVersion or kiln range accepts
kiln_examples code examples from the guides for a topic
kiln_release_notes one release's notes
kiln_known_issues the known problems and their fixes
kiln_explain_log findings in a pasted kiln.log (256 KiB at most): a missing member, a capability that is off, a refused mod, a hook overlap, a mod that faulted
kiln_request_api a drafted GitHub issue for a missing API (title, body, a prefilled link) and the #mod-dev alternative; it never posts anything

Project tools (local only; thin wrappers over the kiln command of the same name, with --json): kiln_new, kiln_build, kiln_lint, kiln_test, kiln_deploy (with reload), kiln_reload, kiln_logs, kiln_blocks, kiln_catalog_query, and kiln_status (the installed Kiln and SDK, the game folder, the servers and labs found). They never start the game client and touch saves only through the CLI's own safe commands (none of these tools does).

Also: the prompt new_kiln_mod (plan a new mod: side, clients, blocks first) and the resource kiln://skill/SKILL.md.

references/mcp.md in the skill has the tools with their arguments.

The data bundle

The knowledge tools read one zip, kiln-mcp-data-<version>.zip, built from the repository at release time (in the release's sdk/ folder, next to kiln):

In the zip From
bundle.json format, Kiln version, mod API, commit, time, file count
api-index/*.md agent/skills/kiln-modding/references/api-index/
api-history.tsv managed/api-history.tsv (which release and mod API added each public member)
capability-members.tsv [RequiresCapability] on public members of managed/ (member, capability name)
skill/ the skill: SKILL.md, references/*.md
docs/ docs/kiln/**/*.md without the release notes and translations
wiki/ the wiki pages (frostdev.io src/content/kiln-wiki/*.md), when the site checkout is there
release-notes/*.md docs/kiln/release-notes/
schema/ schema/*.schema.json, schema/schemas.json, schema/registry/*.json
roadmap.json tools/release/roadmap/roadmap.json (released and upcoming builds)
known-issues.json frostdev.io public/kiln/known-issues.json, when the site checkout is there

kiln mcp bundle --repo <checkout> --version <v> --out <zip> builds it (tools/release/release.sh does, into sdk/). Where kiln mcp finds its bundle: --data <zip or folder>, $KILN_MCP_DATA, the bundle next to the kiln executable (kiln-mcp-data-<this Kiln's version>.zip, else the newest there), <Kiln data folder>/cache/mcp/, else it downloads https://frostdev.io/kiln/downloads/<version>/sdk/kiln-mcp-data-<version>.zip (or the hosted server's current one, https://frostdev.io/kiln/mcp/data.zip) once into that cache. --offline never downloads. The SDK file on Nexus Mods does not carry the bundle (Nexus cannot scan an archive inside an archive), so a kiln from it downloads it on first use, or takes the zip from the GitHub release with --data.

Running the hosted kind yourself

kiln mcp --http 127.0.0.1:8777 --data kiln-mcp-data-0.2.0-dev.32.9.zip     # http://127.0.0.1:8777/mcp

Only the knowledge tools are there: an HTTP server never lists or runs a project tool. Options: --path (default /mcp; frostdev.io uses /kiln/mcp), --allowed-host (repeatable; default the loopback names), --trust-proxy (count rate limits per X-Real-IP, for a server behind nginx), --rate <per minute> (default 120 per address), --max-body <bytes> (default 512 KiB). GET <path>/health answers {"ok": true, "bundle": ..., "modApi": ...}; the bundle version is also in serverInfo. The server logs counts and errors once a minute, never a request's content (https://frostdev.io/kiln/privacy). A changed --data file is picked up within a minute.

Design

  • One codebase. crates/kiln-cli/src/mcp/: mod.rs (the command, both transports), bundle.rs (reading and building the bundle), knowledge.rs (the knowledge tools, pure functions of a bundle and the arguments), explain.rs (the kiln.log rules), local.rs (the project tools), http.rs (limits, CORS, health, counts). The protocol is the official Rust SDK, rmcp (stdio: transport-io; HTTP: transport-streamable-http-server, served with hyper). Its protocol versions are every version the SDK knows (2024-11-05 up to 2026-07-28), so older clients work.
  • Read-only over HTTP. The HTTP handler is built without the project tools: tools/list does not show them and a tools/call of one is an unknown tool. The knowledge tools take text, never a path; kiln_validate uses the linter's isolated mode (kiln_manage::lint::lint_isolated: the pasted text alone, no catalog, no file around it), and the hosted process reads nothing but its bundle. The HTTP server runs stateless (no sessions to keep), each POST answered with an SSE stream, so nginx must not buffer it.
  • Limits. Per-address token bucket (--rate), body cap (--max-body, also nginx's client_max_body_size), per-argument caps (a query 300 characters, kiln_validate 64 KiB, kiln_explain_log 256 KiB), at most 32 requests at once, a 20 s budget per tool call. CORS: any origin, the MCP headers allowed and exposed, preflight answered.
  • The bundle is plain files plus bundle.json. Parsing happens when the server loads it (about a second for a release's), so a fixture bundle in a test is a small folder of the same files.
  • Local tools run this kiln again (std::env::current_exe()) with --json and the arguments as argv (no shell), with a time limit per command (build 10 minutes, the rest 2), and return its JSON. kiln mcp itself holds no lock on Kiln's data folder; each command it runs takes its own, as on the command line.
  • Hosting: tools/mcp-host/ (Dockerfile around the release's Linux kiln, compose file, deploy.sh, the nginx locations), runbook in the frostdev.io repository (ops/kiln-mcp.md). The container runs on loothing-vps like the relay: host network, 127.0.0.1:8777, read-only, the bundle folder mounted read-only. tools/release/publish.sh puts each release's bundle in /opt/frostdev-downloads/kiln/mcp/ and moves current.zip there forward.
  • Tests: crates/kiln-cli/tests/mcp_*.rs against crates/kiln-cli/tests/mcp-fixture/ (a small bundle): the handshake, tools/list, each knowledge tool, refusals and caps, the log rules, the issue draft, HTTP streaming, limits and read-only, and a stdio round trip.

Enshrouded is a trademark of Keen Games GmbH. Kiln is unofficial.