
FormLM
me.formlmv0.5.2Updated Oct 10, 2026
Build AI-powered forms, scored assessments and professional reports on FormLM, by natural language.
Overview
FormLM lets an assistant build AI-powered forms, scored assessments and reports on formlm.me from natural-language prompts.
- What it does
- The server exposes the FormLM CLI over stdio with 9 tools and 6 resources. An assistant can plan and generate a form or assessment, add fields, define scoring dimensions and bands, style pages, lay out report pages and widgets, configure an AI expert for interpretation, and publish the result with share links. Read-only snapshot and doctor commands report module state and quality findings.
- When to use it
- Use it when you want an assistant to create, edit, audit or publish FormLM forms, scored assessments, exams, surveys or reports from a description rather than through the web editor. It suits batch generation and verification of several apps in one session.
- Requirements
- Runs locally as an npm package (@formlm/cli) via npx, so Node.js 18 or newer is required. A FormLM account is needed; authentication uses an access token or an in-chat email verification code. The optional FORMLM_TOKEN secret can be supplied, and FORMLM_BASE_URL defaults to the hosted service. Network access to the FormLM server is required.
Installation
In SourceWeft
- Open FormLM in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
formlm-cli
The official CLI & MCP Server for FormLM — let AI Agents build and manage your forms directly.
[npm version] [License: MIT] [Node.js] [MCP Registry]
Keywords: FormLM CLI, MCP Server, AI Agent form builder, form automation, assessment platform CLI, Claude MCP, Cursor MCP, AI-powered forms, formlm-cli, npm CLI tool
What is FormLM?
FormLM is an AI-powered form & assessment platform. It lets you build smart forms, scoring quizzes, and professional evaluation reports — all with natural language instructions.
With formlm-cli, you can control FormLM directly from your terminal or plug it into any AI Agent (Claude, Cursor, GPT, etc.) as an MCP Server — no UI needed.
Visit the official website: https://formlm.me
formlm-cliis listed in the official MCP Registry asme.formlm/cli— search "formlm" in any MCP-capable client (Claude Desktop, Cursor, VS Code Copilot, Codex CLI) to install it.
What's New in v0.5.0
Hardening round driven by real agent field reports (batch runs of 50 apps), plus a second pass that re-checked every reported item against the code and machine-verified all documented commands.
-
share publishnow defaults to anonymous access (--access visitor) and exposes--access / --perm / --days / --no-style; a newshare setsubcommand passes the raw server parameters through, so "anyone + permanent" no longer requires calling the internal API. Previously publish was hard-wired toform-type all, which requires login — anonymous respondents got the login page. -
expert config --enableno longer self-destructs: the value is forwarded space-separated (--enable true) and the server accepts it again. Before,--enable=truewas rejected as an unknown option, the whole command was discarded, yet the envelope still reported success. -
Parameter errors are no longer reported as success:
picoclivalidation failures now map tocode != 0/ok:falseinstead of hiding the error text insidedatawithcode:0. -
Uniform machine output:
snapshotandauth statusnow honour--json/FORMLM_JSON=1with the same{ok,code,message,data}envelope as everything else, and human guidance lines moved to stderr, so stdout is a single parseable line. -
app removeis a real alias ofapp delete;app listgained--all / --limit / --page / --with-urls;app urlsreturnsshareToken,published,shareType/Perm/Dayand absolute https URLs. -
New
doctorcommand (and MCPformlm_doctortool): one read-only call per app covering scoring coverage, dead/empty experts, styling, unexpected certificate pages, language consistency (--expect-lang,--deepscans widget text) and share access + reachability. -
New
snapshot --summarycompact audit profile (counts, dimension names, report pages, expert flags, share type/perm/day + shareToken) — batch verification no longer needs to parse full module payloads. -
Resume after the plan cache expires:
smart plan --save-plan <file>+smart execute --plan-file <file>(the server plan cache is ~10 minutes, and the docs now say so). -
Retry/backoff: read-only commands retry with exponential backoff on 408/429/5xx; writes are never auto-retried. Tunable via
FORMLM_RETRIES/FORMLM_TIMEOUT_MS. -
report page remove --name "结业证书"resolves page names server-side;report page updateverifies the page exists (opt into upsert with--upsert); write confirmations are compact;widget removenow persists (it previously returned success without saving). -
smart generatenow exists as a resumability-preserving wrapper overplan → execute×N → (--publish) → (--doctor), and the README finally matches the command surface. Earlier versions documented asmart generatethat was never implemented (the first command every agent ran, and it failed). -
Generation is now pin-able:
smart plan --dimensions "A|B|C"fixes the scoring dimension names and count,--app-namefixes the app display name,--dry-runvalidates a prompt without leaving a residue app. Unpinned dimensions used to be renamed/recounted by the AI, forcing page↔app rework (batch measurement: 11/13 pages). -
Docs are now machine-verified against the command surface: every
formlm-cli …example in README/INSTALL is executed and checked for unknown/missing options (149 examples, 0 drifts), so documented commands cannot silently diverge again. -
smart planoutput carries structuredmodules/missingModules, so callers can detect coverage gaps (e.g. noexpertfor non-consultation plans) without parsing prose; the raw exec403now lists the whitelisted command set.
What's New in v0.2.1
- Field ID validation:
field add --idnow enforces snake_case regex (^[a-zA-Z0-9_]+$) - Snapshot
--mdflag: Unified JSON output by default, with optional--mdfor markdown format - Error handler: Missing required options now print usage hints instead of bare error messages
- Server-side fixes: SessionContext appId sync, ScaleCommand B5 reversal removal, CLI --app extraction
What's New in v0.2.0
The MCP architecture has been completely redesigned from the ground up:
- 34 flat tools → 6 layered tools + 6 knowledge resources
- Intelligence Layer:
formlm_generatewraps the server-side AssessAgent pipeline - Domain Knowledge: 6 MCP resources expose SKILL.md files directly to AI agents
- State Awareness:
formlm_snapshotaggregates all module states in one call - P0 Constraints: Embedded directly in command descriptions — AI sees them every time
Architecture
Installation
Requires Node.js ≥ 18.
For a detailed step-by-step guide (including MCP setup for Claude Desktop / Cursor / Codex CLI / Windsurf / Cline), see INSTALL.md.
Quick Start
1. Login
2. Smart Pipeline (AI-recommended)
Creation is a two-phase pipeline (plan → execute per module). smart generate is the one-shot wrapper
of the same steps when you do not need per-module control:
Or step by step (recommended for batches — every step is resumable):
⚠️ Module coverage depends on planType. Only
consultationplans include anexperttask;assessment / exam / report / survey / learndo not.smart planprints a warning when a module is missing — add an expert explicitly withformlm-cli expert config --app <appId> --name ... --role ... --kbText ....
⚠️ Styling: the
connectmodule of the pipeline applies the visual style. If you skip the pipeline and use Direct Commands instead, you MUST runconnect style apply-all, otherwise the form keeps the plain unstyled look.
3. Get All App URLs (after creating)
4. Enable the Data API (form backend for any page)
5. Beautify Your Form (if using Direct Commands)
6. Direct Commands (for fine-grained control)
7. Use as MCP Server
This starts the MCP Server (stdio transport) with 9 tools + 6 resources, ready for AI Agents to connect.
Command Reference
Smart Pipeline (AI-recommended)
There are two ways in: smart plan + smart execute (explicit, resumable — recommended for batches),
or smart generate, which is a thin wrapper over exactly those steps:
Pinning vs. improvising. By default the Plan AI invents dimension names/count and the app name, which breaks page↔app consistency in batch runs. Use
--dimensionsto pin the dimension list (exact names + count) and--app-nameto pin the display name; verify afterwards withsnapshot --summary(it reportsdimNames).
--dry-runvalidates a prompt/spec and deletes the probe app again (the server always creates an app when planning), so experimentation leaves no residue.Success is machine-readable:
smart executereturnsdata.taskStatus(success/error), andsmart generatereturns{appId, modules:[{module,status,error}], publish, doctor, resumeHint}— trust those fields, not the human wording. On a mid-run failure the app is kept andresumeHintgives the exact resume command.
Snapshot
Measured: 5 apps × 7 module queries = 35 requests in ~13s in a single process, versus one cold Node process per app before (the old serial-subprocess pattern took roughly 5× that, plus no connection reuse).
snapshot is client-synthesized: it fans out to the 6 assess <module> query commands. There is no
server-side assess snapshot, so calling that over raw POST /api/v1/mcp/exec returns 403 by design — loop
the 6 queries yourself when you need HTTP-side batching. If a module fetch fails, the result carries
_errors / _degraded (treat it as unknown, not as "empty module").
Doctor (read-only quality audit)
Output is the standard envelope; ok:false + exit 1 when a fail-level finding exists, so batch drivers
can gate on it. Each finding carries a ready-to-run fix command. Read-only — it never writes.
Skill Documents
Auth
Profile (multi-account)
App
Field
Scale (Dimensions & Scoring)
Connect (Page Styling & Visual Design)
Report (Pages & Widgets)
Expert (AI Interpretation)
Boolean flags are forwarded space-separated (
--enable true), never--enable=true— the server parses them with picocliarity 0..1.expert configenables the agent by default; pass--enable falseto configure it while leaving it switched off.
Share (Publish & Access)
Validity rule (server-side): only
--days 1..30are honoured as a finite window;0,forever, or anything above 30 normalizes to permanent (sentinel3650000). There is no 90-day/1-year publish window on this channel.Verifying "anyone can access":
curlreturning 200 on the share URL proves nothing — the SPA shell answers 200 even behind the login gate. Useshare verify(or readshare query's type/perm/day triple).
smart execute --module sharevsshare publish: the pipeline's share module applies the plan's publish settings;share publishis the explicit, idempotent CLI entry that also guarantees anonymous + permanent defaults and prints the final URLs/shareToken. Re-runningshare publishis safe. If you never styled the app, publish auto-applies a default style first (30-120s AI generation) — pass--no-styleto skip that.
The Data API turns a form into an HTTP data endpoint: POST JSON to the endpoint (or use the /form path for native HTML forms), read records back via the query endpoint, and hand the ?help URL to an AI agent so it can discover the API on its own.
MCP Integration
FormLM CLI works as a standard MCP Server over stdio and plugs into any MCP-compatible AI platform — Claude Desktop, Cursor, Codex CLI, Windsurf, Cline, etc.
⚠️ macOS/Linux users: desktop AI clients often launch the MCP server without your full terminal PATH, which can cause
command not founderrors. See INSTALL.md → Step 4 for theenv.PATHfix, per-platform config file locations (including Codex CLI's TOML format), and the full setup guide.
No token? No problem. If you omit
FORMLM_TOKEN, the AI will prompt you to authenticate via theauth_logintool — paste your Access Token (from formlm.me → Workspace → Account Settings; recommended), complete an in-chat email verification-code login viaauth_email_code(no browser needed), or use email + password directly in the chat.
Available MCP Tools (9)
Available MCP Resources (6)
Environment Variables
Scripting & Batch Use
Envelope: { "ok": bool, "code": int, "message": string, "data": object|null } — data is always parsed
(no double-decoding needed), and validation/parameter errors now come back with a non-zero code
instead of hiding the error text inside data while reporting success.
Status codes
Raw POST /api/v1/mcp/exec whitelist
The exec channel accepts 3-token command paths only (assess <module> <action>). Everything else returns
403 not allowed via MCP by design — notably assess snapshot and assess field … do not exist on the
server (they are client-side wrappers), so batch HTTP consumers must call the underlying queries:
Throughput notes
- Every CLI invocation is a fresh Node process plus its own HTTP calls; for large batches, run independent apps concurrently (the server tolerates moderate parallelism) rather than serially.
snapshot/doctorfan out their module queries in parallel; use--module/--summaryto keep payloads small.- Slow server? Raise
FORMLM_TIMEOUT_MSandFORMLM_RETRIESinstead of hand-rolling retry loops. - Batch over many apps inside one process:
snapshot --apps …/doctor --apps …, or import the built module directly (import { execCommand } from '@formlm/cli/dist/exec.js') and loop — HTTP connections are reused and there is no per-app Node cold start.
Version coupling (CLI ↔ server)
Some commands rely on server options added together with them; against an older server they fail with a
visible 400 Unknown option … (never a silent success, thanks to the false-success guard):
Links
- Website: https://formlm.me
- Platform: Sign up and start building at formlm.me
- GitHub: https://github.com/formlm/cli
- npm: https://www.npmjs.com/package/@formlm/cli
Contact
Have questions, feedback, or need help getting started?
Feel free to reach out — we're happy to help.
License
MIT © FormLM
Source: README.md at commit 0e7b839
Tools
0Version history
1- v0.5.2LatestOct 10, 2026


