# PolyDoc MCP server

> Converts HTML and URLs to PDF, captures screenshots, and generates EU-compliant e-invoices via a REST API.

- Repository: https://github.com/polydoc-tech/polydoc-mcp
- Page: https://hostedmcp.org/servers/polydoc-tech/polydoc-mcp
- Transport: stdio
- Stars: 0
- License: MIT
- Latest version: 0.1.10

## Install

### Claude Code

```sh
claude mcp add --env 'POLYDOC_API_KEY=<YOUR_POLYDOC_API_KEY>' polydoc-mcp -- npx -y polydoc-mcp
```

### Cursor (`~/.cursor/mcp.json`)

```json
{
  "mcpServers": {
    "polydoc-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "polydoc-mcp"
      ],
      "env": {
        "POLYDOC_API_KEY": "<YOUR_POLYDOC_API_KEY>"
      }
    }
  }
}
```

### VS Code (`.vscode/mcp.json`)

```json
{
  "servers": {
    "polydoc-mcp": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "polydoc-mcp"
      ],
      "env": {
        "POLYDOC_API_KEY": "<YOUR_POLYDOC_API_KEY>"
      }
    }
  }
}
```

### VS Code CLI

```sh
code --add-mcp '{"name":"polydoc-mcp","type":"stdio","command":"npx","args":["-y","polydoc-mcp"],"env":{"POLYDOC_API_KEY":"<YOUR_POLYDOC_API_KEY>"}}'
```

### Claude Desktop (`claude_desktop_config.json`)

```json
{
  "mcpServers": {
    "polydoc-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "polydoc-mcp"
      ],
      "env": {
        "POLYDOC_API_KEY": "<YOUR_POLYDOC_API_KEY>"
      }
    }
  }
}
```

### Codex

```sh
codex mcp add polydoc-mcp --env 'POLYDOC_API_KEY=<YOUR_POLYDOC_API_KEY>' -- npx -y polydoc-mcp
```

### Codex config.toml (`~/.codex/config.toml`)

```toml
[mcp_servers.polydoc-mcp]
command = "npx"
args = ["-y", "polydoc-mcp"]

[mcp_servers.polydoc-mcp.env]
POLYDOC_API_KEY = "<YOUR_POLYDOC_API_KEY>"
```

### Gemini CLI

```sh
gemini mcp add -s user -e 'POLYDOC_API_KEY=<YOUR_POLYDOC_API_KEY>' polydoc-mcp npx -- -y polydoc-mcp
```

### Gemini settings.json (`~/.gemini/settings.json`)

```json
{
  "mcpServers": {
    "polydoc-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "polydoc-mcp"
      ],
      "env": {
        "POLYDOC_API_KEY": "<YOUR_POLYDOC_API_KEY>"
      }
    }
  }
}
```

## Environment variables

| Name | Required | Secret | Description |
|---|---|---|---|
| `POLYDOC_API_KEY` | yes | yes | API key from dashboard.polydoc.tech. |
| `POLYDOC_BASE_URL` | no | no | Override for self-hosted or staging use. Defaults to https://api.polydoc.tech. |
| `POLYDOC_OUTPUT_DIR` | no | no | Directory downloads are written to. Defaults to the OS temp dir + /polydoc. |
| `POLYDOC_SANDBOX` | no | no | Default sandbox mode (watermarked, does not use production quota). A tool call can override per request. Defaults to false. |

## Tools (4)

- `polydoc_html_to_pdf`
- `polydoc_screenshot`
- `polydoc_generate_einvoice`
- `polydoc_test_credentials`

## FAQ

### How can I ensure my PDF meets archival or accessibility standards?

You can target PDF/A for archival or PDF/UA-1 for accessibility, and use the verify option to validate the result with veraPDF.

### What formats can I use for screenshots?

The tool supports capturing screenshots in PNG, JPEG, or WebP formats.

### How do I test if my API key is working?

Use the `polydoc_test_credentials` tool to verify your key with a minimal sandbox render that does not use production quota.
