home / mcp / pandoc bridge mcp server

Pandoc Bridge MCP Server

Converts documents between formats via REST and MCP interfaces with streaming progress.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "fu-jie-mcp-openapi-pandoc": {
      "url": "http://localhost:8000/mcp",
      "headers": {
        "HOST": "0.0.0.0",
        "PORT": "8000",
        "LOG_LEVEL": "INFO",
        "PANDOC_TOKEN": "<YOUR_TOKEN>",
        "JWT_SECRET_KEY": "your-secret-key",
        "JWT_EXPIRE_HOURS": "24",
        "MAX_FILE_SIZE_MB": "50",
        "CONVERSION_TIMEOUT": "60"
      }
    }
  }
}

Pandoc Bridge is a document format conversion service powered by Pandoc. It exposes a REST API and an MCP server so you can integrate conversion capabilities into AI assistants and other MCP clients, with token-based security and streaming progress updates.

How to use

You can connect a client that supports MCP to convert text or files by targeting the MCP streamable endpoint at /mcp. Use your bearer token to authorize requests, and take advantage of the streaming progress events to monitor conversions in real time. Typical use patterns include sending a request from an MCP-enabled assistant to convert between formats (for example Markdown to HTML) or to convert uploaded files, with the option to stream progress until the result is delivered.

How to install

Prerequisites you’ll need before starting are Python and a modern package manager. You may also use Docker for a ready-to-run container.

# Optional: install Docker if you prefer containerized deployment
# Start the service with Docker Compose
# docker-compose up -d

# Health check after starting
# curl http://localhost:8000/health

# Local development without Docker:
# Install dependencies
pip install -e ".[dev]"

# Run the server with automatic reload
uvicorn src.main:app --reload

# Or run the CLI directly
pandoc-bridge

Additional notes and configuration

The service supports REST and MCP interfaces with a shared bearer token for authentication. It serves as a dual-protocol bridge, returning information about supported formats and enabling both text and file conversions.

Available tools

convert_text

Convert text content between formats (e.g., markdown to html) using the MCP interface

convert_file_base64

Convert base64-encoded files through MCP to a target format

list_formats

Query the list of supported formats

get_service_info

Retrieve version and service information about the bridge