agents

Connect your agent to Haunt in one command.

Use the MCP command when your agent supports tools. Agents can extract structured JSON or clean Markdown from permitted public pages. Use the curl skill when an agent needs setup instructions first.

MCP command
npx -y --package @hauntapi/cli@latest haunt-cli init
one command

Install for an agent. Or let an agent fetch the setup skill.

Two clean entry points. No wall of config unless somebody actually asks for it.

CLI / MCP
npxCLI
npx -y --package @hauntapi/cli@latest haunt-cli init

Run this once to print the MCP config for Claude, Cursor, Windsurf, or another MCP-compatible client.

View the docs >
Agent skill
curl
curl -sS https://hauntapi.com/agents/skill.md

Give this to an AI agent so it can read the Haunt setup path before it starts calling tools.

View the skill >
agent path

What the agent should do.

  1. Test safely: call try_demo_extract before getting a key or spending credits.
  2. Get a key: create a free key, add it as HAUNT_API_KEY, then treat it like a password.
  3. Extract for real: call extract or extract_url for JSON, or extract_markdown when the workflow needs clean page text or a .md file.
  4. Reach more pages: set device to mobile or desktop for the right rendering, or use js_scenario (paid) to wait, click, scroll, or fill before extracting.
  5. Check usage: call get_usage to see used, reserved, and remaining credits.
  6. Protect request data: Haunt does not retain page content, prompts, or extracted results by default.
  7. Fail honestly: branch on the diagnostics object (reason, retryable, suggested_action) instead of guessing. It covers captcha, login_required, access_denied, and more.

Hosted MCP endpoint

For hosted MCP clients, use https://hauntapi.com/mcp/server and send Authorization: Bearer ${HAUNT_API_KEY}.

For local stdio MCP, use @hauntapi/mcp-server. The package exposes the haunt-mcp binary plus try_demo_extract, extract/extract_url, extract_markdown, extract_article, extract_metadata, and get_usage tools.

Need the full MCP config?
MCP config
{
  "mcpServers": {
    "haunt": {
      "command": "npx",
      "args": ["-y", "@hauntapi/mcp-server"],
      "env": { "HAUNT_API_KEY": "PASTE_YOUR_KEY_HERE" }
    }
  }
}