Skip to content
Lazyform
Docs menu

Developers

MCP server

Let AI coding assistants like Claude Code, Cursor and VS Code create forms, fetch access keys and read submissions through Lazyform's MCP server.

Lazyform runs a Model Context Protocol server, so AI coding assistants can work with your forms directly. Ask "add a contact form to this site" and the assistant creates the form in Lazyform, gets its access key and writes the form into your code. Later you can ask "what did people send through the contact form this week?".

1. Make an API token

In the dashboard, open Settings → API tokens and create a token. It starts with lf_api_ and works inside that one workspace. It's shown once, so copy it now.

The token can create forms and read every submission in the workspace. Keep it out of your code and repository. If it leaks, delete it in the dashboard and make a new one.

2. Add the server to your assistant

The server's address is:

text
https://lazyform-api.xvelopers.com/mcp

It uses Streamable HTTP, and your token goes in the Authorization header.

bash
claude mcp add --transport http lazyform https://lazyform-api.xvelopers.com/mcp \
  --header "Authorization: Bearer lf_api_YOUR_TOKEN"

Any other client that supports remote MCP servers with a custom header works the same way.

Connectors that only support signing in through a browser (OAuth), like custom connectors in the Claude apps, aren't supported yet. Use a client that accepts a header, like the ones above.

3. Ask

Try prompts like these:

  • "Add a contact form to this page that sends submissions to me with Lazyform."
  • "Only accept submissions from acme.com on the contact form."
  • "Send contact form submissions to this Slack webhook: https://hooks.slack.com/services/…"
  • "Show me the last 10 messages from the contact form."

Tools

Tool What it does
list_workspaces The token's workspace, with its plan and this month's usage.
list_forms Every form, with its access key, status and submission counts.
create_form Creates a form. Returns its access key, the endpoint and an HTML example to paste.
get_form One form, with every feature and its settings, plus the setup details.
set_feature Switches a feature on or off and changes its settings, for example custom_redirect with { "url": "https://acme.com/thanks" }. Settings you don't send stay as they are.
list_submissions A form's submissions, newest first. Search by text or read the spam folder.
get_submission One submission with every field, its files and how each delivery went.
list_integrations The integrations on a form, and every integration your plan can add.
add_integration Connects a form to a service, like a webhook, Slack, Discord or Zapier. Google Sheets and Telegram need a person, so they're connected in the dashboard.

The assistant can't delete forms, submissions or integrations. Do that in the dashboard.

Good to know

  • Everything goes through the same rules and plan limits as the dashboard. When something needs a higher plan, the tool answers with plan_required, and the assistant can tell you.
  • Errors use the same codes as the REST API, like not_found, validation_failed and limit_reached.
  • Deleting the token in the dashboard cuts the assistant off at once.