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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@htoo-tw/report-transformer

v0.1.1

Published

An XMCP application with tool syntax

Downloads

3

Readme

MCP D3 Data Transformer

A tool for generating D3 compatible data formats for report-generator MCP.

Sample data

{
  "result": [
    {
      "year": "2023",
      "month": "Jan",
      "month_year": "2023-01",
      "total_revenue": "92756492.61",
      "transaction_count": 126
    },
    {
      "year": "2023",
      "month": "Feb",
      "month_year": "2023-02",
      "total_revenue": "93128528.57",
      "transaction_count": 127
    },
    {
      "year": "2023",
      "month": "Mar",
      "month_year": "2023-03",
      "total_revenue": "95699029.84",
      "transaction_count": 131
    },
    {
      "year": "2023",
      "month": "Apr",
      "month_year": "2023-04",
      "total_revenue": "103647077.57",
      "transaction_count": 139
    },
    {
      "year": "2023",
      "month": "May",
      "month_year": "2023-05",
      "total_revenue": "106332107.74",
      "transaction_count": 143
    },
    {
      "year": "2023",
      "month": "Jun",
      "month_year": "2023-06",
      "total_revenue": "108860799.22",
      "transaction_count": 146
    },
    {
      "year": "2023",
      "month": "Jul",
      "month_year": "2023-07",
      "total_revenue": "109433081.04",
      "transaction_count": 148
    },
    {
      "year": "2023",
      "month": "Aug",
      "month_year": "2023-08",
      "total_revenue": "112792542.28",
      "transaction_count": 152
    },
    {
      "year": "2023",
      "month": "Sep",
      "month_year": "2023-09",
      "total_revenue": "115500529.13",
      "transaction_count": 157
    },
    {
      "year": "2023",
      "month": "Oct",
      "month_year": "2023-10",
      "total_revenue": "116752780.76",
      "transaction_count": 159
    },
    {
      "year": "2023",
      "month": "Nov",
      "month_year": "2023-11",
      "total_revenue": "118907494.08",
      "transaction_count": 163
    },
    {
      "year": "2023",
      "month": "Dec",
      "month_year": "2023-12",
      "total_revenue": "120319528.24",
      "transaction_count": 168
    }
  ],
  "row_count": 12,
  "columns": [
    "year",
    "month",
    "month_year",
    "total_revenue",
    "transaction_count"
  ],
  "execution_time": 0.01
}

Schema Overview

The D3 Transformer MCP tool uses a two-part schema structure for generating data visualization reports:

Inputs:

data (DataInputSchema):

  • columns (string[]): Column names for the dataset
  • result (object[]): Array of data records as key-value pairs
  • options (ChartOptionsSchema, optional): Chart configuration options including:
    • title (string, optional): Chart title
    • description (string, optional): Chart description
    • xAxisLabel (string, optional): X-axis label
    • yAxisLabel (string, optional): Y-axis label
    • showGrid (boolean, default: true): Whether to display grid lines
    • showLegend (boolean, default: false): Whether to show chart legend
    • barChart (object, optional): Bar chart specific options
      • orientation (enum: 'vertical'|'horizontal', default: 'vertical'): Bar orientation
    • lineChart (object, optional): Line chart specific options
      • curved (boolean, default: false): Whether to use curved lines
      • showPoints (boolean, default: true): Whether to show data points
      • showArea (boolean, default: false): Whether to fill area under line

charts (ChartsConfigSchema):

  • Array of chart configurations, each containing:
    • type (enum: 'bar'|'line'): Chart type to generate
    • xColumn (string): Column name for x-axis data (categories, dates, or labels). Used for grouping/categorizing data points. Examples: "date", "month", "department", "product_category"
    • yColumn (string): Column name for y-axis data (numeric values to be measured/plotted). Should contain numbers for chart visualization. Examples: "revenue", "count", "temperature", "score"

Expected LLM Input

{
  "data": {
    "result": [...],
    "columns": [...],
  },
  "charts": [
    { "type": "line", "xColumn": "amount", "yColumn": "total_revenue" },
    { "type": "bar", "xColumn": "month", "yColumn": "transaction_count" },
    ...
  ]
}

Development

pnpm dev

This will start the MCP server with the STDIO as the transport method in which dist/stdio.js is generated.

For interactive testing and debugging, the MCP inspector is recommended to use

Run the inspector by

npx @modelcontextprotocol/inspector

and add the command:

node /PATH/mcp/d3-transformer/dist/stdio.js

Production

Build by using

pnpm build

This project was created with create-xmcp-app.