MCP integration — Claude Code
Add Motivation Form to Claude Code so agents can create, deploy, and query forms within any conversation.
This guide covers adding Motivation Form as an MCP server in Claude Code. Once configured, Claude Code can create forms, deploy them, read responses, and generate reports without leaving the conversation.
Prerequisites
- Claude Code installed (
npm install -g @anthropic-ai/claude-code) - A Motivation Form API key — get one from your dashboard after signing up
1. Add the MCP server
Option A — one command (recommended):
export MOTIVATION_FORM_API_KEY="mf_live_..."
claude mcp add --transport http --scope user motivation-form \
https://app.form.gold/api/mcp \
--header "Authorization: Bearer $MOTIVATION_FORM_API_KEY"Replace mf_live_... with your actual key. This updates your Claude Code MCP settings automatically.
Option B — edit ~/.claude/settings.json directly:
{
"mcpServers": {
"motivation-form": {
"type": "http",
"url": "https://app.form.gold/api/mcp",
"headers": {
"Authorization": "Bearer YOUR_API_KEY"
}
}
}
}2. Verify the connection
Start a new Claude Code session and ask:
What MCP tools do you have available for Motivation Form?You should see the 12 available tools listed.
Example conversations
Create and deploy a form
> Create a contact form with name, email, and message fields.
Deploy it and give me the URL.
[Using create_form]
[Using deploy_form]
→ Live at https://form.gold/acme/contactRead recent responses
> Show me the last 10 responses for the contact form.
[Using list_responses({ form_slug: "contact", limit: 10 })]
→ Returns 10 most recent responses with timestamps and field valuesGenerate a response report
> Generate a weekly report for the campaign-brief form.
[Using get_response_report({ form_slug: "campaign-brief", period: "7d" })]
→ Returns a structured Markdown report with aggregate stats and distributionsAdd a field to an existing form
> Add a "company size" dropdown to the contact form:
1–10, 11–50, 51–200, 200+
[Using add_field]
[Using deploy_form]
→ Field added, form redeployedAvailable MCP tools
| Tool | What it does |
|---|---|
create_form | Create a new form with title, slug, fields, branding, and notifications |
update_form | Patch an existing form's config |
update_form_access | Set or rotate respondent access policy: public, access code, sign-in, or domain allowlist |
add_field | Append a field to an existing form |
deploy_form | Make the form live at its public URL |
get_form | Fetch a form's current config and stats |
list_forms | List all forms for your account |
list_responses | Fetch paginated responses with optional date filter |
get_response | Fetch a single response by ID |
get_form_stats | Views, responses, completion rate, 7-day sparkline |
get_response_report | Agent-readable Markdown report (aggregate + granular) |
export_responses | Export responses as CSV, JSON, or Markdown |
Tips for agents
- Use
get_formfirst to check a form's current schema before modifying it get_response_reportreturns structured Markdown designed for agent re-processing — pipe it into a chart generation or analysis stepexport_responseswithformat: "markdown"produces a table that pastes cleanly into a document or Slack message- Use
update_form_accesswhen a form should be private, code-gated, sign-in gated, or restricted to verified email domains - When a user says "create a form for X", prefer
create_form+deploy_formin two calls over any intermediate steps