Provide real-time data querying and visualization by integrating Tako with your agents. Generate o…
An MCP (Model Context Protocol) server that provides access to Tako's knowledge base and interactive data visualizations.
This MCP server enables AI agents to:
pip install tako-mcpOr install from source:
git clone https://github.com/anthropics/tako-mcp.git
cd tako-mcp
pip install -e .Sign up at trytako.com and create an API token in your account settings.
tako-mcpOr with Docker:
docker build -t tako-mcp .
docker run -p 8001:8001 tako-mcpPoint your MCP client to http://localhost:8001.
knowledge_searchSearch Tako's knowledge base for charts and data visualizations.
{
"query": "Intel vs Nvidia headcount",
"api_token": "your-api-token",
"count": 5,
"search_effort": "deep"
}Returns matching charts with IDs, titles, descriptions, and URLs.
get_chart_imageGet a preview image URL for a chart.
{
"pub_id": "chart-id",
"api_token": "your-api-token",
"dark_mode": true
}get_card_insightsGet AI-generated insights for a chart.
{
"pub_id": "chart-id",
"api_token": "your-api-token",
"effort": "medium"
}Returns bullet-point insights and a natural language description.
explore_knowledge_graphDiscover available entities, metrics, and cohorts.
{
"query": "tech companies",
"api_token": "your-api-token",
"limit": 20
}ThinViz lets you create charts with your own data using pre-configured templates.
list_chart_schemasList available chart templates.
{
"api_token": "your-api-token"
}Returns schemas like stock_card, bar_chart, grouped_bar_chart.
get_chart_schemaGet detailed info about a schema including required components.
{
"schema_name": "bar_chart",
"api_token": "your-api-token"
}create_chartCreate a chart from a template with your data.
{
"schema_name": "bar_chart",
"api_token": "your-api-token",
"source": "Company Reports",
"components": [
{
"component_type": "header",
"config": {
"title": "Revenue by Region",
"subtitle": "Q4 2024"
}
},
{
"component_type": "categorical_bar",
"config": {
"datasets": [{
"label": "Revenue",
"data": [
{"x": "North America", "y": 120},
{"x": "Europe", "y": 98},
{"x": "Asia", "y": 156}
],
"units": "$M"
}],
"title": "Revenue by Region"
}
}
]
}Returns the new chart's card_id, embed_url, and image_url.
open_chart_uiOpen an interactive chart in the UI (MCP-UI).
{
"pub_id": "chart-id",
"dark_mode": true,
"width": 900,
"height": 600
}Returns a UIResource for rendering an interactive iframe.
Environment variables:
| Variable | Description | Default |
|---|---|---|
TAKO_API_URL | Tako API endpoint | https://api.trytako.com |
PUBLIC_BASE_URL | Public URL for chart embeds | https://trytako.com |
PORT | Server port | 8001 |
HOST | Server host | 0.0.0.0 |
MCP_ALLOWED_HOSTS | Additional allowed hosts (comma-separated) | |
MCP_ENABLE_DNS_REBINDING | Enable DNS rebinding protection | true |
Run the test client:
python -m tests.test_client --api-token YOUR_API_TOKENThis verifies:
knowledge_search with the queryget_card_insights to summarize the dataget_chart_image for a previewopen_chart_ui to render an interactive chartGET /health - Simple "ok" responseGET /health/detailed - JSON with status and timestampAI Agent (LangGraph, CopilotKit, etc.)
↓
MCP Protocol (SSE)
↓
Tako MCP Server
↓
Tako APIThe server acts as a thin proxy that:
The open_chart_ui tool returns an MCP-UI resource that clients can render as an interactive iframe. The embedded chart supports:
postMessageClients that support MCP-UI (like CopilotKit) will automatically render these resources.
MIT License - see LICENSE for details.