mcpField
F
Formhaus

Formhaus

Local
formhaus.devDeveloper Tools8Updated today

About Formhaus

@formhaus/mcp is an MCP server for checking Formhaus form definitions against the @formhaus/core engine. It is for agents and developers building or operating forms, with offline validation and path simulation alongside optional Formhaus Cloud management tools.

Key features

  1. 01Validate form definitions
  2. 02Apply known safe fixes
  3. 03Simulate multi-step form paths
  4. 04Generate translation templates
  5. 05Publish forms and manage submissions

Use cases

  1. 01Check a form definition before use
  2. 02Apply safe fixes to definition issues
  3. 03Test paths and validation with sample answers
  4. 04Publish forms and inspect submissions

MCP support

The server exposes offline definition, simulation, translation, and capability tools to MCP clients, plus Formhaus Cloud tools for publishing and form management. Cloud operations use the Formhaus API and, for most tools, require an API key.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"ignsm-formhaus": {
"command": "npx",
"args": [
"-y",
"@formhaus/mcp"
]
}
}
}
Run commandnpx -y @formhaus/mcp

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npm@formhaus/mcp0.6.3

Tools

8

Saved tool list · updated 1w ago

ParameterTypeRequiredDescription
definitionanyYesFormhaus form definition as a JSON object or a JSON string.

Details

From the project README

@formhaus/mcp

formhaus-dev/formhaus MCP server

MCP server that lets AI agents check Formhaus form definitions against the real @formhaus/core engine. Runs over stdio. Requires Node 22.12 or later. The checks need no account or key.

validate_definition, fix_definition, simulate_path, translation_template, capabilities and example_definitions run offline. The other tools publish forms, read submissions and manage settings in Formhaus Cloud. If the app has its own backend, keep the data there and don't publish without the user's consent.

Setup

Claude Code plugin, with the Formhaus skills:

claude plugin marketplace add formhaus-dev/formhaus
claude plugin install formhaus@formhaus

Inside a Claude Code session, /plugin marketplace add formhaus-dev/formhaus and /plugin install formhaus@formhaus do the same after a confirmation prompt.

Claude Code, server only:

claude mcp add formhaus -- npx -y @formhaus/mcp

Claude Desktop (claude_desktop_config.json) and Cursor (.cursor/mcp.json):

{
  "mcpServers": {
    "formhaus": {
      "command": "npx",
      "args": ["-y", "@formhaus/mcp"]
    }
  }
}

Tools

ToolInputOutput
validate_definitiondefinition (object or JSON string){ valid, issues }. Each issue has code, severity, a JSON pointer path, message, hint and, when a repair is known, fixes ({ title, safe, patch } with an RFC 6902 JSON Patch)
fix_definitiondefinition (object or JSON string){ definition, applied, valid, issues }: the definition with every safe fix applied, the fixes applied and the issues left
simulate_pathdefinition, answers, optional actions (next, back, skip) and overlayActive step path with visible fields, action trace, validation ({ valid, issues }), field errors, wouldSubmit, submitValues. Group item fields appear as paths such as participants.0.email
capabilitiesnoneField types, sections, repeatable groups, field props, validation rules, condition operators, step and route semantics, translation catalogs, keys and overlay addresses, adapters
translation_templatedefinition, lang, optional prefixoverlay skeleton with the source texts, suggested file name and slots with address, key, placeholders and hash
example_definitionsoptional idList of bundled examples, or one definition
publish_formdefinition, optional form_id, email, success_message, redirect_urlform_id, endpoint, hosted_url, embed_snippet, react_snippet, dashboard_url, warnings
list_formsnoneForms the API key reaches with status, version, submission count and endpoint
get_submissionsform_id, optional limit, cursorsubmissions and next_cursor
update_form_settingsform_id, optional webhook_url, notify_mode, success_message, redirect_url, statusform_id, status, success_message, redirect_url, notify_mode, webhook_url, masked webhook_secret
get_webhookform_idurl and the masked secret
reveal_webhook_secretform_idform_id and the full webhook_secret. Marked as a non-read-only, sensitive tool. Whether the client asks first depends on its permission settings

publish_form, list_forms, get_submissions, update_form_settings, get_webhook and reveal_webhook_secret call Formhaus Cloud at https://api.formhaus.dev. All but publish_form need FORMHAUS_API_KEY in the server environment, and publish_form uses it when set. An account key (fh_live_...) reaches every form and all six tools. An agent key (fh_agent_..., returned once by the first keyless publish_form) reaches only the forms it created, and update_form_settings, get_webhook and reveal_webhook_secret need an account key. The server reads FORMHAUS_API_KEY from its own environment, not from the project .env. Add it to the env of the formhaus server in your MCP client config (for example .mcp.json with ${FORMHAUS_API_KEY} and the value in your shell or a gitignored .env your client loads), then restart the server. FORMHAUS_API_BASE overrides the API URL. The server also sends short usage instructions to the client on connect.

simulate_path applies answers as initial values, with group answers as arrays of item objects, then presses the actions in order, or Next until the last step or the first blocking error. errors covers visited steps only. Custom validators, onStepValidate and lifecycle hooks are not run. The capabilities are also available as the formhaus://capabilities resource.

The tool handlers are exported for use without MCP:

import { simulatePathTool, validateDefinitionTool } from '@formhaus/mcp';

const report = await validateDefinitionTool({ definition });
const result = await simulatePathTool({ definition, answers: { kind: 'business' } });

See the MCP guide for example output. A remote MCP server for Formhaus Cloud is also available. npx formhaus sets up the server in the coding agents on your machine; see formhaus.

License

MIT

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.