Formhaus

io.github.ignsm由 GitHub 账号 ignsm 发布v0.6.3更新于 Nov 1, 2026

Validate Formhaus form definitions and simulate multi-step paths against the real engine.

已验证STDIO仅桌面效率与工作流开发者工具

概览

AI 生成的概览

本地 MCP 服务器,让助手校验 Formhaus 表单定义、自动应用安全修复并模拟多步骤路径,也可在 Formhaus Cloud 发布和管理表单。

可以做什么
  • 校验表单定义,返回带 JSON 指针、提示与建议补丁的问题列表
  • 自动应用安全修复并重新检查剩余问题
  • 用答案、next/back/skip 动作和 overlay 模拟多步骤路径,输出可见字段、错误与提交值
  • 查询引擎能力、生成翻译 overlay 模板、读取内置示例定义
  • 在 Formhaus Cloud 发布表单、列出表单、读取提交、更新设置以及查看或揭示 webhook 信息
适用场景
适合在开发或调试 Formhaus 表单时,让助手按真实引擎检查定义、测试分支路径或在发布前准备翻译。若希望助手通过 Formhaus Cloud 发布表单并查看提交,也可使用。
运行要求
通过 npx 以 stdio 在本地运行,需要 Node 22.12 或更高版本。校验、修复、模拟、能力查询、翻译与示例均离线可用,无需账号或密钥。云端工具需要在服务器自身环境中设置 FORMHAUS_API_KEY(不读取项目 .env);账号密钥可访问全部表单,代理密钥仅限其创建的表单。可用 FORMHAUS_API_BASE 覆盖 API 地址。
安装前请注意
云端工具会把数据发送到 api.formhaus.dev,publish_form 会创建线上表单。reveal_webhook_secret 返回完整 webhook 密钥,被标记为敏感且非只读,客户端是否先询问取决于其权限设置。update_form_settings 会修改线上表单设置。建议数据保留在自有后端,未经用户同意不要发布。

安装

在 SourceWeft 中

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

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

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:

bash
claude plugin marketplace add formhaus-dev/formhausclaude 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:

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

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

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:

ts
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

来源:packages/mcp/README.md,提交 cf472c1

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

14
  1. v0.6.3最新Oct 18, 2026
  2. v0.6.2Oct 18, 2026
  3. v0.6.1Oct 16, 2026
  4. v0.5.2Oct 16, 2026
  5. v0.5.0Oct 15, 2026
  6. v0.4.2Oct 15, 2026
  7. v0.4.0Oct 15, 2026
  8. v0.3.4Oct 14, 2026
  9. v0.3.3Oct 14, 2026
  10. v0.3.2Oct 14, 2026
  11. v0.3.1Oct 12, 2026
  12. v0.2.1Oct 11, 2026
  13. v0.2.0Oct 11, 2026
  14. v0.1.2Oct 9, 2026

评分

已满足适用检查项的 50%

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

  • 近 30 天内可连通25 分

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

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分