Formbridge

by amitpaz1

176 downloads Not rated yet
GitHub

About

# FormBridge Mixed-mode agent-human form submission infrastructure. AI agents fill what they know, humans complete the rest — with full field-level attribution, approval workflows, and webhook delivery…

Explore

- Mixed-mode agent-human form filling with field-level attribution
- Secure resume tokens for human handoff URLs
- Configurable approval gates and webhook delivery (HMAC‑signed)
- MCP server auto‑generates tools from intake definitions
- Pluggable storage: in‑memory, SQLite, PostgreSQL, S3
- Schema normalization: accepts Zod, JSON Schema, or OpenAPI specs

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name Formbridge
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

npm install @formbridge/mcp-server

npx @formbridge/create

bash

npm install pg


typescript
import { PostgresStorage } from '@formbridge/mcp-server';

const storage = new PostgresStorage({
connectionString: process.env.DATABASE_URL!,
maxConnections: 20, // default: 10
idleTimeoutMillis: 30000, // default: 30000
});
await storage.initialize(); // runs migrations automatically

// Or use the factory:
import { createStorageFromEnv } from '@formbridge/mcp-server';
const storage = await createStorageFromEnv(); // reads FORMBRIDGE_STORAGE + DATABASE_URL
``

The PostgreSQL schema uses proper Postgres types: UUID for IDs, JSONB for structured data, and TIMESTAMPTZ for timestamps. The migration file is at migrations/001_init.sql`.

npm install

npm run lint

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "formbridge": {
            "formbridge": {
                "command": "npx",
                "args": [
                    "@formbridge/create"
                ]
            }
        }
    }
}

McpServers

{
    "formbridge": {
        "command": "npx",
        "args": [
            "@formbridge/create"
        ]
    }
}

Mixed-mode agent-human form submission infrastructure. AI agents fill what they know, humans complete the rest — with full field-level attribution, approval workflows, and webhook delivery.

CI
TypeScript
License: MIT
Node.js
Tests
@formbridge/create
@formbridge/form-renderer
@formbridge/schema-normalizer
@formbridge/shared
@formbridge/templates

<p align="center">
FormBridge Demo
</p>

The Problem

AI agents can gather _most_ of the data for a form — but some fields need a human: signatures, file uploads, identity verification, subjective preferences. Existing form tools force you to choose: fully automated _or_ fully manual. Nothing handles the handoff.

How FormBridge Works

Agent                          FormBridge                        Human
  │                               │                                │
  ├─ POST /submissions ──────────►│  Creates draft, returns         │
  │  (fills known fields)         │  resumeToken + handoff URL      │
  │                               │                                │
  │                               │◄──── Opens link ────────────────┤
  │                               │  Pre-filled form with           │
  │                               │  attribution badges             │
  │                               │                                │
  │                               │◄──── Fills remaining fields ────┤
  │                               │◄──── Submits ──────────────────┤
  │                               │                                │
  │  ◄── Webhook delivery ───────┤  Validated, approved,           │
  │      (HMAC-signed)            │  delivered to destination       │

1. Agent creates a submission and fills fields it knows
2. FormBridge generates a secure resume URL with a rotating token
3. Human opens the link — sees pre-filled fields with "filled by agent" badges
4. Human completes remaining fields, uploads files, submits
5. Submission flows through validation → optional approval gates → webhook delivery
6. Every field tracks who filled it (agent, human, or system) and when

Packages

| Package | npm | Description |
|---------|-----|-------------|
| @formbridge/mcp-server | — | Core server — HTTP API, MCP tools, submission lifecycle, storage backends (main package) |
| @formbridge/create | npm | CLI scaffolding tool (npx @formbridge/create) |
| @formbridge/form-renderer | npm | React components and hooks for rendering forms and resuming agent-started submissions |
| @formbridge/schema-normalizer | npm | Converts Zod, JSON Schema, and OpenAPI specs into a unified IntakeSchema IR |
| @formbridge/shared | npm | Shared utilities across packages |
| @formbridge/templates | npm | Ready-made intake templates (vendor onboarding, IT access, customer intake, expense report, bug report) |
| @formbridge/admin-dashboard | — | React SPA for managing intakes, reviewing submissions, and configuring approvals |

Quick Start

Installation

npm install @formbridge/mcp-server

Option 1: HTTP API Server

import { createFormBridgeApp } from '@formbridge/mcp-server';
import { serve } from '@hono/node-server';

const app = createFormBridgeApp({
intakes: [{
id: 'contact-form',
version: '1.0.0',
name: 'Contact Form',
schema: {
type: 'object',
properties: {
name: { type: 'string', title: 'Full Name' },
email: { type: 'string', format: 'email', title: 'Email' },
message: { type: 'string', title: 'Message' },
},
required: ['name', 'email', 'message'],
},
destination: {
type: 'webhook',
name: 'Contact API',
config: { url: 'https://api.example.com/contacts', method: 'POST' },
},
}],
});

serve({ fetch: app.fetch, port: 3000 });
console.log('FormBridge running on http://localhost:3000');

Full submission lifecycle:

```bash

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.