PDF Generator API MCP Server
An MCP server that enables interaction with the PDF Generator API for automated document generation and management. It supports both stdio and HTTP transports, allowing AI models to create and handle PDFs using OpenAPI v4 specifications.
README
AR API MCP Server
Model Context Protocol (MCP) server for the PDF Generator API, generated from the OpenAPI v4 specification.
Overview
This server supports both stdio and HTTP transports:
- Stdio mode (default): For local MCP client integration (Claude Desktop, Claude Code, Cline, etc.)
- HTTP mode: For production deployment, marketplaces, and multiple clients
Quick Start
Local Development (Stdio Mode)
Install and build:
npm install
npm run build
MCP Client Configuration Example:
{
"mcpServers": {
"ar-api": {
"command": "node",
"args": ["/path/to/mcp-server-v4/build/index.js"],
"env": {
"API_BASE_URL": "https://us1.pdfgeneratorapi.com/api/v4",
"BEARER_TOKEN_JWT": "your-jwt-token-here"
}
}
}
}
Note: Replace /path/to/mcp-server-v4 with your actual path and your-jwt-token-here with your PDF Generator API JWT token.
Common config locations:
- Claude Desktop: Settings → Developer → Edit Config
- Claude Code (CLI):
~/.claude/mcp_config.json - Cline/Roo-Codeium:
.vscode/mcp_config.json - Continue:
~/.continue/config.json
Production Deployment (HTTP Mode)
Run locally:
npm install
npm run start:http
# Server runs on http://localhost:3000
# MCP endpoint: http://localhost:3000/mcp
# Health check: http://localhost:3000/health
Docker:
docker compose -f deploy/docker-compose.yml up -d
# MCP endpoint: http://localhost:3001/mcp
Authentication
HTTP Mode: Pass the Bearer token in the Authorization header with each request:
curl -X POST http://localhost:3000/mcp \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-H "Authorization: Bearer your-jwt-token-here" \
-d '{"jsonrpc":"2.0","id":1,"method":"initialize",...}'
Stdio Mode: Pass the Bearer token via the BEARER_TOKEN_JWT environment variable in your MCP client config.
Environment Variables
| Variable | Required | Default | Description |
|---|---|---|---|
API_BASE_URL |
No | https://us1.pdfgeneratorapi.com/api/v4 |
PDF Generator API base URL |
PORT |
No | 3000 |
Server port (HTTP mode only) |
BEARER_TOKEN_JWT |
No | - | JWT token (stdio mode only) |
LOG_LEVEL |
No | info |
Logging level |
Create a .env file in the repo root:
cp .env.example .env
JWT Token Generation
Generate a JWT token using your PDF Generator API credentials:
const jwt = require('jsonwebtoken');
const token = jwt.sign(
{ iss: 'YOUR_WORKSPACE_ID', sub: 'YOUR_WORKSPACE_IDENTIFIER' },
'YOUR_SECRET_KEY',
{ algorithm: 'HS256', expiresIn: '1h' }
);
See: https://docs.pdfgeneratorapi.com/v4#section/Authentication/Creating-a-JWT
Regenerating
To regenerate after OpenAPI spec changes:
# Place the updated spec at docs/apiv4.json, then:
./scripts/generate-mcp.sh
# Or specify a custom input:
./scripts/generate-mcp.sh --input /path/to/apiv4.json
Note: After regeneration, custom patches may need to be re-applied.
Testing
Test stdio mode:
npm run build
BEARER_TOKEN_JWT="your-token" echo '{"jsonrpc":"2.0","id":1,"method":"tools/list"}' | npm run start:stdio
Test HTTP mode:
npm run start:http
curl http://localhost:3000/health
See POSTMAN_TESTING.md for detailed testing instructions with Postman.
Resources
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.