⌨️

Developer Zone

Build with FormLM in code: a form Data API that stores submissions from any static page or AI app, and an open-source CLI + MCP server that lets AI agents build and manage your forms.

🔌 Data API
⌨️ formlm-cli
🤖 MCP Server
🔓 Open Source (MIT)

🧰 The Developer Toolkit

2 Core Tools
🔌

Data API — a form backend over HTTP

Publish any FormLM form and get an endpoint that accepts JSON or native HTML form POSTs. CORS is fully enabled, unknown fields can auto-create their own columns, and every endpoint documents itself in Markdown at ?help — readable by humans and AI agents alike.

⌨️

formlm-cli — terminal + MCP server

An MIT-licensed npm package that controls FormLM from the terminal: generate complete assessment apps from natural language, manage fields, scales, reports, and publishing. Run formlm-cli mcp and it becomes an MCP server any AI agent can plug into.

The Data API: POST data, get storage

One endpoint, two formats, zero servers to run.

Every published form exposes a Data API endpoint. POST JSON to it and each request becomes a stored, queryable record — with a data-management UI, CSV export, and aggregate statistics for free. It works from static sites, local HTML files, scripts, IoT devices, and AI-generated pages, because CORS is enabled on both reads and writes.

Data API operation demo
Data API in action — publish, POST, and query back
# Write a record from anywhere — curl, fetch, or an AI agent
curl -X POST https://formlm.me/api/v3/share/<your-token> \
  -H "Content-Type: application/json" \
  -d '{"data":{"name":"Ada","score":92}}'

# Read it back — paginated JSON, up to 1000 records per page
curl "https://formlm.me/api/v3/share/<your-token>/query?page=1&size=20"

# The endpoint documents itself in Markdown — for you or your agent
curl "https://formlm.me/api/v3/share/<your-token>?help"
EndpointMethodWhat it does
/{token}POSTStore a record — JSON body, canonical shape {"data":{...},"meta":{...}} or flat objects
/{token}/formPOSTStore a native HTML form submission (application/x-www-form-urlencoded)
/{token}?helpGETReturn the endpoint's own Markdown API documentation — readable by AI agents
/{token}/queryGETPage through stored records as JSON
/{token}/summaryGETAggregate statistics over the collected records

Proof it holds up in production: the feedback form on FormLM's own contact page is a static form that POSTs straight to a Data API endpoint — the exact pattern documented above, running on our marketing site today.

Dive deeper into the use case that matches your stack:

formlm-cli: the terminal is a first-class client

npm package, MIT license, Node.js ≥ 18.

Install it, log in once — copy the Access Token from formlm.me → Account Settings (no password needed), or use the in-terminal email verification-code login — and the whole platform becomes scriptable. The highlight is smart generate: one natural-language instruction runs the server-side agent pipeline and produces a complete assessment app — form design, scoring dimensions, report pages, and visual styling included.

# Install and generate a full assessment app from one sentence
npm install -g @formlm/cli

formlm-cli auth login --token <your-token>
# token: formlm.me → Account Settings → Access Token → Copy
# no token? run: formlm-cli auth login  → choose the email verification-code option

# Form + scales + report + styling, all in one command (60–300s)
formlm-cli smart generate \
  --input "Create a workplace stress assessment with 10 questions, 3 dimensions, and detailed score interpretations"

# Get the fill-in, editor, and data-management URLs
formlm-cli app urls --app <appId>

# Publish it
formlm-cli share publish --app <appId>

For fine-grained control there are 50+ commands across eight modules: app, field, scale, connect (page styling), report, expert, share, and profile — plus snapshot to dump all module states as JSON or Markdown, and skill to print the domain rule documents that keep generated content well-formed.

MCP server: let AI agents drive FormLM

stdio transport · 8 tools · 6 resources · works with any MCP client.

Run formlm-cli mcp and the CLI becomes a standard MCP server. Connect Claude Desktop, Cursor, Codex CLI, Windsurf, Cline — or any MCP-compatible client — and the agent can build, inspect, and publish your forms conversationally, with the platform's P0 constraints embedded in every tool description so it doesn't drift.

ToolTierWhat the agent can do
auth_login / auth_email_code / auth_status0Authenticate with an Access Token (recommended), email verification code, or email + password
formlm_generate1Generate a complete app from natural language (AssessAgent pipeline)
formlm_snapshot2Read the aggregated state of every module in one call
formlm_skill2Fetch the SKILL.md domain rules for any module
formlm_exec3Run any whitelisted CLI command directly

Six MCP resources (formlm://skills/form, scale, connect, report, expert, share) expose the same domain knowledge the platform's own agents use — so your AI reads the rules before it writes the config. Full setup instructions, including the PATH fix for macOS desktop clients and per-platform config locations, live in the INSTALL guide on GitHub.

🗺️ Developer Quick Start Path
1
Create and publish a form
Build one in the web UI, or generate it with formlm-cli smart generate, then publish it.
2
Grab the Data API endpoint
Open the publish page and copy the endpoint URL. Append ?help to read its self-documentation.
3
POST from your page, script, or agent
Point a form action or fetch call at the endpoint — CORS is open, unknown fields auto-create columns.
4
Query, export, or automate at scale
Read records back over HTTP, export CSV from the data UI, or wire the whole lifecycle into scripts with formlm-cli.

Developer FAQ

The questions we get from builders.

What developer tools does FormLM provide?

Two core tools. The Data API is an HTTP endpoint that stores submissions from any page — static sites, local files, or AI-generated apps — and lets you query the records back. formlm-cli is an open-source command-line tool and MCP server that lets you or an AI agent build and manage forms from the terminal.

How do I let my AI agent use FormLM?

Two ways. Read/write data: give your agent a Data API endpoint — it can read the endpoint's own documentation by appending ?help to the URL, then POST records directly. Build and manage forms: install formlm-cli and run formlm-cli mcp, then connect any MCP-compatible client such as Claude Desktop, Cursor, Codex CLI, Windsurf, or Cline.

Is the Data API free to use?

Yes. Publishing a form and receiving submissions through the Data API is available on the free plan; paid plans add higher volumes and team features. There is no charge per API call on the free tier.

Is formlm-cli open source?

Yes — formlm-cli is MIT-licensed and published on npm as @formlm/cli. The source lives on GitHub at github.com/formlm/cli, and it works with any FormLM account, free or paid.

What can an AI agent do through the MCP server?

The MCP server exposes eight tools: auth_login, auth_email_code and auth_status for authentication, formlm_generate to create a complete assessment app from natural language, formlm_execute to run each plan module, formlm_snapshot to read all module states, formlm_skill to fetch domain rule documents, and formlm_exec to run any whitelisted CLI command. Six MCP resources also expose the skill documents directly to the agent.

Can I use the Data API with my own HTML page?

Yes. Publish a form in FormLM, copy its Data API endpoint, and point your page at it — either a native HTML form action POST or a fetch call. CORS is enabled, so it works from static hosts and even from files opened directly off disk.

← Back to Academy Home Explore the Data API →