home / mcp / pdf generator mcp server

PDF Generator MCP Server

MCP Server generated by mcp.ag2.ai

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "ag2-mcp-servers-pdf-generator-api": {
      "command": "python",
      "args": [
        "mcp_server/main.py",
        "stdio"
      ],
      "env": {
        "CONFIG": "A JSON string containing the configuration.",
        "SECURITY": "Environment variables for security parameters (e.g., API keys).",
        "CONFIG_PATH": "Path to a JSON configuration file (e.g., mcp_server/mcp_config.json)"
      }
    }
  }
}

This MCP server exposes the PDF Generator API as a programmable MCP endpoint, letting you manage and drive PDF generation through standardized MCP calls. It supports multiple transport modes and is designed for easy integration with MCP clients that need to interact with the API in a consistent, context-aware way.

How to use

Start the server in stdio mode to communicate with an MCP client directly through standard input and output. Then connect your MCP client to the running process and issue the available operations as MCP calls. Use the security and configuration options to control access and behavior.

How to install

Prerequisites include Python 3.9 or newer, with pip and uv available in your environment.

1. Clone the repository and enter the project directory.

git clone <repository-url>
cd mcp-server

2. Install development dependencies. If you are using a development container, the setup is handled there. Otherwise, install locally.

pip install -e ".[dev]"

Alternatively, you can install with uv to run the local editable install.

uv pip install --editable ".[dev]"

Additional notes

You can also run linting, static analysis, and tests during development to ensure code quality and reliability. Use the following commands as needed to check linting, format code, and run tests with coverage.

ruff check
ruff format
./scripts/static-analysis.sh
./scripts/test.sh
./scripts/test-cov.sh

Running the server

To start the MCP server in stdio mode, run the following command. The server supports other transport modes if you prefer them.

python mcp_server/main.py stdio

Configuration and environment variables

The server can read configuration from files or environment variables to customize behavior and security.

Environment variables you may use include the following. They control paths to configuration, inline JSON configuration, and security-related parameters.