Hapti
Do tasks on websites that have no API: a browser agent that works by sight, signs in for each user, asks when a value is missing and returns the result with proof. Billed only on success.
Hosted MCP Server
npx add-mcp 'https://api.hapti.dev/mcp'Installs into Claude Code, Codex, Cursor and more
Documentation
Hapti is made to be used by AI agents as much as by developers. An agent can call Hapti through its remote MCP server to do tasks on websites, and a coding agent can read these docs as plain text to integrate Hapti in your code.
When an agent should use Hapti
An agent should reach for Hapti when it has to act on a website that offers no API: fill a form, book a slot, download a document, check a status, sign in to a customer area. It should not use Hapti when the website has an API that covers the job, or for reading a public page that a simple fetch can read.
Guide a person in the console
When a person asks how to do something in Hapti (get a key, add credit, invite a teammate, answer a waiting task), the console guide lists every screen with its direct link and the exact label of each button, as the console shows it, in French. Send the direct link and quote the label: "open https://app.hapti.dev/#/developers and click Clé test".
Remote MCP server
The MCP server lives at https://api.hapti.dev/mcp and speaks Streamable HTTP. An agent you build yourself with LangChain, the OpenAI Agents SDK, CrewAI or the Vercel AI SDK connects to it too, see Agent frameworks. It accepts two ways in:
- OAuth, for apps such as Claude: you add the address, sign in to Hapti, choose the organisation and the mode, and approve. Nothing to copy.
- An API key in the
Authorizationheader, for code editors and scripts. Use a test key while you try it: test tasks never send the data to the sites.
Claude (web and desktop)
In Claude, open Settings, then Connectors, and add a custom connector with the address https://api.hapti.dev/mcp. Claude opens the Hapti sign-in: choose the organisation, Test or Live, and approve. The connection appears in the Hapti console under Developers, where you can disconnect it at any time.
Any other client that supports MCP authorization works the same way: give it the address and it will open the Hapti sign-in.
Install in one click
The fastest way: create a test key in the console, under Developers. Next to the new key, the Cursor, VS Code and Claude Code buttons install Hapti with that key already filled in.
From here, these links install Hapti with a placeholder: replace hp_test_YOUR_KEY with your key in the editor that opens.
Claude Code
Terminal
claude mcp add --transport http hapti https://api.hapti.dev/mcp \
--header "Authorization: Bearer hp_test_..."
Cursor
Add this to ~/.cursor/mcp.json, or to .cursor/mcp.json in a project:
JSON
{
"mcpServers": {
"hapti": {
"url": "https://api.hapti.dev/mcp",
"headers": { "Authorization": "Bearer hp_test_..." }
}
}
}
VS Code
Add this to .vscode/mcp.json:
JSON
{
"servers": {
"hapti": {
"type": "http",
"url": "https://api.hapti.dev/mcp",
"headers": { "Authorization": "Bearer hp_test_..." }
}
}
}
Any other client
Any MCP client that supports remote servers over HTTP with custom headers can connect with the same address and header.
Tools
| Tool | What it does |
|---|---|
start_task | Give a goal to a Hapti agent that operates a real web browser by sight, like a person. |
get_task | State of a task. |
answer_task | Answer the question a waiting task asked. |
approve_task | Give or refuse the approval a waiting task asked for before a step that commits the person. |
cancel_task | Stop a task that is queued, running or waiting. |
estimate_task | The price of a task before starting it, from the earlier successes of the same task and its recipe: likely_cents, at_most_cents and what it is based on. |
list_templates | The ready-made tasks Hapti offers on sites that have no API (book an appointment, file a form, track an application, get invoices, cancel a subscription, place an order...), each with its id, what it does and its parameters. |
list_tasks | The latest tasks of this key, newest first, optionally only one status (for example running or waiting): find a task again when you lost its id. |
list_recipes | The recipes of this organisation, newest first: id, name, site, number of steps, uses. |
get_balance | The credit, in cents of US dollars: balance_cents, available_cents (what new tasks can still use once the open tasks hold their starting price), held_cents and paused_tasks (tasks waiting for credit, which start by themselves once credit is added). |
get_account | Start here when something does not work as expected: the organisation, the mode of this key (test or live), the API version, the credit in full (balance, available, held by open tasks, tasks paused for lack of credit, card saved, offered credit, automatic top up and its last error) and the prices. |
get_task_steps | Why a task did what it did: every step the agent took, in order, with its time and summary, the questions and approvals, the sites it reached and the ones refused, and how it ended. |
list_requests | The API calls made with keys of this mode in the last 30 days, newest first: method, path, HTTP status, duration and Request-Id. |
get_request | One API call by its Request-Id (the Request-Id header of every answer): its parameters, the body sent and the answer given, with passwords, tokens and file contents masked. |
list_webhook_deliveries | The webhook events sent to this mode's addresses, newest first: event, address, state (delivered, failed, retrying, pending), the HTTP status the receiving server answered and the number of attempts. |
get_webhook_delivery | One webhook delivery: the exact body sent, every attempt with the status and answer of the receiving server, and when the next attempt is due. |
resend_webhook_delivery | Send one webhook delivery again, now, to the same address and signed the same way, for example once the receiving server is fixed. |
get_usage | Tasks of this mode by status, and what was billed day by day, over a period: from and to are dates like 2026-11-01, the current month by default. |
create_monitor | Checks a website on a schedule with a task and reports only what changed: new items, removed items, changed values. |
list_monitors | The websites being watched, with their schedule, last check, last change and last error. |
get_monitor | A monitor with the current value of its website and its latest changes (what was added, removed or changed at each check). |
The agent starts a task with start_task, then calls get_task with wait_seconds in a loop. When a task waits, the agent relays the question or the approval to the person and answers with answer_task or approve_task. It must never invent the answer.
When something goes wrong
The server gives an agent what a developer would look at, so it can find the cause itself before asking the person:
- A task stays
paused, or a call answers 402:get_accountshows the credit available, what open tasks hold, the tasks waiting for credit, the card and the automatic top up. The person adds credit athttps://app.hapti.dev/#/billing. - A task failed, is blocked or incomplete:
get_task_stepsgives every step the agent took, the sites it reached or that were refused, and the reason it gave. - A call to the API failed:
list_requestswithstatus: "error"lists the failed calls, andget_requestshows the body sent and the error answered, by Request-Id. - A server did not receive an event:
list_webhook_deliveriesandget_webhook_deliveryshow each attempt and what the server answered;resend_webhook_deliverysends it again once it is fixed. - How much was spent:
get_usage, by day and by status.
Docs for coding agents
Every page of these docs exists as plain Markdown: add .md to its address, for example /docs/quickstart.md. Each page also has Copy as Markdown, Ask Claude and Ask ChatGPT buttons.
| File | What it holds |
|---|---|
| /llms.txt | A short map of Hapti and links to every page |
| /llms-full.txt | The whole documentation in one file |
| /openapi.json | The OpenAPI 3.1 specification of every endpoint |
A prompt that works well with a coding agent:
Text
Integrate Hapti in this project. Read https://hapti.dev/llms-full.txt first.
Use the official SDK, send an Idempotency-Key with every task you create,
receive results with a signed webhook endpoint, and verify the signature.
Use the test key from HAPTI_API_KEY. Never invent data a task asks for: relay
the question to the user.
Good practice for agents
- Give the agent only the data the task needs, in
data. It uses nothing else. - Set
userto the person the task is for, so their session and stored accounts are used. - Ask for an
outputschema when a program reads the result. - Set
max_price_centswhen the agent runs without supervision. - Use test keys while building. Switch to a live key only for real tasks.