> ## Documentation Index
> Fetch the complete documentation index at: https://formcarry.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# v0

> v0 connects the form in the Next.js app it generates to formcarry from one prompt.

The prompt goes in the prompt bar, or in a saved Instruction for every chat, and v0 changes the code and sends a test submission itself.

## Connect over MCP

<Card title="Connect over MCP" icon="plug" href="/docs/connect" horizontal cta="See how to connect">
  Formcarry's MCP does everything you would do in the dashboard for your forms and submissions: create a form, set its recipients, spam blocker and webhooks, list and search submissions, mark spam, and read where each submission was delivered. v0 connects to it as an MCP server, so it manages the form it built instead of only writing the front end.
</Card>

## Prerequisites

Before you start, you need:

* A formcarry account. [Sign up](https://app.formcarry.com/register) is free.
* A form in the [dashboard](https://app.formcarry.com). Its endpoint is on the form's Setup page. The examples use `https://formcarry.com/s/AbC123xyz`; put yours in its place.
* The form's name and id from its page in the dashboard, for the prompt.

## 1. Provide the instructions

Paste this prompt into the prompt bar, with your form's name and id in place of the placeholders:

```text theme={null}
Read https://formcarry.com/llms.txt for how the front end setup works, then connect my formcarry form "<form name>" (id <form_id>) to the form in this project, send a test submission and tell me what you changed.
```

v0 reads the file itself, because it visits external URLs while it works. For a form named Contact with the endpoint `https://formcarry.com/s/AbC123xyz`, the prompt reads:

```text theme={null}
Read https://formcarry.com/llms.txt for how the front end setup works, then connect my formcarry form "Contact" (id AbC123xyz) to the form in this project, send a test submission and tell me what you changed.
```

To keep the text for every chat, click + in the prompt bar, choose New Instruction and save the prompt there. Tick it under + before you send.

## 2. Check what it changed

Select the Code tab in the preview toolbar, then Toggle Diff View in the editor toolbar, and check the form against this list:

* The endpoint from the Setup page in the form's `action` or in the `fetch` URL.
* `method="POST"` on the form.
* A `name` on every field, and `email` on the address field.
* `Accept: application/json` when it posts from JavaScript.
* Where the post leaves from: the browser, not a Server Action or an API route.

In a plain form, look for the endpoint in `action` and `method="POST"`:

```html theme={null}
<form action="https://formcarry.com/s/AbC123xyz" method="POST">
  <input type="email" name="email">
  <textarea name="message"></textarea>
  <button type="submit">Send</button>
</form>
```

In a `fetch` call, look for the endpoint in the URL and `Accept: application/json` in the headers:

```js theme={null}
const res = await fetch("https://formcarry.com/s/AbC123xyz", {
  method: "POST",
  headers: { "Accept": "application/json", "Content-Type": "application/json" },
  body: JSON.stringify({ email, message })
})
const data = await res.json()
```

The keys of the body are the field names formcarry stores, and a stored submission answers with `code: 200`.

v0 writes Next.js and can put the post in a Server Action (a `"use server"` file) or an API route (`app/api`) instead, so it leaves from the server. To move it, reply:

```text theme={null}
Post to formcarry from the browser, not from a Server Action or an API route.
```

## 3. Send a test submission

Fill the form in on the Preview tab and submit.

The Preview tab runs the whole app, server code included, as it runs once published. The submission is on the form's page in the dashboard, and the notification email arrives at your account's address. A second test inside 15 seconds gets a `429`.

Send one more test after Publish to Production, because it runs the app on separate infrastructure with its own environment variables.

## Where the post leaves from

Post from the browser rather than from a Server Action or an API route, because a spam blocker token has to come from the browser.

A team's Sandbox Network Policy, set in team settings, can block a post that leaves from the sandbox. The default is `allow-all`. If a test from the Preview tab never reaches the dashboard, check the policy.

## What's next

* [What every form needs](/docs/what-every-form-needs): field names, hidden inputs, limits and the answers.
* [Spam protection](/docs/features/spam-protection): add a challenge once the form is live.
* [Connect over MCP](/docs/connect): let the tool manage the form, not only write it.

Stuck? Write to [help@formcarry.com](mailto:help@formcarry.com). Include the form id.


## Related topics

- [Connect over MCP](/docs/connect.md)
- [Introduction](/docs/introduction.md)
- [Build with AI](/docs/ai/overview.md)
- [formcarry.js](/docs/frameworks/formcarry-js.md)
- [JavaScript](/docs/frameworks/javascript.md)
