AI-First PDF Generation
Give your AI agents the power to generate documents. Native Model Context Protocol support for Claude, GPT, and any MCP-compatible framework.
Supported AI Platforms
Works with any LLM that supports tool use
Claude
Anthropic's Claude with native MCP support for tool use
-
Native MCP protocol support -
Context-aware document generation -
Structured output handling -
Multi-turn conversations
OpenAI GPT
GPT-4 and GPT-3.5 with function calling for PDF generation
-
Function calling API -
JSON mode for structured data -
Vision for document analysis -
Assistants API compatible
Custom Agents
Build your own AI agents with pdf-mcp as a core tool
-
LangChain integration -
AutoGPT compatible -
CrewAI support -
Any LLM framework
What is Model Context Protocol?
MCP is an open protocol that enables AI models to securely interact with external tools and data sources. Think of it as a standardized way for AI agents to use APIs and services.
- Secure by Design Sandboxed tool execution with explicit permissions
- Standardized Interface One protocol works across all compatible LLMs
- Real-time Execution Tools execute during conversation, not after
> TOOL_CALL generate_pdf
> INPUT { html: "<h1>Report</h1>..." }
> EXECUTING pdf-mcp API call...
> SUCCESS PDF generated (156KB)
> OUTPUT { url: "https://..." }
> COMPLETE Tool result returned to LLM
What Agents Can Build
Real-world applications for AI-powered document generation
Let users request documents in natural language. Your AI agent understands the request, gathers data, and generates professional PDFs on demand.
Generate summary documents from retrieved context. Perfect for research assistants that compile findings into downloadable reports.
Use pdf-mcp as a shared tool across multiple AI agents. One agent researches, another analyzes, and a third generates the final document.
AI agents can generate personalized documentation, troubleshooting guides, or case summaries as PDFs during support interactions.
AI agents that monitor systems or analyze data can automatically generate periodic PDF reports with insights and recommendations.
Sales AI agents can create customized proposals and contracts based on conversation context and customer requirements.
How It Works
Add PDF generation to your agent in 4 steps
Get Your API Key
Sign up and receive your API key instantly. 100 free credits coupon on signup.
Configure MCP Tool
Add pdf-mcp as a tool in your agent's configuration or system prompt.
Define Tool Schema
Register the tool with proper input/output schemas for your LLM.
Generate Documents
Your agent can now generate PDFs whenever needed during conversations.
Integration Examples
Copy-paste configurations for your AI framework
MCP Tool Schema
// MCP Tool Definition for pdf-mcp
{
"name": "generate_pdf",
"description": "Generate a PDF document from HTML content",
"input_schema": {
"type": "object",
"properties": {
"html": {
"type": "string",
"description": "HTML content to render as PDF"
},
"filename": {
"type": "string",
"description": "Suggested filename for the PDF"
},
"options": {
"type": "object",
"properties": {
"format": { "type": "string", "enum": ["A4", "Letter"] },
"landscape": { "type": "boolean" }
}
}
},
"required": ["html"]
}
}
Claude Desktop
# Claude Desktop MCP Configuration
# Add to ~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"pdf-mcp": {
"command": "npx",
"args": ["-y", "@anthropic/mcp-server-pdf"],
"env": {
"PDF_MCP_API_KEY": "your-api-key-here"
}
}
}
}
LangChain Python
from langchain.tools import Tool
from langchain.agents import AgentExecutor
import requests
def generate_pdf(html: str, options: dict = None) -> dict:
"""Generate PDF from HTML using pdf-mcp API"""
response = requests.post(
"https://api.pdf-mcp.io/htmlToPdf",
headers={
"Authorization": f"Bearer {API_KEY}",
"Content-Type": "application/json"
},
json={"html": html, "options": options or {}}
)
return response.json()
pdf_tool = Tool(
name="generate_pdf",
description="Generate a PDF document from HTML content",
func=lambda x: generate_pdf(x)
)
# Add to your agent's tools
agent = AgentExecutor(tools=[pdf_tool, ...]) For OpenAI function calling, AutoGPT, CrewAI, and other frameworks, see our complete integration documentation.
Perfect for RAG Pipelines
Retrieval-Augmented Generation workflows often need to produce final documents from retrieved context. pdf-mcp fits naturally into this pattern.
[14:32:01] RETRIEVE Querying vector DB...
[14:32:02] FOUND 12 relevant documents
[14:32:03] AUGMENT Sending to LLM with context
[14:32:08] SYNTHESIZE Generating report content...
[14:32:09] GENERATE Calling pdf-mcp API
[14:32:10] COMPLETE research-report.pdf ready
Why Use pdf-mcp for AI?
- Built for LLMs Designed from the ground up for AI agent workflows
- Sub-Second Generation Fast enough for real-time conversational use
- Simple Tool Interface Just HTML in, PDF out. No complex configuration
- Secure & Flexible Storage Managed storage, BYOB, or fully stateless mode
USER Create a summary report of our Q4 sales data
AGENT I'll analyze the Q4 data and generate a report.
> TOOL query_database(period="Q4")
> OK Retrieved 1,247 transactions
> TOOL generate_pdf(html="...")
> OK PDF generated successfully
AGENT Here's your Q4 Sales Report: [Download PDF]
Give Your AI Agents Superpowers
Connect your AI Agent via MCP in 30 seconds. 100 free credits coupon on signup.