XTend MCP 0.1
XTend MCP exposes the canonical XTend documentation, the curated RMT AI Developer Kit, and deterministic RMT tooling through the Model Context Protocol. The server is an access layer, not a new source of truth.
Sources of truth
docs/de,docs/en, anddocs/menu.jsonremain the documentation sources.- The generated AI Developer Kit remains the curated RMT knowledge source.
- The compiler, linter, repair reporter, and Maraca define executable behavior.
@ccslabs/xtend-mcp/knowledgeis the shared retrieval and context implementation for MCP and XTend LLM.
The deterministic knowledge build copies complete Markdown files, including headings and code fences. Every resource retains its locale, slug, source path, and SHA-256. MCP does not use the shortened browser search index as a source.
For RMT authoring conventions and the underlying language boundary, continue with the RMT vNext authoring guide.
Installation and stdio
XTend MCP requires Node.js 24 or newer.
npm install --global @ccslabs/xtend-mcp
xtend-mcp stdio --workspace /path/to/project
stdout is reserved exclusively for MCP frames; connection and error logs go to stderr. Unless --allow-workspace-write is present, the write-capable repair tool is not registered.
VS Code
The XTendRMT VSIX bundles the same npm artifact and registers its stdio server automatically. Its settings are:
xtend.mcp.enabled, enabled by default;xtend.mcp.nodePath, an optional Node.js 24-or-newer path;xtend.mcp.allowWorkspaceWrites, disabled by default.
For a globally installed binary, .vscode/mcp.json can contain:
{
"servers": {
"xtend": {
"type": "stdio",
"command": "xtend-mcp",
"args": ["stdio", "--workspace", "${workspaceFolder}"]
}
}
}
Resources and prompts
The server publishes paginated DE/EN catalogs at xtend://docs/catalog/{locale}, canonical Markdown at xtend://docs/{locale}/{slug}, and the AI Kit manifest, references, recipes, and compact representation below xtend://rmt/kit/.... Read the returned nextUri to fetch the next catalog page.
Six MCP prompts are derived from the six Kit recipes. Their domain content is not duplicated in the server.
Tools
xtend_knowledge_searchandxtend_knowledge_contextreturn bounded results or RAG context with provenance.xtend_rmt_diagnosticsandxtend_rmt_compile_checkinspect RMT sources without build output.xtend_maraca_plancreates a deterministic plan.xtend_rmt_repair_planplans safe, fingerprinted repairs.xtend_rmt_apply_safe_repairstransactionally applies explicitly selected repairs when the server has write opt-in and the host confirms execution.
Source tools accept exactly one of source or a workspace-relative path. Absolute paths, traversal, and symlink escapes are rejected. XTend application code is never executed.
Local Streamable HTTP
XTEND_MCP_HTTP_TOKEN="a-long-random-token" \
xtend-mcp http --port 31415 --workspace /path/to/project
The server binds exclusively to 127.0.0.1. /mcp requires a process-scoped Bearer token and validates Host and Origin. Without the environment variable, a token is generated securely and printed once to stderr. Remote operation and OAuth are outside version 0.1.
XTend LLM catfooding
XTEND_LLM_KNOWLEDGE_MODE=direct|mcp|shadow controls knowledge access. direct uses the shared core in-process, mcp uses only the bundled stdio server, and shadow compares both while returning the direct response. The default changes to mcp only after the defined parity and stability gates pass.
Request limits and compatibility
Every tool call has a fixed aggregate budget of 256 object keys and array entries, counted recursively across all arguments, including unknown fields, before schema validation or tool execution. This guard applies to both stdio and HTTP. Oversized calls return an MCP tool error; the server remains available. Existing per-field limits still apply, including at most 100 repair IDs, two scopes and six domains. Unknown nested input that was previously discarded by a schema can now be rejected by this budget.
HTTP POST bodies are limited to 4 MiB (4,194,304 UTF-8 bytes), including the complete JSON-RPC envelope, whitespace and JSON escaping. Bodies over the limit receive HTTP 413, whether Content-Length is supplied or the body is streamed. Host, Origin and Bearer-token checks run before the SDK reads the body. The byte limit is separate from the inline-source limit of 2,000,000 JavaScript string code units: multibyte text or escaped characters can fit the source schema but exceed the HTTP limit. Use a workspace-relative path for large sources, subject to the existing workspace and file safeguards. Stdio has the aggregate tool-input budget but not this HTTP body limit.
The server SDK 2.3.0 upgrade alone does not enable its optional input guard. XTend explicitly configures maxToolInputElements: 256 and maxRequestBodySize: 4194304 to address the validation-allocation risk described in GHSA-46jr-4wx8-v453. These bounds do not promise immunity to every memory-exhaustion scenario or change authentication, workspace-write permissions or network exposure.