Skip to main content
Glama

formpilot

node >=20 license: MIT Playwright

Your AI coding agent fills out and submits web forms for testing — by driving a real browser.

Ask Claude Code or Codex to test a form. formpilot reads the fields, generates realistic data, fills it in, uploads files, walks multi-step wizards, and submits — no database access, no app code changes. The browser opens visibly by default, so you watch it happen live instead of taking it on faith.

3 steps

1. Clone

git clone https://github.com/MazenBorong/formpilot.git && cd formpilot && npm run setup

Installs everything (including a Chromium browser), builds, and registers formpilot as an MCP server with whichever of Claude Code / Codex is on your machine. Safe to re-run anytime.

2. Allow your host

Open formpilot.config.json and add the host you're testing to allowedHosts:

{ "allowedHosts": ["myapp.test"] }

formpilot refuses to touch any host not on this list — no accidental runs against production.

3. Use it

Open Claude Code or Codex and ask:

"use formpilot to dry-run the signup form on myapp.test, show me the data, then submit it"

Watch the browser do it live, then check ./formpilot-runs/<timestamp>/ for the screenshot and payload.

Related MCP server: Playwright MCP Server

How it works

Three MCP tools, used in order:

  • inspect_form — loads the page, returns every field's name, type, constraints, and options as a schema.

  • generate_test_data — turns that schema into realistic values (no browser involved), so you can review or override before anything touches the page.

  • fill_and_submit — fills the form, uploads generated fixture files, walks multi-step wizards, and submits via the real submit button. Reports final URL, validation errors, console/network errors, and a screenshot.

A formpilot fill <url> CLI does all three in one shot for humans.

Safe by default

  • Refuses to touch any host not in allowedHosts — production is never one typo away.

  • Headed (visible) by default — set "headless": true in formpilot.config.json for CI or quiet background runs.

  • dryRun: true fills and screenshots but never clicks submit.

  • Every run's payload and screenshot are saved to ./formpilot-runs/<timestamp>/.

More

  • Login-gated forms — define named profiles (loginUrl, fields, submit) in formpilot.config.json; secrets are read from env vars ($MY_VAR), never stored or logged.

  • Manual setup / Codex config / piecemeal commands — see scripts/ and package.json for npm run build, npm run claude, npm run codex.

  • Tests — npm test runs a full fill_and_submit pass against the bundled sample form in test/fixtures/.

  • Known limits — regex pattern constraints aren't solved generically; no LLM-assisted filling yet (deterministic rules + faker).

License

MIT

Available Tools

3 tools
fill_and_submitA

Fill a form with valid test data (generated from its schema if data is omitted) and submit it via the real submit button (not form.submit()), handling multi-step wizards and consent modals along the way. Reports final URL, HTTP status, redirect chain, a success/failure guess, every visible validation error mapped to its field, console errors, failed network requests, and a full-page screenshot path.

Inputs: url (required), data, seed, dryRun, +3 more.

generate_test_dataA

Generate realistic, valid test data for a form schema (as returned by inspect_form) without touching the browser — lets the agent review/edit data before submitting.

Inputs: schema (required), seed, overrides.

inspect_formA

Load a page (optionally logging in via a configured profile first) and return a JSON schema of every field in its form(s): name, type, label, placeholder, required, pattern/min/max/maxlength, select/radio/checkbox options, file accept types, hidden fields, and best-effort multi-step grouping.

Inputs: url (required), headed, formSelector, loginProfile.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.9/5.0

    Scored across 3 tools

    Disambiguation5/5

    Each tool has a clearly distinct pipeline role: inspect_form discovers form structure, generate_test_data produces data without browser interaction, and fill_and_submit performs the actual fill and submit action. The overlap in data generation is secondary and explicitly positioned for pre-submission review, so there is no meaningful ambiguity.

    Naming Consistency4/5

    All tool names use snake_case and descriptive verbs, but the patterns are not perfectly uniform: generate_test_data includes an extra noun and fill_and_submit uses a conjunction. Still, the style is consistent and readable across the set.

    Tool Count5/5

    Three tools are well-scoped for a focused form-testing server, covering the essential inspect-generate-submit workflow without redundancy. Each tool earns its place and the minimal set is appropriate.

    Completeness4/5

    The tools cover the core lifecycle: inspect form fields, generate valid data, and fill/submit with detailed reporting. A minor gap is the lack of a fill-without-submit operation, but agents can work around it by supplying invalid data to trigger validation errors.

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables coding agents to validate web pages and run repeatable JSON browser scenarios, returning pass/fail results with local Playwright evidence such as screenshots, traces, and JUnit XML.
      1
      Apache 2.0
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables AI agents to drive real Chromium, WebKit, or Firefox browsers — opening named sessions, running ordered steps like clicks, typing, and assertions, and reading back text, console/network logs, and screenshots — so web apps can be tested and explored end to end. It starts and shares dev servers, attaches to already-running browsers, and can fake API responses or device settings.
      2 npm
      MIT