Skip to main content
Glama
pdf-report-generator

pdf-report-generator

pdf-report-generator

An MCP server that generates professional corporate PDF reports from structured JSON specs or raw LLM text output. Drop it into Claude Desktop (or any MCP client) and ask Claude to turn analysis, research, or meeting notes into a polished multi-page report complete with cover page, table of contents, executive summary, section headings, tables, and charts.

A sample output is at examples/sample_report.pdf.


Prerequisites

  • Node.js 18+

  • Python 3.8+

Install Python dependencies:

pip install reportlab matplotlib

Related MCP server: rendoc

Claude Desktop configuration

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "pdf-report": {
      "command": "npx",
      "args": ["-y", "pdf-report-generator"]
    }
  }
}

Available tools

generate_report

Generates a PDF from a full structured spec.

Minimal example input:

{
  "spec": {
    "metadata": {
      "title": "Q3 Performance Review",
      "author": "Engineering Team",
      "company": "Acme Corp",
      "classification": "INTERNAL"
    },
    "executive_summary": "Overall performance improved this quarter...",
    "sections": [
      {
        "heading": "Infrastructure",
        "body": "Uptime reached 99.94%...",
        "subsections": []
      }
    ],
    "tables": [],
    "charts": []
  }
}

generate_report_from_text

Converts raw text into a structured PDF report. Sections are auto-detected from headings.

{
  "text": "# Overview\nThis quarter...\n\n# Key Findings\n...",
  "title": "Q3 Summary",
  "author": "Data Team",
  "company": "Acme Corp",
  "classification": "INTERNAL",
  "theme_name": "navy"
}

list_themes

Returns available color themes: default, navy, charcoal, forest, burgundy.


JSON spec reference

metadata
  title*          string
  subtitle        string
  author          string
  date            string (YYYY-MM-DD; defaults to today)
  company         string
  department      string
  document_id     string  (e.g. RPT-2026-001)
  classification  string  (PUBLIC | INTERNAL | CONFIDENTIAL)
  logo_path       string  (absolute path to PNG/JPG)
  page_size       "letter" | "a4"

executive_summary  string

sections[]
  heading*        string
  body*           string  (\n\n = paragraph break)
  subsections[]
    heading*      string
    body*         string

tables[]
  title           string
  headers*        string[]
  rows*           string[][]
  after_section   int  (0-based section index; -1 = after exec summary)

charts[]
  title           string
  type            "bar" | "line" | "pie" | "horizontal_bar"
  labels*         string[]
  datasets*       [{label, values[]}]
  after_section   int

images[]
  path*           string  (absolute path)
  caption         string
  width_inches    number
  after_section   int

theme
  primary_color    [R, G, B]
  accent_color     [R, G, B]
  highlight_color  [R, G, B]

Example prompts

  • "Turn this analysis into a professional internal PDF report titled 'Q3 Infrastructure Review'"

  • "Generate a corporate report from this research, add a bar chart for the monthly metrics"

  • "Create a CONFIDENTIAL report called 'Security Audit Findings' from this text"

  • "List the available report themes"


Troubleshooting

Python not found — ensure python or python3 is on your PATH and is version 3.8+.

reportlab not installed — run pip install reportlab matplotlib.

Charts missing — matplotlib is required for charts. Install it with pip install matplotlib.

Large PDFs — complex specs with many charts can take 5–15 seconds. This is normal.


License

MIT

Available Tools

3 tools
generate_reportA

Generate a professional PDF report from a structured JSON specification with metadata, sections, tables, charts, and images. Returns the PDF as base64-encoded data.

Inputs: spec (required).

generate_report_from_textA

Convert raw text or LLM chat output into a structured PDF report. Pass unstructured text and basic metadata — sections are detected automatically.

Inputs: text (required), title (required), author, company, +2 more.

list_themesA

List available color themes for PDF reports.

Inputs: no named parameters.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.9/5.0

    Scored across 3 tools

    Disambiguation4/5

    The two generate tools have distinct input types (raw text vs structured JSON) and clear descriptions, but their similar names could cause misselection if an agent reads quickly. list_themes is clearly separate.

    Naming Consistency5/5

    All tools follow a consistent verb_noun pattern: generate_report_from_text, generate_report, list_themes. The names are predictable and descriptive.

    Tool Count4/5

    With 3 tools, the server is slightly on the lean side but still within a reasonable scope. Each tool has a clear purpose and no redundant tools are present.

    Completeness4/5

    The server covers the main report generation needs: unstructured text, structured JSON, and theme customization. Minor gaps like additional output formats or template management exist but aren't critical for the core domain.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers