PaperSprocket MCP server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@PaperSprocket MCP serverRender this HTML invoice to an A4 PDF and show the cost."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
PaperSprocket MCP server
A Model Context Protocol (MCP) server that gives MCP clients direct access to the PaperSprocket API. It exposes exactly two tools:
Tool | Description |
| Render HTML to a PDF through the PaperSprocket API. Returns the PDF as an |
| Read the prepaid balance of the configured PaperSprocket account. Returns |
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.
Related MCP server: @docweave/mcp
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
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 |
| yes | — | Your PaperSprocket API key. Secret/config state — never a tool argument. |
| no |
| API base URL. Fixed/config state. |
| no |
| Directory where rendered PDFs are also written (best-effort) for filesystem-local clients. |
Example .env (replace the placeholder — never commit a real key):
PAPERSPROCKET_API_KEY=psk_your_api_key_here
# PAPERSPROCKET_BASE_URL=https://papersprocket.com/api
# PAPERSPROCKET_MCP_OUTPUT_DIR=./outputRun (stdio)
node server.js # MCP over stdio
node server.js --list-tools # print tool schemas, then exitConnect an MCP client
Point your MCP client at a stdio server (this example uses a generic path):
Command: node
Arguments: /path/to/papersprocket-mcp/server.jsPAPERSPROCKET_API_KEY is provided via the server .env or environment —
never in the client configuration.
MCP Inspector
npx @modelcontextprotocol/inspector node /path/to/papersprocket-mcp/server.jsList tools → confirm exactly two: render_html_to_pdf and check_balance.
Tool schemas
render_html_to_pdf
{
"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:sizeA4,orientationportrait,margin_mm10on all sides,print_backgroundtrue. Unknown fields are rejected.
Result (two MCP content blocks):
text— metadata JSON:tool,format,render_id,page_count,charged_cents,balance_cents,bytes,file_path,idempotency_key.resource—application/pdfblob (base64) with afile://(orurn:) URI.
check_balance
{ "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_KEYis read from.env/ environment — it is not a field in any tool input schema.PAPERSPROCKET_BASE_URLis fixed/config state, not an agent-controlled argument.The key is sent only as the
AuthorizationHTTP 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.
Available Tools
2 toolscheck_balanceB
Check the prepaid balance of the configured PaperSprocket account. Returns account_id, balance_cents, currency, and page_price_cents.
| Name | Required | Description | Default |
|---|---|---|---|
| account_id | Yes | The PaperSprocket account id to query. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the burden. It transparently discloses the return payload (account_id, balance_cents, currency, page_price_cents), which is valuable given there is no output schema, and the read-only nature of a balance check is implied. However, it says nothing about auth requirements, rate limits, or error behavior.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two tight sentences, zero waste. The purpose is front-loaded and the return fields follow immediately, making it easy to scan.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a trivial one-parameter read tool with no output schema and no annotations, the description covers purpose and return shape adequately. Only peripheral details (auth, error cases) are absent, which is reasonable at this complexity.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% and the single parameter is fully documented in the schema, so the baseline is 3. The description adds nothing about the account_id parameter; it actually refers to a 'configured' account, which mildly blurs whether the id is supplied or implicit.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Specific verb+resource: 'Check the prepaid balance of the configured PaperSprocket account.' It also enumerates the returned fields, so an agent knows exactly what it gets. It does not differentiate from the sibling render_html_to_pdf, but that sibling is functionally unrelated, so differentiation is unnecessary.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No explicit when-to-use or when-not-to-use guidance, and no mention of alternatives or prerequisites. Usage is only implied by the verb 'check' — an agent must infer that this is the balance-verification tool.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
render_html_to_pdfA
Render HTML to a PDF through the PaperSprocket API. Returns the PDF as an application/pdf embedded resource (base64 blob), the local file path when the server can write it, and render metadata (render_id, page_count, charged_cents, balance_cents). Billed to the configured PaperSprocket account.
| Name | Required | Description | Default |
|---|---|---|---|
| html | Yes | HTML to render (non-empty). | |
| page | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden and does well: it discloses that the call is billed to the configured account (charged_cents, balance_cents), what artifacts come back (embedded base64 resource, local file path when writable), and render metadata. It omits auth requirements, failure modes, and rate limits, so it is strong but not exhaustive.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two tightly written sentences, with the core action front-loaded and the return/billing details following in order of importance. No filler.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With no output schema, the description usefully documents the return shape (embedded resource, file path, render metadata) and the billing implication, which is exactly the value it needs to add. It stops short of covering error conditions or authentication, but for a 2-parameter render tool it is largely complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is only 50%, and the description adds nothing about parameters beyond 'HTML to PDF'. Key semantics such as default page size, margin defaults, and orientation live only in the nested schema, so the description fails to compensate for the coverage gap.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb (render) and resource (HTML to PDF) and names the backing service (PaperSprocket API). An agent immediately knows what the tool produces without opening the schema.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Usage is implied by the purpose (convert HTML when a PDF is needed) and the sole sibling check_balance is unrelated, so no explicit routing is necessary. However, the description gives no when-to-use conditions, prerequisites, or limits, leaving guidance at the implied level.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
2 tool updates
v1.0.0- First observed
check_balance - First observed
render_html_to_pdf
TDQS
Scored across 2 tools
The two tools have clearly distinct purposes: one performs the core rendering action and the other retrieves account balance information. There is no overlap or ambiguity in when to use each tool.
Both tools follow a consistent snake_case verb_noun pattern (render_html_to_pdf, check_balance). The convention is predictable and readable.
With only two tools, the surface feels thin for a server that wraps a rendering API. While each tool earns its place, the set is minimal and may leave agents wanting more operations.
The core workflow of rendering HTML to PDF and checking balance is covered, but there are minor gaps such as retrieving render history, checking render status, or managing account details. These gaps are unlikely to block basic usage.
Maintenance
Related MCP Connectors
Remote MCP server for HTML-to-PDF and screenshots with OAuth and API-key auth.
Render HTML, Markdown, or URLs to images, PDF, or branded artifacts; extract and watch pages.
MCP server for Api2Pdf — generate PDFs & images from HTML, URLs or office files; merge, barcodes.
Cloud PDF generation from HTML, CSS and XSL-FO, with PDF/A and PDF/UA support.
Related MCP Servers
AlicenseAqualityBmaintenanceRender branded PDF documents (invoices, reports, certificates) and PNG social images directly from any MCP client using DocJet templates or raw HTML with JSON data.338 npmMIT- AlicenseAqualityBmaintenanceWrite and read PDF documents via MCP: generate PDFs from HTML, URLs, or templates, and extract text from PDFs with OCR support.251 npmMIT
- AlicenseNot gradedqualityCmaintenanceLets MCP clients create professional receipt PDFs, return structured receipt data, and check prepaid API credit through a remote endpoint.1MIT
- AlicenseNot gradedqualityCmaintenanceProvides a single MCP endpoint for 90+ tools across 42 backend servers (search, legal, domain, etc.) with per-call credit billing and a single API key.1MIT