Pdf Generator Api

by pdfgeneratorapi

227 downloads Not rated yet
GitHub

About

Model Context Protocol (MCP) server for the PDF Generator API, generated from the OpenAPI v4 specification.

Explore

- Supports stdio and HTTP transports
- Docker deployment support
- Configurable environment variables
- JWT authentication with token generation guidance
- Session idle timeout and CORS configuration
- Health check endpoint
- Regeneratable from OpenAPI specification
- Includes testing scripts

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name Pdf Generator Api
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

Run locally:
``bash
npm install
npm run start:http

Stdio Mode: Pass the JWT token via the BEARER_TOKEN_JWT environment variable in your MCP client config.

HTTP Mode: Pass the JWT token in the
Authorization header with each request:
`bash
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",...}'


bash
npx jsonwebtoken-cli -- sign \
'{"iss":"YOUR_WORKSPACE_ID","sub":"YOUR_WORKSPACE_IDENTIFIER"}' \
'YOUR_SECRET_KEY' \
--algorithm HS256 \
--expiresIn 24h

| Variable | Mode | Default | Description |
|----------|------|---------|-------------|
|
API_BASE_URL | Both | https://us1.pdfgeneratorapi.com/api/v4 | PDF Generator API base URL |
|
BEARER_TOKEN_JWT | Stdio | — | JWT token for authentication |
|
PORT | HTTP | 3000 | Server port |
|
LOG_LEVEL | Both | info | Logging level (debug, info, warn, error) |
|
SESSION_TTL_MINUTES | HTTP | 30 | Session idle timeout in minutes |
|
CORS_ORIGIN | HTTP | * (all origins) | Comma-separated allowed origins |

Create a
.env file in the repo root:
bash
cp .env.example .env
``

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "pdf generator api": {
            "pdf-generator-api": {
                "command": "node",
                "args": [
                    "/path/to/mcp-server/build/index.js"
                ],
                "env": {
                    "API_BASE_URL": "https://us1.pdfgeneratorapi.com/api/v4",
                    "BEARER_TOKEN_JWT": "your-jwt-token-here"
                }
            }
        }
    }
}

McpServers

{
    "pdf-generator-api": {
        "command": "node",
        "args": [
            "/path/to/mcp-server/build/index.js"
        ],
        "env": {
            "API_BASE_URL": "https://us1.pdfgeneratorapi.com/api/v4",
            "BEARER_TOKEN_JWT": "your-jwt-token-here"
        }
    }
}
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: ``bash npm install npm run build ` MCP Client Configuration Example: `json { "mcpServers": { "pdf-generator-api": { "command": "node", "args": ["/path/to/mcp-server/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 with your actual path and your-jwt-token-here with your PDF Generator API JWT token (see JWT Token Generation below). 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:
``bash npm install npm run start:http
No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.