npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@vint.tri/report_gen_mcp

v1.5.60

Published

CLI tool for generating HTML reports with embedded charts and images

Readme

Report Generator MCP

A powerful CLI tool and MCP server for generating HTML reports with embedded charts and images.

Features

  • Generate professional HTML reports from Markdown documents
  • Embed interactive charts (bar, line, pie, doughnut, radar, polarArea)
  • Embed AI-generated images using Pollinations.ai
  • Embed images from URLs
  • Edit existing reports by adding, removing, or replacing content
  • MCP server integration for use with Claude Desktop

Installation

npm install -g @vint.tri/report_gen_mcp@latest

For Python dependencies (required for image generation/editing):

npm run install-python-deps

Or set up a Python virtual environment:

npm run setup-python

Environment Variables

  • REPORTS_DIR: Directory where reports will be generated (required for CLI and HTTP API modes)
  • CHUTES_API_TOKEN: API token for Chutes AI services (required for image generation/editing)
  • IMG_SAVE_BASE_DIR: Base directory for saving generated/edited images

Usage

CLI Mode

# Set the reports directory
export REPORTS_DIR=/path/to/reports

# Generate a report
report_gen_mcp generate --document report.md --elements '{"chart1":{"type":"bar","config":{"labels":["A","B","C"],"datasets":[{"label":"Dataset 1","data":[1,2,3]}]}}}'

Programmatic Usage (Node.js)

import { generateReport, generateImage } from '@vint.tri/report_gen_mcp';

// Generate a report
const reportResult = await generateReport(
  '# My Report\nThis is a sample report with a chart.\n[[chart:chart1]]',
  {
    chart1: {
      type: 'bar',
      config: {
        labels: ['A', 'B', 'C'],
        datasets: [{
          label: 'Dataset 1',
          data: [1, 2, 3]
        }]
      }
    }
  },
  '/path/to/output/report.html'
);

// Generate an image
const imageDataUri = await generateImage('A beautiful landscape', {
  width: 512,
  height: 512,
  guidance_scale: 7.5
});

HTTP API Mode

# Start the server
report_gen_mcp start-server

# Generate a report via HTTP POST to http://localhost:3000/generate-report
curl -X POST http://localhost:3000/generate-report \
  -H "Content-Type: application/json" \
  -d '{
    "document": "# My Report\nThis is a sample report with a chart.\n[[chart:chart1]]",
    "elements": {
      "chart1": {
        "type": "bar",
        "config": {
          "labels": ["A", "B", "C"],
          "datasets": [{
            "label": "Dataset 1",
            "data": [1, 2, 3]
          }]
        }
      }
    }
  }'

MCP Server Mode (for Claude Desktop)

Run without arguments to start the MCP server:

report_gen_mcp

Available tools:

  1. generate-report: Generate an HTML report with embedded charts and images
  2. edit-report: Edit an existing HTML report by adding or removing content
  3. generate-image: Generate an image from a text prompt using AI

Image Generation and Editing

This tool includes advanced image generation and editing capabilities powered by Chutes AI:

Generate Image

Create new images from text prompts with customizable parameters:

  • Prompt (in English)
  • Width and height (128-2048 pixels)
  • Model selection
  • Guidance scale
  • Negative prompts
  • Number of inference steps
  • Seed for reproducibility

Edit Image

Modify existing images based on text descriptions:

  • Input image path
  • Output image path
  • Edit prompt (in English)
  • Width and height (512-2048 pixels)
  • CFG scale
  • Negative prompts
  • Number of inference steps
  • Seed for reproducibility

Report Elements

Reports can include various elements referenced in the Markdown document using placeholders like [[chart:id]] or [[image:id]].

Charts

  • Bar charts
  • Line charts
  • Pie charts
  • Doughnut charts
  • Radar charts
  • Polar area charts

Images

  • AI-generated images (Pollinations.ai)
  • Images from URLs

Examples

See the test files in the repository for examples of how to use all features.

License

MIT