You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+69-29Lines changed: 69 additions & 29 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,12 +1,14 @@
1
-
# Plotting MCP Server
1
+
# 📊 Plotting MCP Server
2
2
3
-
An MCP (Model Context Protocol) server that generates plots from CSV data, optimized for LibreChat integration.
3
+
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.
4
4
5
-
## Features
5
+
## ✨ Features
6
6
7
-
- Generate plots from CSV data strings
8
-
- Support for multiple plot types: line, bar, pie
9
-
- Returns base64-encoded PNG images compatible with LibreChat
7
+
-**📈 Multiple Plot Types**: Create line charts, bar graphs, pie charts, and world maps
8
+
-**🌍 Geographic Visualization**: Built-in support for plotting coordinate data on world maps using Cartopy
9
+
-**🔧 Flexible Parameters**: Fine-tune your plots with JSON-based configuration options
10
+
-**📱 Chat-Ready Output**: Returns base64-encoded PNG images perfect for AI chat interfaces
11
+
-**⚡ Fast Processing**: Efficient CSV parsing and plot generation with pandas and matplotlib
10
12
11
13
## Installation
12
14
@@ -35,26 +37,57 @@ The server runs on port 9090 by default.
35
37
### Tools
36
38
37
39
#### `generate_plot`
38
-
Generate a plot from CSV data.
40
+
Transform your CSV data into stunning visualizations.
39
41
40
42
**Parameters:**
41
43
-`csv_data` (str): CSV data as a string
42
-
-`plot_type` (str): Type of plot (line, bar, pie)
43
-
-`**kwargs`: Additional plotting parameters.
44
-
45
-
**Returns:** Base64 PNG image with data URL prefix
46
-
47
-
## LibreChat Integration
44
+
-`plot_type` (str): Plot type - `line`, `bar`, `pie`, or `worldmap`
45
+
-`json_kwargs` (str): JSON string with plotting parameters for customization
46
+
47
+
**Plotting Options:**
48
+
-**Line/Bar Charts**: Use Seaborn parameters (`x`, `y`, `hue` for data mapping)
49
+
-**World Maps**: Automatic coordinate detection (`lat`/`latitude`/`y` and `lon`/`longitude`/`x`)
-**Pie Charts**: Supports single column (value counts) or two columns (labels + values)
52
+
53
+
**Returns:** Base64-encoded PNG image ready for display
54
+
55
+
## 🤖 AI Assistant Integration
56
+
57
+
Perfect for enhancing AI conversations with data visualization capabilities. The server returns plots as base64-encoded PNG images that display seamlessly in:
58
+
59
+
-**LibreChat**: Direct integration for chat-based data analysis
60
+
-**Claude Desktop**: Through `mcp-remote` command to transform from HTTP transport to stdio
61
+
```json
62
+
{
63
+
"mcpServers": {
64
+
"math": {
65
+
"command": "npx",
66
+
"args": [
67
+
"mcp-remote",
68
+
"http://localhost:9090/mcp"
69
+
]
70
+
}
71
+
}
72
+
}
73
+
```
74
+
-**Custom AI Applications**: Easy integration via MCP protocol
75
+
-**Development Tools**: Compatible with any MCP-enabled environment
48
76
49
-
This MCP server is designed to work with LibreChat. The generated images are returned as base64 PNG data that LibreChat can display directly.
77
+
**Image Format**: High-quality PNG with configurable DPI and sizing
50
78
51
-
Supported image format: PNG
79
+
## 🚀 ToolHive Deployment
52
80
53
-
## ToolHive
81
+
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.
54
82
55
-
ToolHive is a platform that simplifies the deployment and management of Model Context Protocol (MCP) servers by providing containerized, secure environments across UI, CLI, and Kubernetes modes. It offers streamlined deployment with comprehensive security controls and integration with popular development tools.
83
+
**Benefits:**
84
+
- 🔒 **Secure Containerization**: Isolated environments with comprehensive security controls
85
+
- ⚙️ **Multiple Deployment Options**: UI, CLI, and Kubernetes support
86
+
- 🔧 **Developer-Friendly**: Seamless integration with popular development tools
56
87
57
-
For more information, see the [ToolHive documentation](https://docs.stacklok.com/toolhive/). To get started with the CLI, check out the [ToolHive CLI Quickstart](https://docs.stacklok.com/toolhive/tutorials/quickstart-cli).
0 commit comments