Integrating with ClickHouse MCP
The open-source mcp-clickhouse server can be wired into five Python agent frameworks: Agno, DSPy, LangChain, LlamaIndex and PydanticAI. Each example uses uv to launch the server over stdio, points it at the public ClickHouse SQL Playground, and uses Anthropic Claude models. The frameworks differ mainly in ceremony. PydanticAI and Agno take the server directly, while DSPy needs a Signature class and manual conversion of MCP tools. LlamaIndex's default max_function_calls of 5 was too low to answer questions and had to be raised to 10. ClickHouse also plans a remote MCP server built into ClickHouse Cloud.
Related posts
- How to build AI agents with MCP: 12 framework comparison (2025)
ClickHouse mediumAdept
Twelve agent SDKs now support the Model Context Protocol: Claude Agent SDK, OpenAI Agents SDK, Microsoft Agent Framework, Google ADK, CrewAI, Upsonic, mcp-agent, Agno, DSPy, LangChain, LlamaIndex and PydanticAI. Each is shown connecting to the ClickHouse MCP Server against a public SQL playground, with Python code for every framework. Differences covered include Claude Agent SDK's required tool allowlist, OpenAI's handoff and streaming patterns, and Microsoft's preview status and Azure ties. Choosing among them comes down to language support, ecosystem and how much abstraction you want.
- Agentic analytics in Slack with ClickHouse, MCP, and PydanticAI
ClickHouse mediumAdept
A Slack bot built with PydanticAI and the Anthropic API answers natural-language analytics questions by querying ClickHouse through the mcp-clickhouse MCP server. The walkthrough covers Slack app setup in Socket Mode (scopes, events, tokens), launching the MCP server on demand via MCPServerStdio (simpler to manage, at some latency cost), configuring the Agent with a system prompt, and handling DMs and mentions with thread history passed as context. Logs show the LLM listing tools, databases and tables before issuing SQL against the public sql.clickhouse.com playground.
- Building an agentic app with ClickHouse MCP and CopilotKit
ClickHouse mediumAdept
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. The LLM turns a prompt into SQL, CopilotKit's MCP client runs it against ClickHouse over SSE, and the model then calls a `generateChart` action defined with `useCopilotAction` to render the result via ECharts. The walkthrough covers swapping in the Anthropic adapter, running the MCP server with fastmcp, and sharing chart state with `useCopilotReadable`. It recommends a read-only ClickHouse user with restricted databases, quotas and a limited settings profile so the model cannot reach data or run queries beyond what is intended.
- Announcing the Managed ClickStack MCP Server
ClickHouse mediumAdept
ClickStack's MCP server, which exposes observability-specific investigation tools for logs, metrics and traces to agents like Claude Code, Cursor and Codex, is now available in Managed ClickStack on ClickHouse Cloud with OAuth and per-service dedicated compute. Semantic tools beat raw SQL generation: internal benchmarks show 25% fewer tool calls, 2.5x more consistency and roughly 20% higher eval scores than the generic ClickHouse MCP. The event patterns tool, for example, samples matching events, clusters them with Drain3 in the MCP layer and extrapolates counts, keeping query cost fixed instead of scanning the full dataset. The server also exposes orchestration tools so agents can persist investigations as dashboards and saved searches, while SQL remains available as an escape hatch.
- How MCP Toolbox turns agent text into ClickHouse vectors
ClickHouse mediumAdept
Google's MCP Toolbox for Databases can declare a Gemini embedding model in YAML and mark tool parameters as `embeddedBy`, so agents send plain text and Toolbox embeds it and binds the vector into ClickHouse SQL for ingestion and cosine-distance search. Tested against Toolbox 1.9.0 and ClickHouse Cloud 26.4.1, the walkthrough covers installation, prebuilt ClickHouse tools, an HNSW vector_similarity table, and curated insert/search tools. Several implementation details turned up in testing: vectors are interpolated client-side by clickhouse-go rather than server-side bound, which still escapes injection attempts but bloats query_log. Gemini embeddings at 768 dimensions are not unit-normalized, so cosine distance should be used consistently. Gemini is the only supported embedding provider, and the `dimension` field sets the model's output size, so it must match the index width.