{"id":30024162,"url":"https://github.com/stackloklabs/plotting-mcp","last_synced_at":"2026-04-16T01:33:39.502Z","repository":{"id":308222272,"uuid":"1029581641","full_name":"StacklokLabs/plotting-mcp","owner":"StacklokLabs","description":"MCP server that transforms CSV data into visualizations","archived":false,"fork":false,"pushed_at":"2026-03-11T10:52:30.000Z","size":147,"stargazers_count":7,"open_issues_count":2,"forks_count":5,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-03-11T17:19:27.424Z","etag":null,"topics":["cartopy","maps","matplotlib","mcp","mcp-server","plotting","python","seaborn"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/StacklokLabs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-07-31T09:01:22.000Z","updated_at":"2026-03-11T10:52:32.000Z","dependencies_parsed_at":"2025-08-19T15:12:26.758Z","dependency_job_id":"4216f5de-32bf-4841-b2a1-df446dc7ec77","html_url":"https://github.com/StacklokLabs/plotting-mcp","commit_stats":null,"previous_names":["stackloklabs/plotting-mcp"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/StacklokLabs/plotting-mcp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StacklokLabs%2Fplotting-mcp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StacklokLabs%2Fplotting-mcp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StacklokLabs%2Fplotting-mcp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StacklokLabs%2Fplotting-mcp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/StacklokLabs","download_url":"https://codeload.github.com/StacklokLabs/plotting-mcp/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StacklokLabs%2Fplotting-mcp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31867711,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-15T15:24:51.572Z","status":"ssl_error","status_checked_at":"2026-04-15T15:24:39.138Z","response_time":63,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cartopy","maps","matplotlib","mcp","mcp-server","plotting","python","seaborn"],"created_at":"2025-08-06T06:19:04.027Z","updated_at":"2026-04-16T01:33:39.494Z","avatar_url":"https://github.com/StacklokLabs.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 📊 Plotting MCP Server\n\nA 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.\n\n## ✨ Features\n\n- **📈 Multiple Plot Types**: Create line charts, bar graphs, pie charts, and world maps\n- **🌍 Geographic Visualization**: Built-in support for plotting coordinate data on world maps using Cartopy\n- **🔧 Flexible Parameters**: Fine-tune your plots with JSON-based configuration options\n- **📱 Chat-Ready Output**: Returns base64-encoded PNG images perfect for AI chat interfaces\n- **⚡ Fast Processing**: Efficient CSV parsing and plot generation with pandas and matplotlib\n\n## Installation\n\n### Using Makefile\n\n```bash\nmake install\n```\n\n### Using uv\n\n```bash\nuv sync\n```\n\n## Usage\n\n### Running the Server\n\n```bash\nuv run plotting-mcp\n```\n\nThe server runs on port 9090 by default.\n\n### Tools\n\n#### `generate_plot`\nTransform your CSV data into stunning visualizations.\n\n**Parameters:**\n- `csv_data` (str): CSV data as a string\n- `plot_type` (str): Plot type - `line`, `bar`, `pie`, or `worldmap`\n- `json_kwargs` (str): JSON string with plotting parameters for customization\n\n**Plotting Options:**\n- **Line/Bar Charts**: Use Seaborn parameters (`x`, `y`, `hue` for data mapping)\n- **World Maps**: Automatic coordinate detection (`lat`/`latitude`/`y` and `lon`/`longitude`/`x`)\n  - Customize with `s` (size), `c` (color), `alpha` (transparency), `marker` (style)\n- **Pie Charts**: Supports single column (value counts) or two columns (labels + values)\n\n**Returns:** Base64-encoded PNG image ready for display\n\n## 🤖 AI Assistant Integration\n\nPerfect for enhancing AI conversations with data visualization capabilities. The server returns plots as base64-encoded PNG images that display seamlessly in:\n\n- **LibreChat**: Direct integration for chat-based data analysis\n- **Claude Desktop**: Through `mcp-remote` command to transform from HTTP transport to stdio\n```json\n{\n  \"mcpServers\": {\n    \"plotting\": {\n      \"command\": \"uvx\",\n      \"args\": [\n        \"--from\", \"/path/to/plotting-mcp\",\n        \"plotting-mcp\", \"--transport=stdio\"\n      ]\n    }\n  }\n}\n```\n- **Custom AI Applications**: Easy integration via MCP protocol\n- **Development Tools**: Compatible with any MCP-enabled environment\n\n**Image Format**: High-quality PNG with configurable DPI and sizing\n\n## 🚀 ToolHive Deployment\n\nDeploy and manage your plotting server effortlessly with ToolHive - a platform that provides containerized, secure environments for MCP servers across UI, CLI, and Kubernetes modes.\n\n**Benefits:**\n- 🔒 **Secure Containerization**: Isolated environments with comprehensive security controls\n- ⚙️ **Multiple Deployment Options**: UI, CLI, and Kubernetes support\n- 🔧 **Developer-Friendly**: Seamless integration with popular development tools\n\n📚 **Resources:**\n- [ToolHive Documentation](https://docs.stacklok.com/toolhive/)\n- [CLI Quickstart Guide](https://docs.stacklok.com/toolhive/tutorials/quickstart-cli)\n\n### Build the Docker image\n\n```bash\ndocker build -t plotting-mcp .\n```\n\n### Run with ToolHive\n\n#### Run locally\n\n```bash\nthv run --name plotting-mcp --transport streamable-http plotting-mcp:latest\n```\n\n#### Run with ToolHive in K8s with ToolHive operator\n\n1. Create a PVC for the MCP server. This is needed since the plotting libraries Matplotlib and Cartopy require a writable filesystem to cache data:\n```bash\nkubectl apply -f toolhive-pvc.yaml\n```\n\n2. Deploy the MCP server in K8s. In the `toolhive-deployment.yaml`, you can customize the `image` field to point to your image registry.\n```bash\nkubectl apply -f toolhive-deployment.yaml\n```\n\n3. Once the MCP server is deployed, do port-forwarding\n```bash\nkubectl port-forward svc/mcp-plotting-mcp-proxy 9090:9090\n```\n\n## 🛠️ Development\n\nBuilt with modern Python tooling for a great developer experience.\n\n**Tech Stack:**\n- 🐍 **Python 3.13+**: Latest Python features\n- 📊 **Seaborn \u0026 Matplotlib**: Professional-grade plotting\n- 🌍 **Cartopy**: Advanced geospatial visualization\n- ⚡ **FastMCP**: High-performance MCP server framework\n- 🔧 **UV**: Fast Python package management\n\n### Code Quality\n\n```bash\n# Format code and fix linting issues\nmake format\n\n# Type checking\nmake typecheck\n\n# Or use uv directly\nuv run ruff format .\nuv run ruff check --fix .\nuv run ty check\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstackloklabs%2Fplotting-mcp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstackloklabs%2Fplotting-mcp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstackloklabs%2Fplotting-mcp/lists"}