convez.ai
MCP ServerIntegração & APIsIntermediário
borenstejn

FormLoop

borenstejn/formloop

Formulários visuais de alta qualidade gerados dinamicamente por agentes IA

Ver no GitHub
InicialPluginScore · de 0 a 100

MCP server que gera formulários UI complexos sob demanda para agentes LLM interagirem com humanos. Suporta múltiplos tipos de campos (texto, seleção, ranking, HTML interativo, sliders) e funciona localmente sem APIs externas ou dados na nuvem.

Instalação

$npx convez-ai borenstejn/formloop

1 comando no terminal: detecta o formato do repositório (marketplace ou plugin avulso) e instala via Claude Code. Requer Node 18+ e o Claude Code instalado.

Métricas

Estrelas
2
Forks
0
Acompanhando
0
Saúde
71%
Último commit
há 3 meses
Versão
v0.1.1
Issues abertas
0
Contribuidores
1

Casos de uso

  • Agentes IA coletarem feedback estruturado e complexo de usuários
  • Sistemas de design iterativo com mockups clicáveis em formulários
  • Workflows de aprovação humana em pipelines de automação
  • Pesquisas e ranking de preferências com drag-and-drop visual

Veredito

Ferramenta sólida que resolve um problema real: formulários dinâmicos em tempo real para agentes. A implementação local é segura e a variedade de tipos de campo é prática. Curva de aprendizado moderada, mas retorno alto para workflows que exigem interação humana estruturada.

README

A tradução para o português deste README ainda está na fila.

formloop

Let your AI agent ask humans complex questions with real UI — not chat.

When an LLM agent needs structured input from a human, chat breaks down. formloop generates Typeform-quality forms on-the-fly — with clickable mockups, sliders, drag-and-drop — sends a link, and returns structured answers when the human submits.

One package. Works as an MCP server (Claude Code, Cursor, Windsurf), a CLI (Codex, custom agents), or a standalone HTTP server.

Install

MCP server (Claude Code / Cursor)

npx formloop install

This adds formloop to your MCP settings. Restart your editor — the create_form, wait_for_response, and list_submissions tools are now available.

CLI (Codex / bash agents)

# Create a form
npx formloop create --spec '{
  "title": "Pick a design",
  "blocks": [
    {"kind": "html-pick", "id": "hero", "title": "Which hero layout?",
     "options": [
       {"id": "a", "label": "Minimal", "html": "<div style=\"padding:2rem;background:#f0f0f0\"><h1>Clean</h1></div>"},
       {"id": "b", "label": "Bold",    "html": "<div style=\"padding:2rem;background:#6366f1;color:white\"><h1>Bold</h1></div>"}
     ]},
    {"kind": "rank", "id": "priorities", "title": "Rank these",
     "options": ["Speed", "Quality", "Cost"]}
  ]
}'

# Wait for the human to submit
npx formloop wait --form-id <ID>
# → { "answers": { "Which hero layout?": "a", "Rank these": ["Quality", "Speed", "Cost"] } }

Standalone server

npx formloop              # starts on http://127.0.0.1:3847
npx formloop --port 4000  # explicit port

How it works

Agent                          formloop                         Human
  │                               │                               │
  ├── create_form(spec) ─────────►│                               │
  │◄── { form_id, form_url } ────┤                               │
  │                               │                               │
  ├── (sends form_url to human) ──┼──────────────────────────────►│
  │                               │                               │
  │                               │◄── human fills form ──────────┤
  │                               │    clicks Submit              │
  │                               │                               │
  ├── wait_for_response(id) ─────►│                               │
  │◄── { answers } ──────────────┤                               │

The server runs locally — no cloud, no API keys, no data leaves your machine.

Question types

KindDescriptionAnswer type
mcMultiple choice (single select)string
multiCheckboxes (multi-select)string[]
textShort text inputstring
textareaLong text inputstring
ynYes / Noboolean
numberNumeric inputnumber
scale1-N scalenumber
html-pickClickable HTML cards (mockups, designs)string or string[]
rankDrag-and-drop orderingstring[]
scale-previewSlider with live HTML previewnumber
htmlRich HTML context (no answer, display-only)—
groupMultiple questions on one slide—

Form spec reference

{
  "title": "Form title",
  "description": "Optional subtitle",
  "layout": "stack",
  "persistent": false,
  "blocks": [
    {
      "kind": "mc",
      "id": "q1",
      "title": "Pick one",
      "options": ["A", "B", "C"],
      "headerHtml": "<p>Optional HTML context above the question</p>"
    },
    {
      "kind": "html",
      "html": "<div>Context-only slide — no answer collected</div>"
    }
  ]
}

layout: "stack" (default, single column) or "split" (two-column: context left, answer right).

persistent: false (default) = single response, auto-deleted after retrieval. true = multi-response, permanent, with list_submissions support.

Self-hosting

formloop runs locally with zero configuration — no Redis, no cloud services needed. Data is stored in-memory.

npx formloop

For production or shared deployments, set these environment variables to use Upstash Redis:

KV_REST_API_URL=https://...    # Upstash Redis REST URL
KV_REST_API_TOKEN=...          # Upstash Redis REST token
WEBHOOK_SECRET=...             # Optional API auth secret

MCP tools

When running as an MCP server (npx formloop --mcp), three tools are exposed:

ToolDescription
create_formCreate a form from a spec. Returns { form_id, form_url }. Auto-opens in browser.
wait_for_responsePoll until an ephemeral form is submitted. Returns { answers }.
list_submissionsList all submissions for a persistent form.

CLI reference

formloop [options]              Start the HTTP server
formloop --mcp                  Start as MCP server (stdio transport)
formloop install                Add MCP config to Claude Code / Cursor
formloop create --spec '{...}'  Create a form
formloop wait --form-id <ID>    Poll until form is submitted
formloop list --form-id <ID>    List submissions (persistent forms)

Why formloop

ChatAskUserQuestionTally / Typeformformloop
Rich UI (sliders, drag-and-drop, mockups)NoNoNoYes
HTML/SVG embedded as contextNoNoNoYes
Async (respond from phone)NoNoYesYes
Generated by codeYesYesNoYes
Multi-input structuredNoLimitedYesYes
Free, self-hostableYesYesNoYes
Local-first (no cloud)YesYesNoYes

Related projects

  • HumanLayer — orchestration for human-in-the-loop agents (Slack/Email/Discord). Complementary.
  • Anthropic Artifacts — synchronous rich UI inside Claude.ai. formloop is async, agent-driven.

Contributing

See CONTRIBUTING.md.

License

MIT

Ver o original no GitHub

Bom para

Relacionados