Overview
The ReFormer MCP server is a service for AI assistants (Claude Code, Cursor, another MCP client):
through it an assistant creates and changes forms built on @reformer/*. The service builds the
form module, checks the types, checks the form against the task and answers API questions, and the
assistant does not need to read the library sources.
The service is closed and paid. The open @reformer/mcp client connects it to
your IDE: the reference, the tools and the form build run in the service, and everything that
concerns your files stays on your machine.
A form follows the unified contract: model β one schema β one createForm bundle β rules β
behavior β wizard (step flow) β rendering. The tool set (REFORMER_SURFACE=tools) adds the package
documentation as resources, reference tools (API selection, a JSDoc index of public symbols,
recipes, code checking) and workflow prompts.
Accessβ
The service is in early access: the REFORMER_API_KEY key is issued on request. Write to us β the
contacts (Telegram, email) are in the site footer.
For teams that cannot send form code and specs to an external service, the service is deployed on
your own infrastructure under a license, by agreement. The client points to it with the
REFORMER_SERVICE_URL variable.
Why MCP β in numbersβ
The same agent with the server builds and edits forms more reliably, faster and cheaper than from the package documentation alone. On a user journey β 13 requests over one order form on three stacks, Claude Sonnet 5.5, December 2, 2026 β all 39 requests with the server in its default mode passed the required checks against 79% without MCP, the journey took 1.4 times less time and cost 2.7 times less. The summary infographic and the journey grid by request are on the Measurements: with MCP and without page.
What is MCP?β
Model Context Protocol is an open standard from Anthropic for integrating AI assistants with external tools and data. An MCP server declares to the client:
- Resources β access to documentation and data
- Tools β tools the AI can call
- Prompts β ready-made workflow scenarios
Connectionβ
The client runs through npx, the key is passed in an environment variable. Registering it in
Claude Code:
claude mcp add --transport stdio reformer -e REFORMER_API_KEY=<your key> -- npx -y @reformer/mcp
The client binary is called reformer-mcp: after npm install -g @reformer/mcp you can write
reformer-mcp instead of npx -y @reformer/mcp. Check the connection with claude mcp list. Setup
for other IDEs (Cursor, Windsurf, Cline) is in the Quick Start.
| Variable | What it sets |
|---|---|
REFORMER_API_KEY | the service key; without it the cloud service does not answer, and the client says so right away |
REFORMER_SERVICE_URL | the service address without a path β for a service deployed on your side; the cloud one by default |
REFORMER_SURFACE | what the server gives the assistant: code-guided-dsl (default), tools, β¦ β see surfaces |
REFORMER_TARGET | the stack of the project forms: core, renderer-react or renderer-json β when the request names none |
REFORMER_TRACE_FILE | a call log to a file (JSON Lines) |
What stays with you and what goes to the serviceβ
On your machine the client:
- reads and writes the form directory;
- type-checks with your project's compiler and your package versions;
- reads the form spec;
- saves
report_issuereports to.reformer/issue_reports.
With each call the client sends the service only what that call needs: the files of the form
directory, the spec, the type-check result and the component catalog of @reformer/ui-kit if it is
installed. The service returns writes as operations β the client writes them to disk. MCP does not
work without a network connection and a key.
Surfacesβ
The REFORMER_SURFACE environment variable picks what the server gives the assistant:
| Surface | What the assistant sees | When to use |
|---|---|---|
code-guided-dsl (default) | two tools, search and execute; both take JavaScript | create or change a form |
tools | the tool set, the prompts and the resources | API reference for your own code, checking code with validate_form, the intent as a form_build argument |
code, guided, code-guided | experiments: Code Mode (one run_script) and profiles for small models | measurements |
Default: search and executeβ
The assistant writes the form as one program in execute: reformer.form opens it with the whole
task text (or a spec by specPath), method chains record edits, save() applies them, and the
server builds the module and checks the form against the task. Every file of the form folder β from
the server's response β is written by the client, the JSX markup of @reformer/core too.
// execute β one program
const f = reformer.form({ dir: 'form', target: 'renderer-react', task: '<the whole task>' });
f.add('email', 'Email').required().email();
f.add('company', 'Company')
.required()
.showWhen((m) => m.customerType === 'company');
console.log(await f.save());
The answer names every difference of the form from the task with the chains that fix it β until it
says "Checked against the task: no differences found.". search only reads: the current form, the
task and the parsed spec, the builder methods. Details are in
Tools.
The tool setβ
claude mcp add --transport stdio reformer -e REFORMER_API_KEY=<your key> -e REFORMER_SURFACE=tools -- npx -y @reformer/mcp
Use the tool set when the assistant writes its own code next to a form and needs API reference,
when your tooling sends the intent to form_build itself, or when the client works
through prompts.
Toolsβ
The server gives this set with REFORMER_SURFACE=tools.
| Tool | Role |
|---|---|
get_context | Assembled context for one step of building a form: operator, signature, example, rules and anti-patterns within a token budget. |
choose_api | Pick an operator for a requirement stated in your own words ("field B is available only when A is filled") β with an example and common confusions. |
get_symbol_docs | Full JSDoc of a public symbol from any @reformer/* package: signature, parameters, all @examples, source. |
find_recipe | A recipe by scenario keyword (wizard, form-array, json-schema) or a symbol's @example. |
search_docs | Full-text search across the documentation of all packages, for when you can describe the task but cannot name it. |
list_symbols | Public symbols by kind, package or part of the name. |
plan_form | A draft <dir>/form.intent.json from a markdown form spec: fields, rules from the spec tables, steps, arrays. Never overwrites an existing file. |
form_build | A form module on disk from the intent: compiling, type-checking and writing the files; the form is its code, hand-written code stays. |
validate_form | Pre-run checking: code (kind: "code"), JSON schema, behavior cycles, the whole bundle and the module's file names (kind: "layout"). |
report_issue | Save a problem you found and its solution as a separate JSON report in <project root>/.reformer/issue_reports. |
A form is created along one path: the grammar form_build {"grammar":"base"} β
form_build {"dir": β¦, "intent": {β¦}} (or a plan_form draft from a spec β form_build {"dir": β¦}).
A built form is its code: a change sends only its records, hand-written code stays. The former
generate_form and the aliases validate_json_schema and check_behaviors were removed in 7.0.
The builder AI assistant uses the same service with the same key: it takes the reference and the form build from a description from the service and edits the form in the editor. Each tool is described in detail in Tools.
Packagesβ
| Package | License | What for |
|---|---|---|
@reformer/mcp | β | the service client for IDEs, the reformer-mcp binary: form files, type-checking, the spec and reports stay local, everything else runs in the service |
@reformer/form-intent | MIT | the FormIntent contract for your own tools: types, normalization, printing validation and behavior rules to code, layout document types, findCycle |
The FormIntent compiler (parsing the model's answer, the form_build verdict, building the module)
is part of the service and is not published as a separate package.
Promptsβ
Only in the REFORMER_SURFACE=tools set: every prompt leads through form_build.
start-hereβ the entry point: the canonical workflow of the unified contract and a map of which prompt, tool or resource to use at each step.add-featureβ add one capability to a form built withform_build:feature=validation|behavior|array|wizard.to-rendererβ switch the rendering approach:FormRendererover the same TS schema (renderer-react) or the schema as a format 2 JSON document + a registry (renderer-json); the model, rules, behavior and thecreateFormcall stay the same.reviewβ a cross-package code review checklist.
Prompts do not reach every client: some agents have no access to prompts/list. That is why the same
content is also available in the tools (get_context, plan_form, form_build with grammar) and
in the reformer://guide resource. Parsing a spec and creating a form from a description are done
by the plan_form and form_build tools, or by reformer.form with the task in the default surface.
Resourcesβ
Only in the REFORMER_SURFACE=tools set.
reformer://guideβ the server's self-documentation: the workflow, the form file layout, which tool and resource to use at each step.reformer://catalogβ a JSON map of packages and their sections (slug + title) β where to get section URIs from.reformer://statusβ what the client found in the project: the@reformer/*packages, whether type-checking is available. Read it when a tool reports an environment problem.reformer://docs/<pkg>β the full documentation of one package, for examplereformer://docs/cdk.<pkg>is the name without the@reformer/prefix:core,cdk,ui-kit,renderer-react,renderer-json, β¦reformer://docs/<pkg>/<section>β a single section by its slug (the list is inreformer://catalog).
The resources contain no list of symbols or signatures β use
list_symbols/get_symbol_docs; for scenario recipes usefind_recipe, for keyword search usesearch_docs.
Nextβ
- Quick Start β the key and IDE setup in 2 minutes.
- Tools β each tool in detail.
- Prompts β workflow scenarios.
- Examples β usage scenarios.