---
title: "Agentic BI in Slack: MCP-powered analytics and visualisations"
description: "A Slack bot answers analytical questions by having an LLM query ClickHouse through MCP tools, and it now adds charts in about 50 lines of Python."
url: "https://swe.quest/articles/agentic-bi-in-slack-mcp-powered-analytics-and-visualisations-7d7452bde1510bc3"
canonical: "https://clickhouse.com/blog/agentic-bi-in-slack-mcp-visualisations"
source: "ClickHouse"
published: "2025-08-27"
difficulty: "medium"
kind: "How-to"
reading_minutes: 7
tags: ["ai-agents","analytics","llms","python"]
---

# Agentic BI in Slack: MCP-powered analytics and visualisations

A post on [ClickHouse](https://swe.quest/sources/clickhouse.md), published 2025-08-27, 7 min read, How-to. Original: [https://clickhouse.com/blog/agentic-bi-in-slack-mcp-visualisations](https://clickhouse.com/blog/agentic-bi-in-slack-mcp-visualisations)

## Summary

A Slack bot answers analytical questions by having an LLM query ClickHouse through MCP tools, and it now adds charts in about 50 lines of Python. The system prompt asks the model to emit a Vega-Lite JSON spec when a chart is useful, and the bot renders it to PNG with vl-convert and uploads it to the thread alongside a summary and the SQL. The main tradeoffs are that plotted data passes through the LLM's context window, so thousands of points aren't practical, and that charts aren't interactive or brand-styled and every request re-runs the query. Dashboards stay for curated KPIs, while chat handles exploratory questions.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [AI agents](https://swe.quest/tags/ai-agents.md) (AI & ML)
- [Analytics & OLAP](https://swe.quest/tags/analytics.md) (Data & databases)
- [LLMs](https://swe.quest/tags/llms.md) (AI & ML)
- [Python](https://swe.quest/tags/python.md) (Languages)

## Prerequisites

- LLM tool calling ([easy posts on LLMs](https://swe.quest/tags/llms.md?difficulty=easy))
- Slack bot development
- SQL basics ([easy posts on SQL](https://swe.quest/tags/sql.md?difficulty=easy))

## Keywords

ClickHouse, MCP, Slack, Vega-Lite, vega-altair, vl-convert

## Related posts

- [Agentic analytics in Slack with ClickHouse, MCP, and PydanticAI](https://swe.quest/articles/agentic-analytics-in-slack-with-clickhouse-mcp-and-pydanticai-d12acfde3a87c76f.md): ClickHouse · 2025-07-23 · Medium · 8 min read · AI agents, Analytics & OLAP, Python, LLMs
  A Slack bot built with PydanticAI and the Anthropic API answers natural-language analytics questions by querying ClickHouse through the mcp-clickhouse MCP server.
- [Building an agentic app with ClickHouse MCP and CopilotKit](https://swe.quest/articles/building-an-agentic-app-with-clickhouse-mcp-and-copilotkit-8a892e5035cf8b12.md): ClickHouse · 2025-06-12 · Medium · 9 min read · AI agents, Analytics & OLAP, React, LLMs
  A natural-language analytics dashboard for UK property prices can be built by combining an LLM (Claude Sonnet 3.7), the ClickHouse MCP Server and CopilotKit in a Next.js app.
- [LLM observability with ClickStack, OpenTelemetry, and MCP](https://swe.quest/articles/llm-observability-with-clickstack-opentelemetry-and-mcp-0444a970ae228536.md): ClickHouse · 2025-07-15 · Medium · 13 min read · Observability, LLMs, AI agents
  LibreChat (Node.js) and the Python ClickHouse MCP server can be instrumented with OpenTelemetry and shipped to ClickStack (HyperDX UI, OTel collector, ClickHouse) to observe LLM interactions, MCP tool calls and token usage with minimal code changes.
- [Building a Chatbot for Hacker News and Stack Overflow with LlamaIndex and ClickHouse](https://swe.quest/articles/building-a-chatbot-for-hacker-news-and-stack-overflow-with-llamaindex-and-8e7d236d6eb904ee.md): ClickHouse · 2024-02-29 · Medium · 23 min read · RAG & retrieval, Vector search, LLMs, Analytics & OLAP, Python
  HackBot is a chatbot that answers questions about developer opinions by combining text-to-SQL over the 2021 Stack Overflow survey with vector search over 28m embedded Hacker News comments, both stored in ClickHouse and orchestrated with LlamaIndex, OpenAI and Streamlit.
- [How Fetch built its flexible agentic analytics tool on ClickHouse Cloud](https://swe.quest/articles/how-fetch-built-its-flexible-agentic-analytics-tool-on-clickhouse-cloud-284f56cdf33d7d26.md): ClickHouse · 2026-07-28 · Easy · 6 min read · Analytics & OLAP, AI agents, Data pipelines, LLMs
  Fetch built FAST, a conversational BI agent that lets non-technical sales teams query receipt purchase data in plain language, on ClickHouse Cloud ingesting 150 billion rows (6.5 TB compressed) a day.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
