Skip to content

xonaib/mcp-forms

Repository files navigation

MCP Forms

Build and manage web forms through conversation. Describe a form to Claude, get a live shareable link, read submissions back — all without leaving your AI chat.

Creating a form and previewing it


Try it now

Add MCP Forms to Claude.ai as a custom connector (no install needed):

https://mcp-forms-production-cdf7.up.railway.app/mcp

Settings → Connectors → Add custom connector → paste the URL above. Works in Claude.ai, ChatGPT, Cursor, Windsurf, and any MCP-compatible client.


What it does

Create forms from plain English:

Create a job application form. Ask for full name, email, and experience level
(Junior / Mid / Senior). If they select Senior, show a field asking about
their leadership experience.

Fill it out — conditional logic included:

Filling the form with conditional logic

Read submissions and export:

Viewing submissions and exporting to CSV


Example prompts

Create a contact form with name, email, and a message field
Create a feedback form using the dark theme, notify me at you@example.com on every submission

Every form has a light/dark toggle button built in — respondents can switch at any time, and you can set the default theme when creating the form.

Create a support ticket form — if they select Billing, show an account number field
Add a phone number field to the form above
List my forms
Show me submissions for form abc12345
Export submissions for form abc12345 as CSV

MCP Tools

Tool What it does
create_form Generates a form from plain English, returns a shareable URL
publish_form Makes a draft form live
list_forms Lists all forms with status and submission count
get_form Returns full schema, fields, conditional rules
get_submissions Returns all submissions for a form
export_submissions_csv Exports submissions as CSV
update_form Edits an existing form — fields, labels, theme, webhook
delete_form Deletes a form and all its submissions (asks for confirmation)

create_form options

Parameter Required Description
description Plain English description of the form
webhook_url POST submissions as JSON to this URL (Slack, Zapier, n8n, Make, etc.)
notify_email Email this address on every submission
theme form (default, light) or dark — respondents can toggle either way
success_url Redirect respondents here after submitting

How it works

Claude Desktop / Claude.ai / Cursor / any MCP client
        │
        │  MCP (stdio or streamable-http)
        ▼
Python MCP Server (server.py)
        │
        │  HTTP
        ▼
ASP.NET 9 API (hosted on Railway)
        │
        ├── Calls Anthropic API to generate JSON form schema
        ├── Stores forms + submissions in SQLite
        └── Renders forms as HTML at /forms/{id}/view

Integrations

Slack

MCP Forms formats submissions natively for Slack — just paste your Slack webhook URL and submissions appear as readable messages in any channel. No Zapier needed.

Create a contact form with name, email, and message.
Send submissions to Slack at https://hooks.slack.com/services/YOUR/WEBHOOK/URL

What it looks like in Slack:

New submission: Contact Form
• name: Jane Smith
• email: jane@example.com
• message: Interested in your services!
_Submitted at 2026-01-15T10:32:00Z_

Google Sheets / Zapier / Make

Use a Zapier or Make webhook as the webhook_url. Both can receive the JSON payload and push rows into a Google Sheet with no code.

Payload shape:

{
  "formId": "abc12345",
  "formTitle": "Contact Form",
  "submittedAt": "2026-01-15T10:32:00Z",
  "data": {
    "name": "Jane Smith",
    "email": "jane@example.com",
    "message": "Interested in your services!"
  }
}

Self-hosting

1. Configure appsettings.json

Create api/McpForms.Api/appsettings.json (never commit this — it's in .gitignore):

{
  "ConnectionStrings": {
    "Default": "Data Source=mcpforms.db"
  },
  "Anthropic": {
    "ApiKey": "sk-ant-..."
  },
  "BaseUrl": "http://localhost:5000",
  "McpApiKey": "your-secret-key-here",
  "ResendApiKey": "re_...",
  "ResendFromEmail": "onboarding@resend.dev",
  "Urls": "http://localhost:5000"
}
Key Description
Anthropic.ApiKey Your Anthropic API key — used to generate form schemas
McpApiKey A secret you choose; the MCP server sends this on every request
ResendApiKey From resend.com (free tier: 100 emails/day)
ResendFromEmail Use onboarding@resend.dev for local testing

2. Run the API

cd api/McpForms.Api
dotnet restore
dotnet run
# Runs at http://localhost:5000

3. Run the MCP server

Requires uv:

cd mcp-server
uv sync

4. Connect to Claude Desktop

Add to your Claude Desktop config (%LOCALAPPDATA%\Packages\Claude_pzs8sxrjxfjjc\LocalCache\Roaming\Claude\claude_desktop_config.json):

{
  "mcpServers": {
    "mcp-forms": {
      "command": "uv",
      "args": ["--directory", "C:\\full\\path\\to\\mcp-forms\\mcp-server", "run", "server.py"],
      "env": {
        "MCP_API_BASE": "http://localhost:5000",
        "MCP_API_KEY": "your-secret-key-here"
      }
    }
  }
}

Railway environment variables

Variable Value
Anthropic__ApiKey Your Anthropic API key
McpApiKey Your chosen API secret
BaseUrl https://your-app.up.railway.app
ResendApiKey Your Resend API key
ResendFromEmail A verified sender on your Resend account
ConnectionStrings__Default Data Source=/data/mcpforms.db
ASPNETCORE_ENVIRONMENT Production

Project structure

mcp-forms/
├── mcp-server/
│   └── server.py              # MCP tools — what Claude sees
└── api/
    └── McpForms.Api/
        ├── Program.cs             # Service wiring
        ├── Modules/
        │   ├── FormsModule.cs     # MCP-facing endpoints (API key protected)
        │   └── PublicModule.cs    # Form view + submit (public)
        ├── FormSchemaGenerator.cs # Calls Claude to generate JSON schema
        ├── FormRenderer.cs        # Renders schema as HTML via Scriban
        ├── SubmissionValidator.cs # Server-side validation mirroring schema rules
        ├── Templates/
        │   └── form.html          # Single template — light/dark via Tailwind toggle
        └── appsettings.json       # Config (never commit)

Coming soon

  • Notion — submissions land directly in a Notion database
  • More themes — minimal, branded
  • Regex validation — custom error messages per field

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors