Home / MCP / Data Visualization MCP Server
Provides data storage and Vega-Lite visualization capabilities via MCP for saving data tables and rendering Vega-Lite specs.
Configuration
View docs{
"mcpServers": {
"datavis": {
"command": "uv",
"args": [
"--directory",
"/absolute/path/to/mcp-datavis-server",
"run",
"mcp_server_datavis",
"--output_type",
"png"
]
}
}
}You can save structured data tables and render them as Vega-Lite visualizations through a dedicated MCP server. This server exposes two core tools to store data and generate Vega-Lite visualizations, making it easy to iterate on charts directly from your data layer.
You interact with the server through an MCP client to save data tables and then visualize them using Vega-Lite specifications. Start by saving a data table with a descriptive name, then request a Vega-Lite visualization by passing the table name and a Vega-Lite JSON specification. You can obtain either a text-based Vega-Lite spec as an artifact or a PNG image depending on how you configure the output.
Prerequisites: ensure you have the MCP runtime available and that the datavis MCP server can be started from your environment. The server example uses a local runtime command to run the MCP server code from a directory.
1. Create a working directory for the Data Visualization MCP server.
2. Place the server code in the directory you created (the exact path is referenced in your start command below).
3. Start the server using the provided runtime command. The example demonstrates using a local runtime to run the MCP server module with a specific output type.
{
"mcpServers": {
"datavis": {
"type": "stdio",
"name": "datavis",
"command": "uv",
"args": [
"--directory",
"/absolute/path/to/mcp-datavis-server",
"run",
"mcp_server_datavis",
"--output_type",
"png"
]
}
}
}You will use two main tools exposed by this server. The save_data tool stores a table of data on the server for later visualization, and the visualize_data tool renders that data into a Vega-Lite specification. When you request a visualization, you can choose between a text output containing the Vega-Lite spec or a PNG image embedded as an artifact, depending on the output type you configure in your MCP client.
save_data saves a data table on the server for later use. Input: name (string) and data (array of objects). Returns a success message.
visualize_data renders a data table using Vega-Lite syntax. Input: data_name (string) and vegalite_specification (string as JSON). Returns a success message with an embedded Vega-Lite spec as an artifact when output_type is text, or a base64 PNG image when output_type is png.
Save a table of data aggregations to the server for later visualization. Input includes name and data, and it returns a success message.
Visualize a table of data using Vega-Lite syntax. Input includes the data table name and a Vega-Lite JSON specification. Returns a success message with an artifact containing the Vega-Lite spec and data when output_type is text, or a base64 PNG image when output_type is png.