Open API & MCP Server

Markdown in.
Branded PDF out.

An HTTP and MCP service for generating publication-quality reports from Markdown. Bring your own content; ReportGen brings the design.

Try the demo

What it does

Markdown in

Send any CommonMark / GFM Markdown document — headings, tables, code blocks, footnotes. ReportGen parses and lays it out for print.

Themed via JSON

Override colours, fonts, page size, cover layout, and header / footer text in a single JSON field. No CSS knowledge required.

MCP-ready

Mount /mcp in any MCP-compatible agent host. The render_pdf tool is auto-discovered via the tools listing endpoint.

Try it

Renders up to 50 KB of Markdown. Rate limited to 5 renders / hour / IP. No account needed.

Use it from your code

curl example
curl -s https://your-instance/v1/render \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "markdown": "# Hello World\n\nThis is a test.",
    "metadata": {
      "title": "Hello World",
      "author": "Your Name"
    },
    "theme": {
      "template": "default"
    }
  }' \
  --output report.pdf
MCP Python client snippet
import asyncio, base64
from mcp import ClientSession, StdioServerParameters
from mcp.client.streamable_http import streamablehttp_client

async def render_via_mcp():
    async with streamablehttp_client(
        "https://your-instance/mcp",
        headers={"Authorization": "Bearer YOUR_TOKEN"},
    ) as (read, write, _):
        async with ClientSession(read, write) as session:
            await session.initialize()
            result = await session.call_tool(
                "render_pdf",
                arguments={
                    "markdown": "# Hello\n\nFrom MCP.",
                    "metadata": {"title": "MCP Report", "author": "Agent"},
                },
            )
            # Find the PDF blob in the result content
            for item in result.content:
                if hasattr(item, "resource") and item.resource.mimeType == "application/pdf":
                    pdf_bytes = base64.b64decode(item.resource.blob)
                    with open("report.pdf", "wb") as f:
                        f.write(pdf_bytes)

asyncio.run(render_via_mcp())