MCP integration — Codex
Use Motivation Form from OpenAI Codex and similar agent systems via the MCP server.
Motivation Form lets AI agents create forms, surveys, and quizzes from prompts or API calls, then deploy them as live public pages.
This guide covers connecting Motivation Form to OpenAI Codex and other OpenAI-compatible agent systems that support MCP tool calling.
Prerequisites
- A Motivation Form API key — get one from your account settings
- An OpenAI Codex setup with MCP or tool-calling support enabled
Configuration
Add the Motivation Form MCP server to your Codex agent configuration:
{
"tools": [
{
"type": "mcp",
"server_url": "https://app.form.gold/api/mcp",
"headers": {
"Authorization": "Bearer YOUR_API_KEY"
}
}
]
}REST API alternative
If your Codex environment does not support MCP directly, use the REST API with an API key header:
# Create a form
curl -X POST https://app.form.gold/api/forms \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"title": "Contact Us",
"slug": "contact",
"fields": [
{ "id": "name", "type": "text", "label": "Your name", "required": true },
{ "id": "email", "type": "email", "label": "Email", "required": true }
],
"notifications": { "email": ["you@example.com"] }
}'See the API reference for all endpoints.
Example workflow
A typical Codex workflow for creating and deploying a form:
1. create_form — define title, slug, fields, and notifications
2. deploy_form — make the form live
3. Return the public URL to the user> Create a feedback form for our product launch. It should collect name, email,
overall rating (1–5), and open-ended feedback. Deploy it.
[create_form({
title: "Product Launch Feedback",
slug: "launch-feedback",
fields: [
{ id: "name", type: "text", label: "Name", required: true },
{ id: "email", type: "email", label: "Email", required: true },
{ id: "rating", type: "radio", label: "Overall rating",
options: ["1 – Poor", "2 – Fair", "3 – Good", "4 – Great", "5 – Excellent"] },
{ id: "feedback", type: "textarea", label: "Your feedback" }
],
notifications: { email: ["team@company.com"] }
})]
[deploy_form("launch-feedback")]
→ https://form.gold/acme/launch-feedbackAvailable tools
See the full tool list — the same 12 tools are available regardless of which agent system you use.