Plotting MCP Server

Plotting MCP Server

Transforms CSV data into beautiful visualizations including line charts, bar graphs, pie charts, and world maps. Returns base64-encoded PNG images optimized for AI chat interfaces and assistants.

Category
Visit Server

README

šŸ“Š Plotting MCP Server

A MCP (Model Context Protocol) server that transforms CSV data into beautiful visualizations. Built with Python and optimized for seamless integration with AI assistants and chat applications.

✨ Features

  • šŸ“ˆ Multiple Plot Types: Create line charts, bar graphs, pie charts, and world maps
  • šŸŒ Geographic Visualization: Built-in support for plotting coordinate data on world maps using Cartopy
  • šŸ”§ Flexible Parameters: Fine-tune your plots with JSON-based configuration options
  • šŸ“± Chat-Ready Output: Returns base64-encoded PNG images perfect for AI chat interfaces
  • ⚔ Fast Processing: Efficient CSV parsing and plot generation with pandas and matplotlib

Installation

Using Makefile

make install

Using uv

uv sync

Usage

Running the Server

uv run plotting-mcp

The server runs on port 9090 by default.

Tools

generate_plot

Transform your CSV data into stunning visualizations.

Parameters:

  • csv_data (str): CSV data as a string
  • plot_type (str): Plot type - line, bar, pie, or worldmap
  • json_kwargs (str): JSON string with plotting parameters for customization

Plotting Options:

  • Line/Bar Charts: Use Seaborn parameters (x, y, hue for data mapping)
  • World Maps: Automatic coordinate detection (lat/latitude/y and lon/longitude/x)
    • Customize with s (size), c (color), alpha (transparency), marker (style)
  • Pie Charts: Supports single column (value counts) or two columns (labels + values)

Returns: Base64-encoded PNG image ready for display

šŸ¤– AI Assistant Integration

Perfect for enhancing AI conversations with data visualization capabilities. The server returns plots as base64-encoded PNG images that display seamlessly in:

  • LibreChat: Direct integration for chat-based data analysis
  • Claude Desktop: Through mcp-remote command to transform from HTTP transport to stdio
{
  "mcpServers": {
    "plotting": {
      "command": "uvx",
      "args": [
        "--from", "/path/to/plotting-mcp",
        "plotting-mcp", "--transport=stdio"
      ]
    }
  }
}
  • Custom AI Applications: Easy integration via MCP protocol
  • Development Tools: Compatible with any MCP-enabled environment

Image Format: High-quality PNG with configurable DPI and sizing

šŸš€ ToolHive Deployment

Deploy and manage your plotting server effortlessly with ToolHive - a platform that provides containerized, secure environments for MCP servers across UI, CLI, and Kubernetes modes.

Benefits:

  • šŸ”’ Secure Containerization: Isolated environments with comprehensive security controls
  • āš™ļø Multiple Deployment Options: UI, CLI, and Kubernetes support
  • šŸ”§ Developer-Friendly: Seamless integration with popular development tools

šŸ“š Resources:

Build the Docker image

docker build -t plotting-mcp .

Run with ToolHive

Run locally

thv run --name plotting-mcp --transport streamable-http plotting-mcp:latest

Run with ToolHive in K8s with ToolHive operator

  1. Create a PVC for the MCP server. This is needed since the plotting libraries Matplotlib and Cartopy require a writable filesystem to cache data:
kubectl apply -f toolhive-pvc.yaml
  1. Deploy the MCP server in K8s. In the toolhive-deployment.yaml, you can customize the image field to point to your image registry.
kubectl apply -f toolhive-deployment.yaml
  1. Once the MCP server is deployed, do port-forwarding
kubectl port-forward svc/mcp-plotting-mcp-proxy 9090:9090

šŸ› ļø Development

Built with modern Python tooling for a great developer experience.

Tech Stack:

  • šŸ Python 3.13+: Latest Python features
  • šŸ“Š Seaborn & Matplotlib: Professional-grade plotting
  • šŸŒ Cartopy: Advanced geospatial visualization
  • ⚔ FastMCP: High-performance MCP server framework
  • šŸ”§ UV: Fast Python package management

Code Quality

# Format code and fix linting issues
make format

# Type checking
make typecheck

# Or use uv directly
uv run ruff format .
uv run ruff check --fix .
uv run ty check

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
E2B

E2B

Using MCP to run code via e2b.

Official
Featured