AgentUI Dash
Allows the agent to ingest CSV/Excel data into DuckDB, detect column roles, generate KPIs and charts, and run validated SQL queries against the data.
Renders the generated corporate dashboard from ui_config.json, supporting hot reloads, file uploads, filters, charts, tables, and PDF export.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@AgentUI Dash Crea un dashboard desde examples/ventas.csv con KPIs y gráficos."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
AgentUI Dash

Genera un dashboard corporativo desde un CSV en minutos con un agente de IA.
AgentUI Dash conecta un agente de IA (vía MCP) con DuckDB y Streamlit para crear dashboards funcionales: el agente carga los datos, detecta columnas, genera KPIs y gráficos, y entrega un dashboard listo para usar. Los números se validan con verificación cruzada automática.
Para quién es
Para freelancers y agencias que crean dashboards para clientes.
Sin AgentUI Dash | Con AgentUI Dash |
Horas de código SQL y Python | Minutos con un prompt |
Riesgo de errores de cálculo | Validación cruzada automática |
Dashboard único por proyecto | Reutilizable con cualquier CSV |
Related MCP server: Quack MCP
Quickstart
Paso 1 — Instalar uv
Windows:
powershell -ExecutionPolicy Bypass -c "irm https://astral.sh/uv/install.ps1 | iex"macOS / Linux:
curl -LsSf https://astral.sh/uv/install.sh | shPaso 2 — Clonar el repositorio e instalar
git clone https://github.com/Wiliam-L/agentui-dash.git
cd agentui-dash
uv syncuv sync instala Python automáticamente si no lo tienes, y descarga todas las dependencias necesarias.
Paso 3 — Conectar con tu cliente MCP
Opencode — agrega esta entrada en ~/.config/opencode/opencode.jsonc:
{
"mcpServers": {
"agentui-dash": {
"command": "uv",
"args": ["run", "agentui-mcp"]
}
}
}Junie — agrega esta entrada en ~/.junie/mcp/mcp.json:
{
"mcpServers": {
"agentui-dash": {
"command": "uv",
"args": ["run", "agentui-mcp"]
}
}
}⚠️ Asegúrate de ejecutar estos comandos desde el directorio del repositorio clonado, o configura el
cwden la entrada del servidor MCP.
Paso 4 — Probar con datos de ejemplo
Un CSV de ejemplo ya viene incluido en examples/ventas.csv. Dile al agente:
«Tengo
examples/ventas.csv, créame un dashboard.»
El agente llamará create_dashboard() y devolverá la URL del resultado.
Cómo funciona
Usuario → Agente IA → MCP Server → ui_config.json → Streamlit UI → DuckDBEl usuario indica un archivo CSV o Excel al agente.
El agente ingesta los datos en DuckDB, detecta el rol de cada columna, y genera KPIs y gráficos.
El MCP escribe
ui_config.json— el contrato completo del dashboard.Streamlit lee el JSON y renderiza la UI. Si el JSON cambia, se actualiza en caliente sin reiniciar.
Por qué puedes confiar en los números
cross_validate_config()— verifica que los totales de los KPIs coincidan con la suma de las barras de los gráficos. Si no coinciden, alerta al agente para que corrija.safe_sql()— usasqlglotpara parsear el AST de cada consulta y bloquea operaciones de escritura, acceso a archivos o red antes de ejecutar.validate_config()— ejecuta cada consulta SQL del config y verifica que retorna resultados válidos.Validación de columnas — al actualizar datos, se comprueba que las columnas del nuevo archivo coincidan con las esperadas.
Personalización y entrega al cliente
White-label — cambia
brand_name,brand_sub,brand_iconyfooteren el config para personalizar la marca.Exportación a PDF — botón en el sidebar para descargar un reporte PDF con portada, KPIs, gráficos y tablas. El LLM también puede generar el PDF vía la herramienta
export_pdf.Actualización de datos — el dashboard incluye un file uploader para que el cliente actualice los datos sin depender del agente.
Docker — entrega el dashboard como contenedor aislado:
docker compose up --build.Recarga en caliente — el agente puede modificar KPIs o gráficos en tiempo real sin reiniciar Streamlit.
JSON como contrato —
ui_config.jsondefine la estructura del dashboard (módulos, KPIs, gráficos, filtros). Cualquier frontend que conozca este esquema puede consumirlo, no solo Streamlit.
Herramientas MCP
El agente tiene acceso a 32 herramientas públicas organizadas en categorías: dashboard, datos, configuración, consultas, filtros, detección, gráficos, exportación y servidor.
Lista completa de herramientas →
Tipos de gráficos: bar, bar_h, bar_grouped, bar_stacked, line, pie, scatter, heatmap
Instalación avanzada
Para todas las opciones de instalación (código fuente, Docker, otros clientes MCP, troubleshooting):
Limitaciones conocidas
DuckDB no es un motor multiusuario: el diseño usa conexiones efímeras para convivir entre MCP y Streamlit.
El SQL de KPIs y gráficos viene del agente;
safe_sql()mitiga riesgos, pero la calidad depende de lo que el agente produzca.El dashboard está diseñado para archivos de datos relacionados (mismo dominio). Para archivos no relacionados, el agente debe generar dashboards separados.
No hay soporte automático para JOINs entre tablas; el agente puede escribirlos manualmente con
update_config().
Roadmap
Workspaces múltiples (aislar dashboards por proyecto).
Fuentes de datos externas (PostgreSQL, MySQL).
Personalización avanzada de temas y layouts.
Autenticación y acceso seguro — integrar un reverse proxy (Cloudflare Access o Auth0) para proteger dashboards con login sin modificar código de la app.
Licencia
MIT — libre para evaluación y demo.
Available Tools
32 toolsaudit_dashboardAudit DashboardA
Comprehensive audit of the generated dashboard for truthfulness and quality.
This tool goes beyond basic validation to question the LLM's decisions:
Are the correct tables used in the config?
Do KPIs make sense (no NULLs, no zeros when they shouldn't be)?
Do charts show what they claim (correct columns, reasonable data)?
Is the dashboard complete (no empty modules, broken filters)?
Is the SQL safe (no cartesian products, proper aggregations)?
Are KPIs consistent with chart totals (cross-validation)?
Use this AFTER generate_config() and validate_config() as the final quality gate before delivering the dashboard to the user.
Inputs: no named parameters. Returns: result
build_chart_configBuild Chart ConfigA
Build a complete chart config dict for ui_config.json.
⚠️ IMPORTANT: The color field in charts is a COLUMN NAME for grouping,
NOT a hex color. If you want a single-color chart, omit color entirely.
Hex colors (like "#246bfd") are only for KPI cards, not charts.
Inputs: chart_json (required). Returns: result
build_filter_configBuild Filter ConfigC
Build a complete filter config dict for ui_config.json.
Inputs: filter_json (required). Returns: result
build_kpi_configBuild Kpi ConfigB
Build a complete KPI config dict for ui_config.json.
Note: The color field in KPIs IS a hex color for the card background
(e.g. "#246bfd"). This is different from charts where color is a column name.
Inputs: kpi_json (required). Returns: result
build_module_configBuild Module ConfigC
Build a complete module config dict for ui_config.json.
Inputs: module_json (required). Returns: result
check_streamlit_statusCheck Streamlit StatusB
Check if the Streamlit dashboard server is running.
Inputs: no named parameters. Returns: result
clear_dataClear DataB
Clear all data from the database and reset the dashboard.
Inputs: no named parameters. Returns: result
create_dashboardCreate DashboardA
Create a complete dashboard from a CSV file in one step.
This is the MAIN entry point for users. It handles the entire workflow: uploads the CSV, detects columns, generates KPIs, charts, and filters, and saves the configuration. The Streamlit UI (already running) will auto-refresh to display the new dashboard.
Inputs: file_path (required), dashboard_name. Returns: result
cross_validate_configCross Validate ConfigA
Cross-validate dashboard numbers for consistency.
This tool performs deeper checks than validate_config():
KPI vs Chart consistency: if a KPI sums a column and a chart breaks it down, the chart total should match the KPI value.
Null detection: alerts if KPIs return NULL or zero unexpectedly.
Column reference check: verifies that chart x/y/column/valores fields actually exist in the query results.
Data quality: detects if all chart bars have the same value (possible aggregation error).
Use this AFTER validate_config() passes to ensure the dashboard numbers are not only valid SQL but also internally consistent.
Inputs: no named parameters. Returns: result
detect_columnsDetect ColumnsA
Detect which columns map to which roles for a loaded table.
Uses the _ROLES synonym dictionary to match physical CSV columns to logical roles (e.g. "branch" → "sucursal", "total_usd" → "monto"). The MCP agent can use this to understand the data before generating config.
Inputs: table_name (required). Returns: result
explore_dataExplore DataA
Explore a table's data: column types, statistics, and chart recommendations.
This is the key tool for designing a good dashboard. It returns:
Total rows and columns
Each column's type, unique values, null count, and sample values
Classification: which columns are categorical, numeric, or date
Chart recommendations based on column combinations
Suggested KPIs based on numeric columns
Use this AFTER upload_csv to understand the data before calling generate_config() or building custom charts.
Inputs: table_name (required). Returns: result
export_pdfExport PdfA
Export the current dashboard to a PDF report.
Generates a complete PDF with a cover page (client brand), all KPIs, charts (as images), and tables from every module in the dashboard. The PDF is white-label — it shows only the client's brand, never AgentUI Dash.
The file is saved to app_base/export/dashboard.pdf.
Inputs: no named parameters. Returns: result
generate_configGenerate ConfigA
Auto-generate the UI configuration based on loaded data.
Analyzes the first 100 rows of ALL loaded tables, detects column roles using synonym matching, and generates a complete ui_config.json with:
column_mapping (role → physical column)
filtros_globales (filter definitions)
modulos (KPIs, charts, tables with SQL queries)
The table name(s) discovered from the database are used in all generated SQL.
Inputs: no named parameters. Returns: result
get_available_rolesGet Available RolesB
List all available column roles and their synonyms.
Inputs: no named parameters. Returns: result
get_configGet ConfigA
Read the current UI configuration file (alias for load_config).
Inputs: no named parameters. Returns: result
get_date_rangeGet Date RangeC
Get the min/max date range for a date column.
Inputs: filter_json (required). Returns: result
get_filter_optionsGet Filter OptionsC
Get distinct values for a filter column.
Inputs: filter_json (required). Returns: result
get_kpiGet KpiC
Execute a KPI query and return a single value.
Inputs: kpi_json (required). Returns: result
get_table_columnsGet Table ColumnsB
Get the column names and types for a specific table.
Inputs: table_name (required). Returns: result
list_chart_typesList Chart TypesA
List all available chart types with descriptions and usage guidance.
Use this to understand what chart types the dashboard supports and when to use each one.
Inputs: no named parameters. Returns: result
list_tablesList TablesB
List all tables currently loaded in the database.
Inputs: no named parameters. Returns: result
load_configLoad ConfigB
Load the current ui_config.json from disk.
Inputs: no named parameters. Returns: result
preview_tablePreview TableC
Preview the first N rows of a table.
Inputs: table_name (required), limit. Returns: result
recommend_chartRecommend ChartA
Recommend chart types based on the data returned by a SQL query.
Execute the SQL, analyze the resulting DataFrame columns, and suggest the most appropriate chart types with their config keys.
Inputs: sql (required). Returns: result
run_queryRun QueryC
Execute a SQL query against the DuckDB database.
Inputs: sql (required). Returns: result
run_query_with_filtersRun Query With FiltersC
Execute a SQL query with dynamic filters from the config.
Inputs: sql (required), filters_json (required). Returns: result
start_streamlitStart StreamlitB
Start the Streamlit dashboard server in the background.
Launches the Streamlit app so the user can view the dashboard in their browser. The server auto-refreshes every 3 seconds when ui_config.json changes.
Inputs: port. Returns: result
stop_streamlitStop StreamlitA
Stop the Streamlit dashboard server.
⚠️ WARNING: This will make the dashboard unavailable to the user. Only use this if the user explicitly asks to stop the dashboard.
Inputs: no named parameters. Returns: result
update_configUpdate ConfigA
Update the UI configuration file with validated JSON.
This tool validates the complete ui_config.json structure before saving:
Checks required keys: modulos, filtros_globales, column_mapping
Validates each module has id, nombre, and proper kpis/graficos/tablas
Validates each KPI has sql and label
Validates each chart has sql, tipo, and titulo
Validates each filter has nombre, columna, and tabla
Validates all SQL queries for syntax errors
Auto-fills missing optional fields (brand_name, footer, empty_state, etc.)
Creates a backup of the previous config (.json.bak)
⚠️ BEFORE calling this tool, you MUST:
Review your JSON carefully — especially chart
colorfields (column name, NOT hex).Ensure all SQL queries use the correct table name and column names.
After saving, call validate_config() to verify all queries execute correctly.
Fix any errors reported by validate_config() before telling the user it's ready.
Inputs: json_string (required). Returns: result
upload_csvUpload CsvC
Upload a CSV/Excel file to the dashboard database.
The file will be ingested into a DuckDB table with the given name. The MCP agent decides the table name — no auto-classification.
Inputs: file_path (required), table_name. Returns: result
upload_multiple_csvsUpload Multiple CsvsC
Upload multiple CSV/Excel files at once into the same table.
Inputs: file_paths (required), table_name. Returns: result
validate_configValidate ConfigA
Validate all SQL queries in the current ui_config.json against the database.
This tool checks:
JSON structure validity (required keys, types)
SQL syntax for every KPI, chart, and table query
Executes each query to verify it returns results
Reports execution time for each query
Use this AFTER generate_config() or update_config() to verify the dashboard will render correctly before showing it to the user.
Inputs: no named parameters. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 32 tools
Most tools target distinct lifecycle stages (ingest → explore → build config → validate → export), but several pairs overlap: get_config is explicitly an alias for load_config, create_dashboard duplicates the upload_csv+generate_config workflow, and validate_config/cross_validate_config/audit_dashboard form a three-tier validation ladder that is easy to misselect. The build_* helpers also compete conceptually with generate_config and update_config. Descriptions mitigate much of this but the boundaries are still blurry in the validation and config-building clusters.
All 32 tools use consistent snake_case with a clear verb_noun pattern (load_config, validate_config, upload_csv, build_chart_config, check_streamlit_status). No mixed casing or arbitrary naming styles appear, and prefixes like get_/build_/run_/list_ group tools predictably by intent.
32 tools exceeds a reasonable surface even for a multi-stage dashboard pipeline, and several tools are redundant (load_config/get_config alias, create_dashboard vs upload_csv+generate_config) or thin single-purpose helpers (build_filter_config, build_kpi_config). Pruning aliases and merging build_* helpers would materially improve the set.
Coverage is strong across the domain: ingestion, schema/role detection, config generation and validation, query execution with filters, chart-type guidance, PDF export, and server lifecycle are all present. Minor gaps remain — no table drop/rename or per-module edit/delete operations, and no explicit dashboard preview/screenshot tool, but agents can work around these via run_query and update_config.
Maintenance
Related MCP Connectors
The all-in-one data stack for agents. Upload files, run SQL, evolve tables, and render charts.
AI data analyst: ask about your Excel, CSV, GA4 or database data and get charts and dashboards back
Interactive data visualization and executive PDF dashboards for ChatGPT, Claude, and Cursor.
Charts and dashboards as images for AI agents. No browser, same data same bytes. Local and free.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables users to ask questions about their spreadsheets in plain English and receive instant answers using DuckDB-powered analytics, supporting multiple file formats like Excel, CSV, and Parquet.2MIT
- AlicenseNot gradedqualityDmaintenanceEnables LLM agents to load, explore, and analyze CSV and Excel files using DuckDB, with tools for SQL querying, statistical analysis, expense optimization, and anomaly detection.MIT
- AlicenseNot gradedqualityBmaintenanceEvery live trading feed is a table: today it serves your CSV, Parquet and JSON files to AI agents as SQL tables (Apache DataFusion), with joins across files, schema and column statistics.1Apache 2.0
- AlicenseNot gradedqualityCmaintenanceEnables AI coding agents to turn local data into live, interactive browser dashboards from natural-language requests. Every figure is checked before saving, with visible SQL sources and support for common files and databases.MIT