PDF Gen Studio MCP Server
Allows Windsurf (Codeium) to generate PDFs and images from templates, JSON, HTML, or URLs, and manage templates.
Enables running the MCP server as a Docker container for use with MCP-compatible clients, including Docker Desktop's MCP Toolkit.
Allows GitHub Copilot in VS Code to generate PDFs and images from templates, JSON, HTML, or URLs, and manage templates.
Allows JetBrains IDEs via the Continue extension to generate PDFs and images from templates, JSON, HTML, or URLs, and manage templates.
Click on "Install 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., "@PDF Gen Studio MCP ServerGenerate a PDF from this URL: https://example.com"
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.
PDF Gen Studio MCP Server
A Model Context Protocol (MCP) server for PDF Gen Studio - Generate PDFs and images from templates, JSON, HTML, or URLs.
Features
📄 Template Rendering - Render saved templates with dynamic data injection
🔧 JSON Rendering - Convert JSON design documents to PDF/images
🌐 HTML Rendering - Convert HTML/CSS content to PDF/images
📸 URL Rendering - Screenshot any website URL as PDF/images
📋 Template Management - List and retrieve your saved templates
Related MCP server: Yakpdf MCP Server
Installation
Using npm (Global)
npm install -g @pdfgenstudio/mcpUsing npx (No Install)
npx @pdfgenstudio/mcpFrom Source
git clone https://github.com/Majid9287/pdfgenstudio-mcp.git
cd pdfgenstudio-mcp
npm install
npm run buildUsing Docker
docker pull mcp/pdfgenstudio:latestOr build locally:
docker build -t mcp/pdfgenstudio .Configuration
Environment Variables
Set your PDF Gen Studio API key:
export PDFGENSTUDIO_API_KEY="your-api-key-here"Or on Windows (PowerShell):
$env:PDFGENSTUDIO_API_KEY = "your-api-key-here"Or on Windows (Command Prompt):
set PDFGENSTUDIO_API_KEY=your-api-key-hereOptional Configuration
Variable | Description | Default |
| Your PDF Gen Studio API key | Required |
| API base URL |
|
Usage
As stdio Server (Default)
# Using global install
pdfgenstudio-mcp
# Using npx
npx @pdfgenstudio/mcp
# With explicit transport
pdfgenstudio-mcp --transport stdioAs HTTP Server
# Start HTTP server on port 3100
pdfgenstudio-mcp --transport http --port 3100
# Or with custom port
pdfgenstudio-mcp -t http -p 8080Development & Testing
# Test with fastmcp CLI
npm run test
# Inspect with MCP Inspector
npm run inspect🔌 Client Integrations
Claude Desktop
Add to your Claude Desktop configuration file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
Linux: ~/.config/Claude/claude_desktop_config.json
Using npx (Recommended)
{
"mcpServers": {
"pdfgenstudio": {
"command": "npx",
"args": ["-y", "@pdfgenstudio/mcp"],
"env": {
"PDFGENSTUDIO_API_KEY": "your-api-key-here"
}
}
}
}Using Local Installation
{
"mcpServers": {
"pdfgenstudio": {
"command": "node",
"args": ["/absolute/path/to/pdfgenstudio-mcp/dist/index.js"],
"env": {
"PDFGENSTUDIO_API_KEY": "your-api-key-here"
}
}
}
}After editing, restart Claude Desktop completely.
Docker Desktop (MCP Toolkit)
PDF Gen Studio MCP is available in Docker Desktop's MCP Toolkit catalog.
Option 1: Using Docker Desktop MCP Toolkit UI
Open Docker Desktop
Go to Extensions → MCP Toolkit
Search for "pdfgenstudio" in the catalog
Click Install and configure your API key
Option 2: Manual Configuration
Add to your Claude Desktop configuration to use the Docker image:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"pdfgenstudio": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e", "PDFGENSTUDIO_API_KEY=your-api-key-here",
"mcp/pdfgenstudio:latest"
]
}
}
}Running Docker Container Directly
# Run in stdio mode (default) - for MCP client integration
docker run -it --rm \
-e PDFGENSTUDIO_API_KEY="your-api-key-here" \
mcp/pdfgenstudio:latest
# Run in HTTP mode - for local development/testing
docker run -it --rm -p 3100:3100 \
-e PDFGENSTUDIO_API_KEY="your-api-key-here" \
mcp/pdfgenstudio:latest node dist/index.js --transport http --port 3100Using Docker Compose
# Create .env file with your API key
echo "PDFGENSTUDIO_API_KEY=your-api-key-here" > .env
# Run in stdio mode (default)
docker-compose up -d pdfgenstudio-mcp
# Run in HTTP mode (for local testing)
docker-compose --profile http up -d pdfgenstudio-mcp-httpVS Code (GitHub Copilot)
VS Code supports MCP servers through the GitHub Copilot extension.
Step 1: Enable MCP in VS Code
Open VS Code Settings (
Ctrl+,orCmd+,)Search for
github.copilot.chat.experimental.mcpEnable the setting
Step 2: Configure MCP Server
Create or edit .vscode/mcp.json in your workspace:
{
"servers": {
"pdfgenstudio": {
"command": "npx",
"args": ["-y", "@pdfgenstudio/mcp"],
"env": {
"PDFGENSTUDIO_API_KEY": "your-api-key-here"
}
}
}
}Or add to your VS Code User Settings (settings.json):
{
"github.copilot.chat.experimental.mcp": true,
"mcp": {
"servers": {
"pdfgenstudio": {
"command": "npx",
"args": ["-y", "@pdfgenstudio/mcp"],
"env": {
"PDFGENSTUDIO_API_KEY": "your-api-key-here"
}
}
}
}
}Using Local Installation in VS Code
{
"servers": {
"pdfgenstudio": {
"command": "node",
"args": ["C:/path/to/pdfgenstudio-mcp/dist/index.js"],
"env": {
"PDFGENSTUDIO_API_KEY": "your-api-key-here"
}
}
}
}Cursor
Cursor has built-in MCP support. Configure it in Cursor settings.
Step 1: Open Cursor Settings
Open Cursor
Go to
Settings→Cursor Settings→MCPOr press
Ctrl+Shift+P/Cmd+Shift+Pand search "MCP"
Step 2: Add MCP Server
Add the following configuration:
{
"mcpServers": {
"pdfgenstudio": {
"command": "npx",
"args": ["-y", "@pdfgenstudio/mcp"],
"env": {
"PDFGENSTUDIO_API_KEY": "your-api-key-here"
}
}
}
}Alternative: Edit Config File Directly
macOS: ~/.cursor/mcp.json
Windows: %USERPROFILE%\.cursor\mcp.json
Linux: ~/.cursor/mcp.json
{
"mcpServers": {
"pdfgenstudio": {
"command": "npx",
"args": ["-y", "@pdfgenstudio/mcp"],
"env": {
"PDFGENSTUDIO_API_KEY": "your-api-key-here"
}
}
}
}Windsurf (Codeium)
Windsurf supports MCP through its configuration.
Configuration File Location
macOS: ~/.codeium/windsurf/mcp_config.json
Windows: %USERPROFILE%\.codeium\windsurf\mcp_config.json
Linux: ~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"pdfgenstudio": {
"command": "npx",
"args": ["-y", "@pdfgenstudio/mcp"],
"env": {
"PDFGENSTUDIO_API_KEY": "your-api-key-here"
}
}
}
}Zed Editor
Zed has native MCP support. Configure in Zed settings.
Configuration
Edit ~/.config/zed/settings.json:
{
"language_models": {
"mcp_servers": {
"pdfgenstudio": {
"command": "npx",
"args": ["-y", "@pdfgenstudio/mcp"],
"env": {
"PDFGENSTUDIO_API_KEY": "your-api-key-here"
}
}
}
}
}Continue (VS Code/JetBrains Extension)
Continue supports MCP servers for enhanced AI capabilities.
Configuration
Edit ~/.continue/config.json:
{
"mcpServers": [
{
"name": "pdfgenstudio",
"command": "npx",
"args": ["-y", "@pdfgenstudio/mcp"],
"env": {
"PDFGENSTUDIO_API_KEY": "your-api-key-here"
}
}
]
}HTTP/SSE Mode (For Custom Clients)
For clients that support HTTP-based MCP connections:
Start the Server
# Start HTTP server
npx @pdfgenstudio/mcp --transport http --port 3100Endpoints
HTTP Streaming:
http://localhost:3100/mcpSSE:
http://localhost:3100/sseHealth Check:
http://localhost:3100/health
Example Client Connection
import { Client } from "@modelcontextprotocol/sdk/client/index.js";
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js";
const transport = new StreamableHTTPClientTransport(
new URL("http://localhost:3100/mcp")
);
const client = new Client({
name: "my-client",
version: "1.0.0",
});
await client.connect(transport);Troubleshooting
Common Issues
"API key not configured"
Ensure
PDFGENSTUDIO_API_KEYis set in theenvsectionCheck for typos in the environment variable name
"Command not found" (npx)
Make sure Node.js 18+ is installed
Try using the full path to npx:
/usr/local/bin/npx
Server not connecting
Restart your IDE/application after configuration changes
Check the logs for error messages
Verify the path is correct for local installations
Windows path issues
Use forward slashes
/or escaped backslashes\\in pathsUse absolute paths
Debug Mode
Run with debug logging:
DEBUG=* npx @pdfgenstudio/mcpVerify Installation
# Test the server directly
npx @pdfgenstudio/mcp --help
# Test with MCP Inspector
npx fastmcp inspect /path/to/pdfgenstudio-mcp/src/index.tsAvailable Tools
Template Tools
Tool | Description |
| Render a template to PDF/PNG/JPG with data injection |
| Render template and return viewable image |
JSON Tools
Tool | Description |
| Convert JSON design document to PDF/image |
| Render JSON and return viewable image |
HTML Tools
Tool | Description |
| Convert HTML/CSS to PDF/image |
| Render HTML and return viewable image |
URL Tools
Tool | Description |
| Screenshot webpage as PDF/image |
| Screenshot and return viewable image |
Management Tools
Tool | Description |
| List all saved templates |
| Get template details |
| Get modifiable template elements |
Resources
The MCP server provides these resources:
URI | Description |
| List of all templates |
| Specific template details |
| API documentation |
| Current configuration status |
Prompts
Pre-built prompts for common tasks:
Prompt | Description |
| Generate invoice PDFs |
| Create report documents |
| Screenshot webpages |
| Render templates with data |
| Convert HTML to PDF |
Example Usage
Render a Template
Use the render_template tool to generate a PDF from template ID "abc123"
with the following data: {"name": "John Doe", "amount": "$500"}Screenshot a Webpage
Capture a full-page screenshot of https://example.com as PNGGenerate HTML Report
Convert this HTML to PDF:
<html>
<body>
<h1>Monthly Report</h1>
<p>Content here...</p>
</body>
</html>API Reference
For detailed API documentation, visit docs.pdfgenstudio.com
Development
# Install dependencies
npm install
# Build
npm run build
# Watch mode
npm run dev
# Test with MCP CLI
npm run test
# Inspect with MCP Inspector
npm run inspectLicense
MIT License - see LICENSE for details.
Support
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Majid9287/pdfgenstudio-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server