Documentation

Guides, references, and machine-readable specs for developers and AI agents.

Raw .md
Connect Claude, Cursor, Codex, or Antigravity to 32 native MCP tools./docs/mcp.md

AI Agents & MCP Server

BlokForms ships with a stateless Streamable HTTP Model Context Protocol (MCP) server at https://api.blokforms.com/mcp. Every tool executes directly against the same EU domain services as the Management REST API with scoped RBAC permissions.

Machine-Readable Discovery Files

Point any AI coding agent or autonomous workflow at these URLs:

  • https://blokforms.com/llms.txt (concise directory of docs, API, SDK, and MCP endpoints)
  • https://blokforms.com/llms-full.txt (complete self-contained Markdown reference in one fetch)
  • https://blokforms.com/skill/SKILL.md (drop-in Agent Skill file for coding agents)
  • https://blokforms.com/docs/<slug>.md or send Accept: text/markdown to any /docs/* route
  • https://api.blokforms.com/api/v1/openapi.json (live OpenAPI 3.1 JSON schema)

Authentication (Personal Access Token)

  1. Open https://app.blokforms.com/organization and select Developers & API.
  2. Create a Personal Access Token (bf_pat_...) with the scopes your agent needs: · forms:read, forms:manage · submissions:read, submissions:manage · webhooks:manage, tokens:manage
  3. Pass Authorization: Bearer bf_pat_... to https://api.blokforms.com/mcp.

Security note: Interactive org.manage operations (rotating Mollie/Stripe API keys and mutating custom domains) require an authenticated browser session and intentionally reject PATs with HTTP 403.

Client Configuration Examples

Claude Code CLI

bash
claude mcp add --transport http blokforms https://api.blokforms.com/mcp \
  --header "Authorization: Bearer bf_pat_YOUR_TOKEN"

Cursor / Windsurf / Antigravity (mcp.json)

json
{
  "mcpServers": {
    "blokforms": {
      "url": "https://api.blokforms.com/mcp",
      "headers": {
        "Authorization": "Bearer bf_pat_YOUR_TOKEN"
      }
    }
  }
}

Raw JSON-RPC Call (curl)

bash
curl -X POST https://api.blokforms.com/mcp \
  -H "Authorization: Bearer bf_pat_YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "tools/call",
    "params": {
      "name": "generate_form_with_ai",
      "arguments": {
        "prompt": "Dutch consultation booking form with 30-min slots and GDPR consent",
        "locale": "nl"
      }
    }
  }'

Complete Catalog of 32 MCP Tools

Discovery (5 tools)

ToolRequired ArgsDescription
list_projectsnoneList all active projects in the organization
get_projectprojectIdGet project settings, allowed origins, and defaults
list_formsprojectId?List forms in the org or a single project
get_formformIdGet full form schema, fields, settings, theme, and translations
list_form_templatesnoneList all 16 built-in starter templates

Authoring & AI Generation (6 tools)

ToolRequired ArgsDescription
create_projectname, siteUrl?, allowedOrigins?Create a new project workspace
generate_form_with_aiprompt, locale?Generate a validated form blueprint in en, nl, de, or fr
create_formprojectId, name, templateId?, fields?, settings?Create a live form from a template or custom field array
update_formformId, fields?, settings?, theme?, i18n?, active?Update form fields, logic, workflow, security, or theme
duplicate_formformId, name?Clone an existing form inside the same project
delete_formformIdPermanently delete a form, submissions, and R2 uploads

Embedding & Distribution (1 tool)

ToolRequired ArgsDescription
get_embed_snippetsformIdGenerate tailored <script>, popup, drawer, <iframe>, React <BlokForm>, and HTML snippets

Inbox, Triage, Analytics & AI Assistant (8 tools)

ToolRequired ArgsDescription
list_submissionsformId?, projectId?, status?, q?, limit?Search (FTS5) or filter submissions
get_submissionsubmissionIdInspect a single submission, notes, and uploaded file metadata
triage_submissionsids[], action, assigneeId?Bulk mark_read, mark_new, archive, spam, assign, or delete (up to 200)
add_submission_notesubmissionId, bodyAppend an internal team note
get_form_statsformIdAggregate counts by status and 30-day trend (zero PII)
get_form_analyticsformId, days?Views, starts, conversion rate, step drop-off funnel, UTM, and devices (zero PII)
get_form_visual_reportformIdAnonymized choice distributions, NPS/rating averages, and numeric sums (zero PII)
ask_submissions_aiformId, question, includePii?Ask natural-language questions over responses (PII scrubbed by default)

EU Payments & BlokForms Sign (3 tools)

ToolRequired ArgsDescription
list_form_paymentsformIdList Mollie/Stripe transactions and EU revenue totals
list_signature_envelopesformIdList e-signature envelopes and signer completion states
create_signature_envelopesubmissionId, title, documentBody, signers[]Launch a multi-signer BlokForms Sign ceremony from a submission

Approvals, Bookings, Integrations, Webhooks, Audit & GDPR (9 tools)

ToolRequired ArgsDescription
list_form_approvalsformIdList approval workflow runs and step statuses
decide_approval_stepstepId, decision (approved/denied), comment?Approve or deny a pending workflow step
list_form_bookingsformIdList appointment bookings with .ics calendar links
list_form_integrationsprojectId?, formId?List Slack/Teams/Notion/Airtable/HubSpot/Sheets/Make connectors (masked)
create_form_integrationprojectId, provider, name, config, events[]Create an AES-256-GCM encrypted native integration
list_webhooksprojectId?, formId?List HMAC-SHA256 webhooks
create_webhookprojectId, name, url, events[]Register a signed webhook endpoint
list_audit_logsaction?, limit?Inspect organization security and management audit logs
erase_submissions_by_emailemail, dryRun?GDPR Art. 17 erasure across D1, FTS5, and EU R2 (always call with dryRun: true first)

Agent Best Practices

  1. Always preview GDPR erasure first: Call erase_submissions_by_email with { email, dryRun: true } and confirm the matched count with the user before passing dryRun: false.
  2. Minimize PII exposure: Prefer get_form_stats, get_form_analytics, get_form_visual_report, or ask_submissions_ai (with default includePii: false) when answering summary questions.
  3. Validate field ordering: Any showIf condition must reference an input field that appears earlier in the fields array.
  4. Use generate_form_with_ai as a blueprint: Generate a valid draft schema, adjust field names or settings if needed, then persist with create_form.