# @docweave/mcp [![docweave-mcp MCP server](https://glama.ai/mcp/servers/NicolasMartalog/docweave-mcp/badges/card.svg)](https://glama.ai/mcp/servers/NicolasMartalog/docweave-mcp) The open-source MCP server for **[Docweave](https://docweave.dev)** — give any MCP client (Claude, Cursor, Windsurf, and others) two document tools: - **`generate_pdf`** — turn raw HTML, a public URL, or a template + JSON into a real PDF. - **`read_pdf`** — turn a PDF (URL or base64) into clean text / markdown, with a `needsOcr` flag for scanned documents. One MCP server for an agent's document I/O — write a document, read a document — priced per document, not per page. ## Install ```bash npx @docweave/mcp ``` Or use the zero-install hosted endpoint: `https://docweave.dev/api/mcp`. ### Claude Desktop ```json { "mcpServers": { "docweave": { "command": "npx", "args": ["-y", "@docweave/mcp"] } } } ``` Tool calls that hit the hosted API authenticate with a Docweave API key (`Authorization: Bearer dw_live_…`) — get one free at (50 documents/month, no card). ## Tools ### `generate_pdf` `source` (one of: raw `html`, a public `url`, or a `template` + `data`) → a PDF. Optional page `options` (format, landscape, margins). Idempotency-key aware, SSRF-guarded URL rendering. ### `read_pdf` `source` (`url` or `base64`) → extracted `content` (markdown or text) + `pageCount`. Scanned/image PDFs return `needsOcr: true` instead of empty text. ## About this repo This is the source of the [`@docweave/mcp`](https://www.npmjs.com/package/@docweave/mcp) npm package, published from the Docweave monorepo and listed on the [official MCP registry](https://registry.modelcontextprotocol.io) as `io.github.NicolasMartalog/docweave-mcp`. The npm package ships bundled with its render engine; install it with `npx` as above. ## License MIT