DocRaptor MCP server for AI agents

Live

API KEY

PDF GENERATION

Files & Documents

DocRaptor gives your agent HTML to PDF and Excel conversion in your DocRaptor account: convert HTML or web pages into documents, host them at public URLs, expire hosted documents, and check document status.

  • Per-user credentials: each call uses the actual user's API key, never a shared bot.
  • Encrypted per-tenant vault: AES-256, resolved at request time, never in LLM context.
  • Scoped before every call: pre-call scope check, 90-day SIEM-exportable audit chain.
DocRaptor
agent · Acme Q3
Run
Convert this HTML to a hosted PDF.
S
docraptor_hosted_document_create
1240ms
Document agent
Converted the HTML to a PDF and returned the public URL where it is hosted.
Sources: DocRaptor conversion, 1 document
docraptor
1 PDF
18:29
Message Claude...

Tools your pdf generation agent reaches for on DocRaptor, scoped per user.

CALL ANY TOOL
7 tools for PDF generation in DocRaptor: convert HTML or web pages to PDF or Excel, host documents at public URLs, expire them, and check status and document history.
docraptor_document_create_async
Document create async
Start converting HTML or a web page into a PDF or Excel file in the background. Returns a status_id. Poll docraptor_document_status_get with it; when status is completed the response has a temporary download_url. Use this to make a document an agent can fetch by URL. Use docraptor_hosted_document_create_async for a long-lived hosted URL.
Parameters
Name
Type
Required
Description
document_type
string
Required
Kind of document to create: pdf, xls or xlsx. Excel output needs XML content. Example: pdf. One of: `pdf`, `xls`, `xlsx`.
name
string
Required
A name that identifies the document in your DocRaptor documents log. Example: July Invoice for User 1234.
baseurl
string
Optional
PDF only: base URL used to resolve relative asset URLs in document_content. Example: https://example.com/assets/.
callback_url
string
Optional
URL that receives a POST with download_url and download_id when the document is ready. Example: https://example.com/docraptor/callback.
document_content
string
Optional
HTML (or XML for Excel) to convert. Send this or document_url, not both. Example: <html><body><h1>Invoice</h1></body></html>.
document_url
string
Optional
Public URL DocRaptor fetches the HTML from. Send this or document_content, not both. Example: https://docraptor.com/examples/invoice.html.
http_timeout
integer
Optional
PDF only: seconds to wait for each external asset, from 1 to 60. DocRaptor waits 10 by default. Example: 10.
ignore_console_messages
boolean
Optional
When true, JavaScript console messages do not halt rendering. Example: true.
ignore_resource_errors
boolean
Optional
When true (the default), failed image, CSS or script downloads do not stop rendering. Set false to fail on resource errors. Example: true.
javascript
boolean
Optional
Run DocRaptor's JavaScript engine on the page before conversion. Off by default. Example: false.
media
string
Optional
PDF only: CSS media type to apply, print (default) or screen. Try screen if the PDF looks different from the browser. Example: screen. One of: `print`, `screen`.
page_margin
string
Optional
PDF only: page margin as a CSS length. Example: 1in.
pdf_forms
boolean
Optional
PDF only: make HTML form fields editable in the PDF. Example: false.
pdf_title
string
Optional
PDF only: title stored in the PDF metadata. Example: Invoice 1234.
pipeline
string
Optional
DocRaptor pipeline version (Prince and JavaScript engine combination), such as 10.1. Leave empty to use your account default. Example: 10.1.
prince_javascript
boolean
Optional
PDF only: run Prince's own JavaScript engine (needed for canvas drawing). Separate from the javascript option. Example: false.
referrer
string
Optional
HTTP referrer to send when fetching the document and its assets. Example: https://example.com.
strict
string
Optional
Set html to force strict HTML validation, or none. Example: none. One of: `none`, `html`.
tag
string
Optional
A small piece of metadata stored with the document. Example: invoice-1234.
test
boolean
Optional
Create a free, watermarked test document that does not count against your plan. Set false for a production document. Example: true.
docraptor_document_status_get
Get document status
docraptor_documents_list
List documents
docraptor_hosted_document_create
Create hosted document
docraptor_hosted_document_create_async
Hosted document create async
docraptor_hosted_document_expire
Hosted document expire
docraptor_ips_list
List ips
Build your Agent
Same auth pattern across LangChain, OpenAI, Anthropic, and Google ADK.
Python · LlamaIndex
import { ScalekitClient } from "@scalekit-sdk/node";
import { createReactAgent } from "@langchain/langgraph/prebuilt";

