Get up and running with the MCP Vizro server in a Meshagent Room, and interact with its tools via an agent in minutes:

  1. Install the Meshagent Python SDK:

    pip install "meshagent[all]"
    
  2. Sign up and authenticate:

  3. Start the Vizro MCP service in a room:

    meshagent service test --room=test --role=agent --image=meshagent/mcp-vizro:latest --env MESHAGENT_PORT=8001 --port="num=8001 path=/webhook liveness=/ type=meshagent.callable" --name=mcp-vizro-service
    
    • This command launches a Meshagent Room named test, hosting the Vizro MCP server toolkit as a callable service.
    • Note: Rooms close automatically if they go inactive.
  4. Join the room with a chatbot agent using the Vizro toolkit:

    meshagent chatbot join --room=test --agent-name=sample --name=sample --toolkit=mcp-vizro
    
    • This starts a chatbot in the Meshagent Room, with access to the full mcp-vizro toolkit.
    • Multiple toolkits can be added to the same room/agent, enabling complex workflows.
    • The output of this command will provide a link to the active Meshagent Room, where you can interact with your agent and the Vizro tools via chat.

Tools Available

Below are the tools exposed by the Vizro MCP Server for use within Meshagent Rooms.

Tools Summary

Tool NameShort Description
get_model_json_schemaGet the JSON schema for the specified Vizro model.
get_sample_data_infoRetrieve information about available sample datasets.
get_vizro_chart_or_dashboard_planGet instructions for creating a Vizro chart or dashboard.
load_and_analyze_dataLoad and analyze data from various file formats.
validate_chart_codeValidate and (optionally) preview Vizro chart code.
validate_model_configValidate a Vizro dashboard model configuration.

Tool Details

get_model_json_schema

Get the JSON schema for the specified Vizro model.

ParameterTypeDescription
model_namestringName of the Vizro model to get schema for (e.g., ‘Card’, ‘Dashboard’, ‘Page’)

get_sample_data_info

Retrieve information about sample datasets for prototyping and exploration.

Use the following data for the below purposes:

  • iris: Mostly numerical with one categorical column — good for scatter, histogram, boxplot, etc.
  • tips: Mixed numerical and categorical columns — good for bar, pie, etc.
  • stocks: Stock prices — good for line, scatter, or time-series charts.
  • gapminder: Demographic data — good for line, scatter, maps, or multi-category plots.
ParameterTypeDescription
data_namestringName of the dataset to retrieve information about

get_vizro_chart_or_dashboard_plan

Get step-by-step instructions for constructing a Vizro chart or dashboard.

ParameterTypeDescription
user_planstringUser-provided plan or goal specification

load_and_analyze_data

Load data from local files or URLs into a pandas DataFrame and obtain metadata about its structure.

Supported formats:

  • CSV (.csv)
  • JSON (.json)
  • HTML (.html, .htm)
  • Excel (.xls, .xlsx)
  • OpenDocument Spreadsheet (.ods)
  • Parquet (.parquet)
ParameterTypeDescription
path_or_urlstringPath or URL to the data file

validate_chart_code

Validate generated chart code and optionally open a PyCafe visualization link in a browser.

ParameterTypeDescription
chart_configstringObject describing the chart configuration (ChartPlan)
data_infostringMetadata about the dataset to use in the chart
auto_openboolean*(Optional) Whether to automatically preview the chart in a browser

validate_model_config

Validate Vizro dashboard configuration and get Python code or a shareable link.

If successful, returns the valid Python code for your dashboard, and if applicable, a PyCafe link which may be automatically opened in your browser.

ParameterTypeDescription
dashboard_configobject(JSON string or dict) Vizro dashboard model configuration
data_infosarrayList of DFMetaData objects with data file info
auto_openboolean*(Optional) Whether to auto-open the PyCafe link in a browser