If you already work inside an AI agent (Claude Code, Cursor, ChatGPT, Codex), leaving it to click around a form builder feels like a step backwards. With the Model Context Protocol (MCP), you don't have to: connect Formly to your agent once, and it can create forms, edit them, publish links, and pull responses, all from the conversation you're already in.
This guide covers what that setup looks like and how to get it running in a few minutes.
The Model Context Protocol is an open standard that lets AI agents call tools in external services. A service exposes an MCP server; the agent connects to it and gains a set of typed tools it can invoke on your behalf. Formly ships an MCP server, which means any MCP-compatible agent can operate your Formly account, with your permission, using your API key.
In practice, that turns requests like these into finished work:
You'll need a Formly account on the Pro plan. In the dashboard, go to Settings → Developer and generate an API key. This key is what authorizes your agent, so treat it like a password.
There are two ways to run the Formly MCP server. Both expose the same tools, so pick whichever your agent supports.
Remote (hosted, zero install). Add a remote MCP server pointing at:
https://api.formly.so/mcp
with your API key as a bearer token (Authorization: Bearer YOUR_API_KEY).
Local (npx). Add the formly-mcp package to your agent's MCP config:
{
"mcpServers": {
"formly": {
"command": "npx",
"args": ["-y", "formly-mcp"],
"env": {
"FORMLY_API_KEY": "formly_sk_your_key_here"
}
}
}
}
For CLI agents, registration is a one-liner. Claude Code:
claude mcp add formly --env FORMLY_API_KEY=formly_sk_your_key_here -- npx -y formly-mcp
Codex CLI:
codex mcp add formly --env FORMLY_API_KEY=formly_sk_your_key_here -- npx -y formly-mcp
There's an even lazier option: paste the ready-made setup prompt from the developer docs into a coding agent, and it will install and verify the connection itself.
Once connected, your agent has the full toolkit:
| Tool | What it does |
|---|---|
create_form | Build a new form from a description |
edit_form | Change questions, pages, or structure |
update_form_settings | Adjust settings like notifications or access |
publish_form / unpublish_form | Take a form live, or take it down |
list_forms / get_form | Browse forms and fetch links or structure |
get_submissions | Read responses |
create_space / list_spaces | Organize forms into workspaces |
Ask in plain language and the agent chooses the right tools. A single request like "create a feedback survey for our beta users and publish it" typically chains create_form → publish_form → get_form and hands you the live link.
If you'd rather integrate directly, everything the MCP server does is also available as a plain REST API, including an endpoint that generates a form from a description in one call.
list_forms as a sanity check.FORMLY_API_KEY (local) or a bearer token (remote), and that your account is on the Pro plan.New to the prompt-based side of Formly? Start with how to create a form with AI, or get an API key and connect your agent now.