const sk = new ScalekitClient(env.SCALEKIT_ENV_URL, env.SCALEKIT_CLIENT_ID, env.SCALEKIT_CLIENT_SECRET);

// DocRaptor tools scoped to this user
const { tools } = await sk.tools.listScopedTools("user_123", {
  filter: { connectionNames: ["docraptor"], toolNames: [
    "docraptor_hosted_document_create_async",
    "docraptor_document_status_get",
    "docraptor_hosted_document_expire"] },
  pageSize: 100,
});

const agent = createReactAgent({ llm, tools });
await agent.invoke({ messages: [{ role: "user", content: "Start a hosted PDF conversion of this report page, check its status, then expire the link" }] });
import OpenAI from "openai";
import { ScalekitClient } from "@scalekit-sdk/node";

const sk = new ScalekitClient(env.SCALEKIT_ENV_URL, env.SCALEKIT_CLIENT_ID, env.SCALEKIT_CLIENT_SECRET);
const openai = new OpenAI();

const { tools } = await sk.tools.listScopedTools("user_123", {
  filter: { connectionNames: ["docraptor"] }, pageSize: 100,
});

const res = await openai.chat.completions.create({
  model: "gpt-5",
  messages: [{ role: "user", content: "Start a hosted PDF conversion of this report page, check its status, then expire the link" }],
  tools,
});

// Execute the tool call with the user's vaulted DocRaptor API key
await sk.tools.executeTool(res.choices[0].message.tool_calls[0], "user_123");
import Anthropic from "@anthropic-ai/sdk";
import { ScalekitClient } from "@scalekit-sdk/node";

const sk = new ScalekitClient(env.SCALEKIT_ENV_URL, env.SCALEKIT_CLIENT_ID, env.SCALEKIT_CLIENT_SECRET);
const anthropic = new Anthropic();

const { tools } = await sk.tools.listScopedTools("user_123", {
  filter: { connectionNames: ["docraptor"] }, pageSize: 100,
});

const msg = await anthropic.messages.create({
  model: "claude-sonnet-5",
  max_tokens: 1024,
  messages: [{ role: "user", content: "Start a hosted PDF conversion of this report page, check its status, then expire the link" }],
  tools,
});

// Tool call runs with the user's vaulted DocRaptor API key
await sk.tools.executeTool(msg.content, "user_123");
import { Agent } from "@google/adk/agents";
import { ScalekitClient } from "@scalekit-sdk/node";

const sk = new ScalekitClient(env.SCALEKIT_ENV_URL, env.SCALEKIT_CLIENT_ID, env.SCALEKIT_CLIENT_SECRET);

const { tools } = await sk.tools.listScopedTools("user_123", {
  filter: { connectionNames: ["docraptor"] }, pageSize: 100,
});

const agent = new Agent({
  name: "document_agent",
  model: "gemini-2.5-pro",
  instruction: "DocRaptor tools scoped to this user",
  tools,
});

