# docapi-mcp

## Quick Start

```bash
# Connect this server (installs CLI if needed)
npx -y @smithery/cli@latest mcp add docapi/docapi-mcp

# Browse available tools
npx -y @smithery/cli@latest tool list docapi/docapi-mcp

# Get full schema for a tool
npx -y @smithery/cli@latest tool get docapi/docapi-mcp docapi_generate_pdf

# Call a tool
npx -y @smithery/cli@latest tool call docapi/docapi-mcp docapi_generate_pdf '{}'
```

## Direct MCP Connection

Endpoint: `https://docapi-mcp--docapi.run.tools`

**Required config:**
- `apiKey` (header) — Your DocAPI API key from docapi.co

## Tools (5)

- `docapi_generate_pdf` — Convert HTML to a PDF using DocAPI's headless Chromium renderer. Full CSS support: Flexbox, Grid, custom fonts, gradien…
- `docapi_capture_screenshot` — Screenshot a URL or render HTML and capture it as an image. Returns the image inline so you can view it immediately.
- `docapi_check_credits` — Check remaining API credits and USDC top-up address for agent accounts.
- `docapi_register_agent` — Register a new DocAPI agent account programmatically. Returns an API key and USDC address — no email, no dashboard, no …
- `docapi_generate_invoice` — Generate a professionally formatted invoice PDF from structured data. Returns a base64-encoded PDF.

```bash
# Get full input/output schema for a tool
npx -y @smithery/cli@latest tool get docapi/docapi-mcp <tool-name>
```
