> ## 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.

# Claude

> Claude connects the form in your project to formcarry from one prompt, then sends a test submission and reports what it changed.

In Claude Code the prompt goes in the session and standing rules go in `CLAUDE.md`; in claude.ai it goes in the chat and the answer is an artifact, which cannot post to the endpoint.

## 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. Claude connects to it with one command in Claude Code, or as a custom connector in claude.ai, 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

In Claude Code, run `claude` in your project. To connect the form, paste this prompt into the session 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.
```

To keep the rules for every session, put them in `CLAUDE.md` in the project root; `/init` creates one:

```markdown theme={null}
## Forms

Every form in this project sends its submissions to formcarry. Read https://formcarry.com/llms.txt before you change one.
The contact form's endpoint is https://formcarry.com/s/AbC123xyz.
Post from the browser, never from a server route. Give every field a `name`, name the address field `email`, and send `Accept: application/json` from JavaScript.
```

In claude.ai, paste the same prompt into the chat. The answer is an artifact; read "What an artifact cannot do" before you test it.

## 2. Check what it changed

In Manual mode Claude Code shows each change and asks before editing; in VS Code the change is a side by side diff. In Auto mode it edits without asking, so review with `git diff`. In claude.ai, the artifact's lower right corner opens its code for the same checks.

To check a plain form, look for the endpoint in `action`, `method="POST"`, a `name` on every field and `email` on the address field:

```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>
```

To check a post from JavaScript, look for the endpoint in the `fetch` 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()
```

If the post is in a server route, reply "post to formcarry from the browser" rather than keeping it, otherwise no spam blocker token exists.

## 3. Send a test submission

Run the project on your machine and submit the form from your browser. The submission is on the form's page in the dashboard, and the notification email arrives at your account's address.

If Claude Code sent a test from your terminal, wait 15 seconds before yours rather than submitting at once, otherwise the endpoint answers `429`: your terminal and your browser share one IP address against that limit.

## What an artifact cannot do

The claude.ai viewer runs each artifact on a sandboxed origin under a content security policy. `fetch` and XHR reach only the page's own origin and the Google Fonts hosts, so a form inside an artifact cannot post to the endpoint, and publishing does not move it out of that viewer. Copy or download its code and run it in your project rather than testing in the viewer, otherwise nothing arrives in the dashboard. Or give the prompt to Claude Code.

## 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)
- [Build with AI](/docs/ai/overview.md)
- [Introduction](/docs/introduction.md)