await agent.run("Start a hosted PDF conversion of this report page, check its status, then expire the link");
Try these prompts
Copy any prompt into your agent. Each maps directly to a DocRaptor tool. Click to copy, paste into your agent, done.
Convert
Copy the prompt
Copied
Convert this HTML to a PDF in the background.
Copy the prompt
Copied
Convert https://example.com/report to a PDF in the background.
Copy the prompt
Copied
Convert this HTML table to an Excel file in the background.
Hosted documents
Copy the prompt
Copied
Convert this invoice HTML to a PDF and host it at a public URL.
Copy the prompt
Copied
Start a hosted PDF conversion of this pricing page.
Copy the prompt
Copied
Expire the hosted report so its public URL stops working.
Status and history
Copy the prompt
Copied
Check the status of async document abc123.
Copy the prompt
Copied
List the documents I created recently.
Copy the prompt
Copied
List the IP addresses DocRaptor uses to download assets.
SEE HOW AUTH WORKS
Each user connects their own DocRaptor API key once, and Scalekit sends it with every call. API keys stay vaulted, every call is scope checked, and every action is logged.
1
Authorize
Your user connects
DocRaptor
once. We tie it to their identity and the access they approved, with no shared bot account and no org-wide access
Who:
user ‘A’
when:
Once per user
access:
Limited to user
2
Store
Their
DocRaptor
credential lives in a vault scoped to them. User A's data is never reachable by an agent acting for user B, even on the same connection
vault:
encrypted
scope:
per-user
tenants:
isolated
3
Resolve
When your agent calls a
DocRaptor
tool, we fetch the right credential server-side. It never touches your agent, never appears in the LLM context, never shows up in your logs
speed:
~40ms
check:
before every call
seen by:
nobody
4
Audit
Every
DocRaptor
tool call is logged: who triggered it, which tool ran, what came back. 90 days of history, tied to the user who authorized it
history:
90 days
export:
SIEM-ready
logged:
every call
Test other agents
See the same per-user auth pattern across other file and document connectors.
GTM and RevOps Teams
Deal room sync
Pulls opportunity context from Salesforce, captures key decisions from Slack, and syncs a running summary to the deal room doc in Google Drive, but only when the deal actually changed.
Test other agents
See the same per-user auth pattern across other file and document connectors.
GTM
Deal room sync agent
Pull opportunity context from Salesforce, capture decisions from Slack, and keep the Google Drive deal room doc current.
Why Scalekit
Secure your agent's access. Connectors ship in minutes
01.
Shared tokens break per-user analytics
A shared DocRaptor API key looks fine in a demo. In production every conversion looks like one service account, and you cannot tell which user triggered it. Scalekit resolves the credential of the actual user who triggered the agent, never a shared bot.
// shared key
audit → bot_service_account

// scalekit
audit → user_abc ✓
02.
Authentication is not authorization
03.
Multi-tenancy is architectural
04.
DocRaptor today. Ten connectors tomorrow.
“Our agents act across Salesforce, Gong, Google Drive, and more, on behalf of every customer. Scalekit behind the scenes meant we can keep adding tools without ever rebuilding how credentials or tool calling work.”
Venu Madhav Kattagoni
Head of Engineering / Von
FAQs
Frequently Asked Questions
Does the agent access DocRaptor as the user or through a shared key?
As the user. Each user connects their own DocRaptor API key once, and Scalekit sends it with every call. Audit logs attribute every conversion to that user, not a shared service account.
Where is the DocRaptor API key stored?
In Scalekit's managed AES-256 token vault, namespaced per tenant. To rotate it, the user reconnects with a new API key. Revocation is a single dashboard action. Credentials never appear in prompts, logs, or LLM context.
Can I limit what the agent does in DocRaptor?
Yes. Filter by tool name in listScopedTools to expose only what you want, for example the list and status tools without docraptor_hosted_document_expire, which expires a hosted document so its public URL stops working. 1 of the 7 tools is destructive. Scalekit also enforces scope checks before every API call.
What happens when a user revokes DocRaptor access?
The connection is invalidated on the next tool call. Subsequent requests for that user fail closed with a clear error. Other users in the tenant remain unaffected. The event is logged for audit.
Can the agent convert a live web page instead of HTML?
Yes. docraptor_document_create_async, docraptor_hosted_document_create, and docraptor_hosted_document_create_async each convert HTML or a web page into a PDF or Excel file.
Start in your coding agent
Up and running in one command
Install the Scalekit skill in your editor of choice. Connector, auth, tools, prompt, all wired up
Claude Code REPL
/plugin marketplace add scalekit-inc/claude-code-authstack
/plugin install agentkit@scalekit-auth-stack
Cursor Code REPL
# ~/.cursor/mcp.json
{
""mcpServers"": {
""docraptor"": {
""url"": ""https://mcp.scalekit.com/docraptor"",
""headers"": { ""Authorization"": ""Bearer $SCALEKIT_TOKEN"" }
}
}
}
Codex Code REPL
# ~/.codex/config.toml
[mcp_servers.docraptor]
url = ""https://mcp.scalekit.com/docraptor""
auth_env = ""SCALEKIT_TOKEN""
Copilot Code REPL
# .vscode/mcp.json
{
""servers"": {
""docraptor"": {
""url"": ""https://mcp.scalekit.com/docraptor"",
""type"": ""http""
}
}
}