---
title: "Integrating with ClickHouse MCP"
description: "The open-source mcp-clickhouse server can be wired into five Python agent frameworks: Agno, DSPy, LangChain, LlamaIndex and PydanticAI."
url: "https://swe.quest/articles/integrating-with-clickhouse-mcp-1c5887029a6fb2f3"
canonical: "https://clickhouse.com/blog/integrating-clickhouse-mcp"
source: "ClickHouse"
published: "2025-06-05"
difficulty: "medium"
kind: "How-to"
reading_minutes: 7
tags: ["ai-agents","llms","python","analytics"]
---

# Integrating with ClickHouse MCP

A post on [ClickHouse](https://swe.quest/sources/clickhouse.md), published 2025-06-05, 7 min read, How-to. Original: [https://clickhouse.com/blog/integrating-clickhouse-mcp](https://clickhouse.com/blog/integrating-clickhouse-mcp)

## Summary

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.

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)
- [LLMs](https://swe.quest/tags/llms.md) (AI & ML)
- [Python](https://swe.quest/tags/python.md) (Languages)
- [Analytics & OLAP](https://swe.quest/tags/analytics.md) (Data & databases)

## Prerequisites

- Python async programming ([easy posts on Python](https://swe.quest/tags/python.md?difficulty=easy))
- LLM tool calling ([easy posts on LLMs](https://swe.quest/tags/llms.md?difficulty=easy))
- Model Context Protocol basics

## Keywords

ClickHouse, MCP, mcp-clickhouse, Agno, DSPy, LangChain, LlamaIndex, PydanticAI

## Related posts

- [How to build AI agents with MCP: 12 framework comparison (2025)](https://swe.quest/articles/how-to-build-ai-agents-with-mcp-12-framework-comparison-2025-21cb351a1cc659e0.md): ClickHouse · 2025-10-13 · Medium · 27 min read · AI agents, LLMs, Python
  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.
- [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.
- [Announcing the Managed ClickStack MCP Server](https://swe.quest/articles/announcing-the-managed-clickstack-mcp-server-2e355443e7bc5530.md): ClickHouse · 2026-06-24 · Medium · 8 min read · Observability, AI agents, Analytics & OLAP
  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.
- [How MCP Toolbox turns agent text into ClickHouse vectors](https://swe.quest/articles/how-mcp-toolbox-turns-agent-text-into-clickhouse-vectors-fffe93e874cd201d.md): ClickHouse · 2026-09-07 · Medium · 22 min read · Vector search, AI agents, Analytics & OLAP, Databases
  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.

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)
