by isaacwasserman
mcp-vegalite-server is a Model Context Protocol (MCP) server implementation that enables Large Language Models (LLMs) to visualize data using Vega-Lite syntax.
mcp-vegalite-server is an MCP (Model Context Protocol) server designed to provide an interface for Large Language Models (LLMs) to generate data visualizations. It leverages the Vega-Lite syntax and renderer to create visual representations of data.
To use mcp-vegalite-server, you need to integrate it with an LLM environment that supports MCP servers, such as Claude Desktop. You add the server configuration to your claude_desktop_config.json
file, specifying the command to run the server and the desired output type (e.g., png
for image output or text
for Vega-Lite specification).
save_data
tool allows you to store tables of data aggregations on the server for later visualization.visualize_data
tool enables the visualization of saved data using Vega-Lite specifications. It can return either a success message with the complete Vega-Lite specification or a base64 encoded PNG image of the visualization.Q: What is Vega-Lite? A: Vega-Lite is a high-level grammar for interactive graphics. It provides a concise JSON syntax for rapidly generating a wide range of common visualizations.
Q: Can I get the visualization as an image?
A: Yes, by setting the --output_type
to png
when configuring the server, you can receive a base64 encoded PNG image of the visualization.
Q: What kind of data can I visualize?
A: You can visualize tabular data, which is provided as an array of objects to the save_data
tool.
A Model Context Protocol (MCP) server implementation that provides the LLM an interface for visualizing data using Vega-Lite syntax.
The server offers two core tools:
save_data
name
(string): Name of the data table to be saveddata
(array): Array of objects representing the data tablevisualize_data
data_name
(string): Name of the data table to be visualizedvegalite_specification
(string): JSON string representing the Vega-Lite specification--output_type
is set to text
, returns a success message with an additional artifact
key containing the complete Vega-Lite specification with data. If the --output_type
is set to png
, returns a base64 encoded PNG image of the visualization using the MPC ImageContent
container.# Add the server to your claude_desktop_config.json
{
"mcpServers": {
"datavis": {
"command": "uv",
"args": [
"--directory",
"/absolute/path/to/mcp-datavis-server",
"run",
"mcp_server_datavis",
"--output_type",
"png" # or "text"
]
}
}
}
Reviews feature coming soon
Stay tuned for community discussions and feedback