FP

fervoyush/plotnine-mcp

Developer tools

Эта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал

6 stars 3 forks Качество 74 Тренд 14MIT

MCP server bringing ggplot2's grammar of graphics to Python via plotnine. Create publication-quality statistical visualizations through natural language with AI assisted IDEs like Claude-Code, Cursor...

Обзор

Create publication-quality statistical graphics through chat using plotnine's Python implementation of R's beloved ggplot2. This modular MCP server allows Claude and other AI assistants to generate highly customizable visualizations by composing layers through the grammar of graphics paradigm. - : Combine multiple geometries in a single plot (scatter + trend lines, boxplots + jitter, etc.) - : Compose plots using aesthetics, geometries, scales, themes, facets, and coordinates - : Points, lines, bars, histograms, boxplots, violins, and more - : Load data from files (CSV, JSON, Parquet, Excel), URLs, or inline JSON - : PNG, PDF, SVG with configurable dimensions and DPI - : Pre-configured templates for common patterns (time series, scatter with trend, distribution comparison, etc.

README

Показан фрагмент оригинального README. Открыть оригинал.

Plotnine MCP Server

A Model Context Protocol (MCP) server that brings ggplot2’s grammar of graphics to Python through plotnine, enabling AI-powered data visualization via natural language.

Create publication-quality statistical graphics through chat using plotnine’s Python implementation of R’s beloved ggplot2. This modular MCP server allows Claude and other AI assistants to generate highly customizable visualizations by composing layers through the grammar of graphics paradigm.

Features

Core Visualization

  • 🎨 Multi-Layer Plots: Combine multiple geometries in a single plot (scatter + trend lines, boxplots + jitter, etc.)
  • Grammar of Graphics: Compose plots using aesthetics, geometries, scales, themes, facets, and coordinates
  • 20+ Geometry Types: Points, lines, bars, histograms, boxplots, violins, and more
  • Multiple Data Sources: Load data from files (CSV, JSON, Parquet, Excel), URLs, or inline JSON
  • Multiple Output Formats: PNG, PDF, SVG with configurable dimensions and DPI

Smart Features (NEW!)

  • 📋 9 Plot Templates: Pre-configured templates for common patterns (time series, scatter with trend, distribution comparison, etc.)
  • 🤖 AI Template Suggestions: Analyzes your data and recommends appropriate plot types
  • 🎨 21 Color Palettes: Colorblind-safe, scientific, categorical, corporate, sequential, and diverging palettes
  • 📊 Data Preview: Inspect data before plotting with comprehensive summaries
  • 🎯 Smart Error Messages: Fuzzy matching suggests corrections for typos in column names, geom types, and themes
  • 💾 Config Export/Import: Save and reuse plot configurations as JSON files

Data Manipulation (NEW!)

  • 🔄 12 Data Transformations: filter, group_summarize, sort, select, rename, mutate, drop_na, fill_na, sample, unique, rolling, pivot
  • ⚡ Batch Processing: Create multiple plots in one operation
  • 🔗 Chained Transforms: Apply multiple transformations in sequence

Theming & Customization

  • Flexible Theming: Built-in themes with extensive customization options
  • Statistical Transformations: Add smoothing, binning, density estimation, and summaries
  • Faceting: Split plots by categorical variables using wrap or grid layouts

Installation

1. Clone or download this repository

cd plotnine-mcp

2. Install dependencies

Using pip:

pip install -e .

For full functionality (parquet and Excel support):

pip install -e ".[full]"

3. Configure Your MCP Client

Finding Your Installation Path

First, find where the plotnine-mcp command was installed:

which plotnine-mcp

This will show something like /path/to/python/bin/plotnine-mcp. Use this full path in the configurations below.

Открыть полный README на GitHub

Установка

This server does not publish a one-line install command.

Open the repository installation guide Новичок в MCP? Начните с руководства на mcpskill.org →

Конфигурация

{ "mcpServers": { "plotnine": { "command": "/path/to/your/python/bin/plotnine-mcp", "args": [] } } }