# Quickstart

Three steps: get an API key, add the MCP server to your client, and ask your agent to fill a form.

## Before you start

- A fenfill workspace on Pro or above. [Compare plans](https://fenfill.com/pricing).
- Node.js 22 or newer (`npx` comes with it).
- An MCP client: Claude Code, Claude Desktop, Cursor, or any client that can launch a local (stdio) server.

## 1. Create an API key

In fenfill, open [Settings → API keys](https://fenfill.com/dashboard?settings=api-keys) and choose **Create key**. Give it a name you'll recognise, like the machine or the agent that will use it.

The key starts with `ff_live_` and is shown **once**. Copy it now. We store only a hash, so we can't show it again. If you lose it, revoke it and create a new one.

> **Heads up:** Treat the key like a password. It acts for your whole workspace. Keep it out of shared repos and chat logs, and revoke it in Settings if it leaks.

## 2. Add the MCP server to your client

**Claude Code**: Run this in a terminal.

```sh
claude mcp add fenfill --scope user -e FENFILL_API_KEY=ff_live_… -- npx -y @fenfill/mcp
```

**Claude Desktop**: Add this to claude_desktop_config.json, then restart Claude Desktop.

```json
{
  "mcpServers": {
    "fenfill": {
      "command": "npx",
      "args": ["-y", "@fenfill/mcp"],
      "env": { "FENFILL_API_KEY": "ff_live_…" }
    }
  }
}
```

**Cursor**: Add this to ~/.cursor/mcp.json (all projects) or .cursor/mcp.json (one project).

```json
{
  "mcpServers": {
    "fenfill": {
      "command": "npx",
      "args": ["-y", "@fenfill/mcp"],
      "env": { "FENFILL_API_KEY": "ff_live_…" }
    }
  }
}
```

**Other**: Any client that launches a stdio server: run this command with FENFILL_API_KEY in its environment.

```sh
FENFILL_API_KEY=ff_live_… npx -y @fenfill/mcp
```

Check it works: ask your agent to run `get_account`. It answers with your plan and the page scans you have left.

## 3. Fill your first form

Give your agent a blank PDF and what to put in it. For example:

**Prompt**

```
Fill ~/Downloads/fw9.pdf for Acme Ltd, an LLC taxed as an S corporation, at 1 Main St, Springfield. Save it as ~/Downloads/fw9-acme.pdf.
```

The agent will:

1. call `analyze_form` on the blank PDF. The W-9 already has fillable fields, so it is read directly, with no AI, and uses no page scans;
2. read the fields it gets back and match your details to them;
3. call `fill_form` with the answers. The MCP server writes a new, flattened PDF on your machine and never sends the answers anywhere.

Want to check the result? Ask the agent to run `preview_page`. It draws the page on your machine with every field outlined and tagged.

## What it costs

- Analyzing a flat or scanned form uses one page scan per analyzed page, from your plan.
- Forms that already have fillable fields use none, unless you opt in to `detect_extra_blanks`, which uses one page scan per analyzed page.
- Analyzing the same file again comes from the local cache and uses none. `force: true` analyzes it again and uses scans again.
- Filling never uses page scans.
- To check before you spend, call `analyze_form` with `estimate: true`. It counts pages and spots fillable fields on your machine, uploads nothing, and returns the estimated scans.

How many scans each plan includes is on [the pricing page](https://fenfill.com/pricing).

## Next

- [MCP server](https://fenfill.com/docs/mcp): all settings, every client, troubleshooting.
- [Tools](https://fenfill.com/docs/mcp/tools): all 13 tools, including templates, fillable PDFs, recipient links and layout fixes.
- [What is sent where](https://fenfill.com/docs/data-flow): the full data table and the local cache.
- [API](https://fenfill.com/docs/api): call `/v1` directly.

---

This is the Markdown version of https://fenfill.com/docs/quickstart.
