# PaperSprocket [Health: Active]

**Category:** 💻 Developer Tools  
**Repository:** https://github.com/inde-x/papersprocket-mcp  
**GitHub Stars:** 0  
**npm Downloads (last month):** 350  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/papersprocket

## Description
EU-hosted HTML-to-PDF rendering for agents and MCP clients. Temporary document processing.

## Tools
Capabilities this server exposes over MCP:

- **render_html_to_pdf** — ```json
- **check_balance** — ```json

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "papersprocket": {
    "command": "npx",
    "args": ["-y","papersprocket-mcp"],
    "env": {
      "PAPERSPROCKET_API_KEY": "",
      "PAPERSPROCKET_BASE_URL": "",
      "PAPERSPROCKET_MCP_OUTPUT_DIR": ""
    }
  }
}
```

**Requires environment variables:** `PAPERSPROCKET_API_KEY`, `PAPERSPROCKET_BASE_URL`, `PAPERSPROCKET_MCP_OUTPUT_DIR` — the values above are empty placeholders; fill in real credentials before running (see the repository for what each one is for).

## Documentation

## What PaperSprocket MCP server does

The PaperSprocket MCP server connects MCP clients to the hosted PaperSprocket API for HTML-to-PDF rendering. An agent supplies a non-empty HTML string and can optionally specify page settings. PaperSprocket handles the PDF conversion, while the server returns the generated document as an `application/pdf` MCP resource.

The server exposes exactly two tools:

- `render_html_to_pdf` sends HTML to the PaperSprocket API. Its result includes the PDF, render metadata, page count, charge, remaining balance, byte size, an idempotency key, and a local file path when the server can write one.
- `check_balance` reads the configured account's prepaid balance. The response includes the account ID, balance in cents, currency, and page price in cents.

There are no tools for topping up an account or managing API keys. Layout is controlled through the supplied HTML and CSS rather than a business-field schema.

## How it works

The PaperSprocket MCP server is implemented with the Model Context Protocol SDK and communicates with clients over stdio. Each render request receives a new idempotency key. If a transient network error occurs, the server retries up to two times with that same key, allowing the service to recognize the operation as one logical request rather than charging twice. PaperSprocket also deduplicates matching replays using the idempotency key and request hash.

A render can specify `A4` or `Letter` paper, portrait or landscape orientation, per-side margins from 0 to 50 millimeters, and whether to print backgrounds. Defaults are A4, portrait, 10-millimeter margins on every side, and enabled background printing. Unknown page properties are rejected.

## Setup and configuration

Node.js 20 or newer and a PaperSprocket API key are required. The key is loaded from the server environment or its `.env` file; it is never part of a tool input. The published package can be started with `npx -y papersprocket-mcp`, or a source checkout can be run with `node server.js` after `npm ci`.

`PAPERSPROCKET_BASE_URL` optionally changes the API base URL and defaults to `https://papersprocket.com/api`. `PAPERSPROCKET_MCP_OUTPUT_DIR` selects the directory for best-effort local PDF copies and defaults to `./output`. The server loads its `.env` at startup without replacing environment variables that are already set.

## Tools and capabilities

The main rendering input is HTML. The output contains both text metadata and a base64 PDF resource with a `file://` or `urn:` URI. Local file output is useful for filesystem-aware clients, but the MCP resource remains part of the tool response.

The service uses prepaid billing. The documented pricing is $0.02 per page, with an initial $10 credit and $10 top-ups. Account balance inspection is read-only through `check_balance`; payment and credential administration must be handled outside the MCP tools.

## Limitations and notes

The PaperSprocket MCP server only provides rendering and balance inspection. It does not expose top-up, account-management, or API-key-management operations. The API key is sent in the HTTP `Authorization` header and is kept out of agent-controlled arguments. PDFs written to the configured output directory contain the caller's rendered content, so deployments should manage that filesystem location appropriately.

_Full upstream README: https://allmcps.com/mcp/papersprocket/readme_

