search2chart-mcp
search2chart-mcp
Turn any tabular data into inline charts directly inside agent conversations. Zero runtime dependencies, multi-client adaptive.
Convierte cualquier dato tabular en gráficos directamente incrustados en el flujo de conversación del agente. Cero dependencias en tiempo de ejecución, adaptable a múltiples clientes.
Instalación
# 方式一:DSH 原生插件(DeepSeek Harness 用户推荐,真·内联)
dsh plugin --profile web add dsh-chart
# 方式二:npx(通用 MCP server,无需 clone)
npx search2chart-mcp
# 方式三:git clone
git clone https://github.com/iqingyoung/search2chart-mcp.gitRelated MCP server: Chart-Output MCP Server
Dos rutas
Ruta | Directorio | Aplicable |
Servidor MCP genérico | ZCode / Claude Desktop / Cursor / WorkBuddy / Trae / Codex / DSH genérico | |
Plugin DSH nativo | DeepSeek Harness (inline real, las imágenes van directamente al diálogo) |
Si usas un cliente MCP → usa
mcp/; la imagen aparece directamente en el diálogo.Si usas DSH y quieres una experiencia nativa → usa
dsh/; en DSH también puedes usarmcp/(mediante enlace de archivo).Ambos pueden coexistir.
Inicio rápido
1. Añade en tu configuración MCP
{
"mcpServers": {
"search2chart-mcp": {
"command": "npx",
"args": ["search2chart-mcp"],
"env": {}
}
}
}Si npx no puede obtenerlo, usa la ruta absoluta después de clonar:
"command": "node", "args": ["<仓库>/mcp/server.js"]
2. Primera integración: prueba qué tipo de imagen puede renderizar tu agente
Los distintos renderizadores de agentes tienen compatibilidades diferentes con los formatos de imagen. Prueba primero todo a la vez con el modo all:
Configuración temporal (agrega variables de entorno en la configuración MCP):
{
"env": {
"ECHARTS_INLINE_MODE": "all"
}
}Prompt de prueba para el agente:
用 chart_from_data 生成一个简单柱状图。
数据:[["城市","销量"],["北京",120],["上海",200],["广州",150]]
标题:城市销量对比
chartType:barEl agente devuelve 3-4 imágenes de gráficos, marcadas respectivamente como:
【1·data URI】 — base64 autocontenido, sin necesidad de red
【2·localhost http】 — servicio HTTP local
【3·file://】 — ruta de archivo local
【4·CDN público https】 — dirección pública de GitHub + jsDelivr
Aquella que realmente se renderice como imagen en el diálogo es la que tu agente soporta.
3. Modo fijo
Formato renderizable | Configuración |
data URI ✅ |
|
|
|
localhost http ✅ |
|
CDN público https ✅ |
|
MCP image block ✅ |
|
Ninguno se muestra |
|
Detección automática del agente
En los resultados de la herramienta ya hay instrucciones del agente, que le indican al modelo cómo ajustar el modo automáticamente según los comentarios del usuario:
[Agent]: 返回 4 行图片,哪张正常显示?
[User]: 3正常
[Agent]: 确认了。file:// 可渲染 → 请设置 ECHARTS_INLINE_MODE=fileCliente probado conocido: ZCode →
file, OpenCode →inline(data URI), WorkBuddy →cdn, DSH →inline(localhost http), Claude/Cursor →inline+inline+returnImage:true.
Capacidades principales
Adaptación inline en múltiples clientes
El comportamiento inline se controla mediante la variable de entorno ECHARTS_INLINE_MODE:
Modo | Comportamiento | Clientes aplicables |
| data URI → localhost http → file:// con fallback automático | OpenCode / DSH / genérico |
| Solo muestra la ruta local | ZCode |
| Sube a GitHub+jsDelivr y genera URL pública https | WorkBuddy |
| Modo de prueba: devuelve todos los formatos a la vez | Pruebas al hacer la primera |
| Modo de prueba: devuelve todos los formatos a la vez | Primera integración |
| Texto plano (ruta | Modelos de solo texto / terminal |
Alojamiento de imágenes en CDN público
Rasterización SVG → PNG (@resvg/resvg-js, dependencia opcional)
Subida mediante GitHub Contents API + aceleración con jsDelivr CDN
GitHub Actions limpia per attendant (retiene 3 días por defecto)
Conservación de datos limpios
El resultado incluye los datos completos (JSON, envuelto en un bloque de código), lo que permite que un modelo de solo texto pueda seguir haciendo análisis de proporción/antecedencia/comparación en el contexto, sin necesidad de ver el gráfico. Se puede desactivar con return: Data: false.
HTML interactivo autónomo
El gráfico también se escribe en un archivo .html; al abrirlo en el navegador, soporta hover / zoom / cambio de tipo / ajuste de colores.
Herramientas
Herramienta | Función |
| Datos estructurados → HTML del gráfico + imagen en línea |
| CSV/XLSX path → HTML del gráfico + imagen en línea |
| Enumera los tipos admitidos / convenciones de colores y campos |
Convención de campos: primera columna = eje de categorías; resto de columnas = series de valores (varias columnas = varias series); chartType: auto selección automáticamente el tipo (pastel (o col) según los datos.
Integración con clientes
Ver detalles en mcp/README.md.
Estructura de directorios
search2chart-mcp/
├── mcp/ # 跨端 MCP server(内联 SVG + 可交互 HTML)
│ ├── server.js # MCP stdio 协议 + 工具入口
│ ├── lib/
│ │ ├── chart.js # 数据归一化 + ECharts option
│ │ ├── html.js # 自包含可交互 HTML
│ │ ├── svg.js # 零依赖 SVG 渲染器
│ │ ├── httpserver.js # 本地 HTTP 服务
│ │ ├── rasterize.js # SVG→PNG
│ │ ├── upload.js # GitHub + jsDelivr CDN
│ │ └── parse.js # CSV/XLSX 解析
│ └── scripts/
│ ├── selftest.js # 端到端自检
│ └── verify_cdn.cjs # CDN 端到端验证
├── dsh/ # 原生 DSH 内联插件
├── LICENSE
└── README.mdLicencia
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseAqualityBmaintenanceRenders 45+ interactive chart types, dashboards, and KPI widgets directly inside AI conversations. Supports drill-down, live API polling, 20 themes, and one-click export to PNG, PowerPoint, and A4 documents.4025044Functional Source , Version 1.1, MIT Future
- AlicenseAqualityDmaintenanceEnables AI agents to generate and render charts as PNG, SVG, or WebP images directly in chat interfaces. Supports Chart.js specifications and natural language descriptions for creating visualizations from data.381MIT
- AlicenseNot gradedqualityBmaintenanceLet AI agents create interactive visualizations that render live inside your chat — no code required.1BSD 3-Clause
- AlicenseNot gradedqualityNot gradedmaintenanceEnables AI agents to generate beautiful, presentation-ready charts (SVG + PNG) with zero setup, supporting various chart types and styling options.25MIT
Related MCP Connectors
Renders interactive Chart.js charts and dashboards inline in AI conversations.
Provide real-time data querying and visualization by integrating Tako with your agents. Generate o…
Turn grounded AI answers into trusted comparisons, plans, timelines, and decision views.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/iqingyoung/search2chart-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server