Official PaperSprocket MCP server for rendering HTML to PDF and checking prepaid account balance via MCP.
- ✓Open-source license (MIT)
- ✓Actively maintained (<30d)
- ✓Clear description
- ✓Documented (README)
claude mcp add papersprocket-mcp -- npx -y papersprocket-mcp{
"mcpServers": {
"papersprocket-mcp": {
"command": "npx",
"args": ["-y", "papersprocket-mcp"],
"env": {
"PAPERSPROCKET_API_KEY": "<papersprocket_api_key>",
"PAPERSPROCKET_BASE_URL": "<papersprocket_base_url>"
}
}
}
}PAPERSPROCKET_API_KEYPAPERSPROCKET_BASE_URLResumen de MCP Servers
# PaperSprocket MCP server
A [Model Context Protocol](https://modelcontextprotocol.io) (MCP) server that
gives MCP clients direct access to the **PaperSprocket** API. It exposes
**exactly two tools**:
| Tool | Description |
|------|-------------|
| `render_html_to_pdf(html, page?)` | Render HTML to a PDF through the PaperSprocket API. Returns the PDF as an `application/pdf` MCP resource (base64 blob), a local file path when the server can write one, and render metadata (`render_id`, `page_count`, `charged_cents`, `balance_cents`). Billed to the configured account. |
| `check_balance(account_id)` | Read the prepaid balance of the configured PaperSprocket account. Returns `account_id`, `balance_cents`, `currency`, and `page_price_cents`. |
This is a minimal native MCP server built directly on
`@modelcontextprotocol/sdk`. No top-up tools, no API-key-management tools —
just render and balance-check.
## What is PaperSprocket?
PaperSprocket is a hosted API that turns HTML into PDFs. You send it HTML, it
returns a well-formed PDF. There is no business-field schema to learn: you
control the layout with your own HTML and CSS, PaperSprocket handles the PDF
processing. See the official [documentation](https://papersprocket.com/docs).
## Requirements
- Node.js >= 20
- A PaperSprocket API key. The server reads it from **server-side config
only** (environment or `.env`) — it is **never** a caller-supplied tool
argument, and is never embedded in source, examples, or this document.
## Install
### Run via npx (primary)
```bash
npx -y papersprocket-mcp
```
The package `papersprocket-mcp` is published to npm and registered in the
official MCP Registry under identity `io.github.inde-x/papersprocket` (active,
version 1.0.0). Point your MCP client at `npx -y papersprocket-mcp` and provide
`PAPERSPROCKET_API_KEY` in the client's environment (the server reads it
server-side only).
### From source (optional / development)
```bash
git clone https://github.com/inde-x/papersprocket-mcp.git
cd papersprocket-mcp
npm ci
cp .env.example .env # then set PAPERSPROCKET_API_KEY (see Configuration)
```
## Configuration
The server loads `<serverdir>/.env` at startup (it does not override
already-set environment variables). `.env` is gitignored.
| Variable | Required | Default | Purpose |
|----------|----------|---------|---------|
| `PAPERSPROCKET_API_KEY` | **yes** | — | Your PaperSprocket API key. Secret/config state — never a tool argument. |
| `PAPERSPROCKET_BASE_URL` | no | `https://papersprocket.com/api` | API base URL. Fixed/config state. |
| `PAPERSPROCKET_MCP_OUTPUT_DIR` | no | `./output` | Directory where rendered PDFs are also written (best-effort) for filesystem-local clients. |
Example `.env` (replace the placeholder — never commit a real key):
```bash
PAPERSPROCKET_API_KEY=psk_your_api_key_here
# PAPERSPROCKET_BASE_URL=https://papersprocket.com/api
# PAPERSPROCKET_MCP_OUTPUT_DIR=./output
```
## Run (stdio)
```bash
node server.js # MCP over stdio
node server.js --list-tools # print tool schemas, then exit
```
### Connect an MCP client
Point your MCP client at a stdio server:
```
# primary — published npm distribution:
Command: npx
Arguments: -y papersprocket-mcp
# or a local source checkout:
Command: node
Arguments: /path/to/papersprocket-mcp/server.js
```
`PAPERSPROCKET_API_KEY` is provided via the server `.env` or environment —
never in the client configuration.
### MCP Inspector
```bash
npx @modelcontextprotocol/inspector node /path/to/papersprocket-mcp/server.js
```
List tools → confirm exactly two: `render_html_to_pdf` and `check_balance`.
## Tool schemas
### `render_html_to_pdf`
```json
{
"html": { "type": "string", "description": "HTML to render (non-empty)." },
"page": {
"properties": {
"size": { "enum": ["A4", "Letter"] },
"orientation": { "enum": ["portrait", "landscape"] },
"margin_mm": { "top|right|bottom|left": { "type": "number", "minimum": 0, "maximum": 50 } },
"print_background": { "type": "boolean" }
}
}
}
```
- `html` — required, non-empty string.
- `page` — optional. Defaults mirror the service's closed v1 schema: `size`
`A4`, `orientation` `portrait`, `margin_mm` `10` on all sides,
`print_background` `true`. Unknown fields are rejected.
**Result** (two MCP content blocks):
1. `text` — metadata JSON: `tool`, `format`, `render_id`, `page_count`,
`charged_cents`, `balance_cents`, `bytes`, `file_path`, `idempotency_key`.
2. `resource` — `application/pdf` blob (base64) with a `file://` (or `urn:`)
URI.
### `check_balance`
```json
{ "account_id": { "type": "string" } }
```
- `account_id` — required, non-empty string.
**Result:** `{ account_id, balance_cents, currency, page_price_cents }`
(text block).
## Idempotency
- A **fresh random idempotency key** is generated for each logical render.
- On a transient network failure the server retries up to 2× **reusing the
same key**, so a retry of one logical render cannot double-charge.
- Server-side, PaperSprocket dedupes on `(Idempotency-Key, request hash)`, so a
true replay returns the original result without a second debit.
## Security / secret boundary
- `PAPERSPROCKET_API_KEY` is read from `.env` / environment — it is **not** a
field in any tool input schema.
- `PAPERSPROCKET_BASE_URL` is fixed/config state, not an agent-controlled
argument.
- The key is sent only as the `Authorization` HTTP header. No other
credentials exist.
- Rendered PDFs written to `output/` are your own content; the directory is
gitignored.
## Pricing
- **$10** initial prepaid credit
- **$10** top-ups
- **$0.02 / page**
## Getting a key
Create a PaperSprocket account to get your API key and prepaid credit:
- Onboarding: https://papersprocket.com/onboarding/?source=mcp
## License
MIT — see [LICENSE](LICENSE).Lo que la gente pregunta sobre papersprocket-mcp
¿Qué es inde-x/papersprocket-mcp?
+
inde-x/papersprocket-mcp es mcp servers para el ecosistema de Claude AI. Official PaperSprocket MCP server for rendering HTML to PDF and checking prepaid account balance via MCP. Tiene 0 estrellas en GitHub y su última actualización registrada es del 2026-10-01.
¿Cómo se instala papersprocket-mcp?
+
Puedes instalar papersprocket-mcp clonando el repositorio (https://github.com/inde-x/papersprocket-mcp) o siguiendo las instrucciones del README en GitHub. ClaudeWave también te ofrece bloques de instalación rápida en esta misma página.
¿Es seguro usar inde-x/papersprocket-mcp?
+
Nuestro agente de seguridad ha analizado inde-x/papersprocket-mcp y le ha asignado un Trust Score de 87/100 (tier: Trusted). Revisa el desglose completo de comprobaciones superadas y flags en esta página.
¿Quién mantiene inde-x/papersprocket-mcp?
+
inde-x/papersprocket-mcp es mantenido por inde-x. La última actividad registrada en GitHub es del 2026-10-01, con 0 issues abiertos.
¿Hay alternativas a papersprocket-mcp?
+
Sí. En ClaudeWave puedes explorar mcp servers similares en /categories/mcp, ordenados por popularidad o actividad reciente.
Despliega papersprocket-mcp en tu cloud
Lleva este repo a producción en minutos. Cada plataforma genera su propio entorno con variables de entorno editables.
¿Mantienes este repo? Añade un badge a tu README
Pega el badge en tu README de GitHub para mostrar que está auditado por ClaudeWave. Cada badge enlaza de vuelta a esta página y muestra el Trust Score actual.
[](https://claudewave.com/repo/inde-x-papersprocket-mcp)<a href="https://claudewave.com/repo/inde-x-papersprocket-mcp"><img src="https://claudewave.com/api/badge/inde-x-papersprocket-mcp" alt="Featured on ClaudeWave: inde-x/papersprocket-mcp" width="320" height="64" /></a>Más MCP Servers
Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.
User-friendly AI Interface (Supports Ollama, OpenAI API, ...)
An open-source AI agent that brings the power of Gemini directly into your terminal.
Real-time global intelligence dashboard. AI-powered news aggregation, geopolitical monitoring, and infrastructure tracking in a unified situational awareness interface
🕷️ An adaptive Web Scraping framework that handles everything from a single request to a full-scale crawl! Don't be shy, join here: https://discord.gg/EMgGbDceNQ and follow here for daily tips and tricks: https://x.com/Scrapling_dev
The fastest path to AI-powered full stack observability, even for lean teams.