<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/how-mcp-toolbox-turns-agent-text-into-clickhouse-vectors-t4oetlvco" -->

---
title: How MCP Toolbox turns agent text into ClickHouse vectors
description: Google's MCP Toolbox for Databases (v1.9.0) adds native text-to-vector-to-search support for ClickHouse (tested against ClickHouse Cloud 26.4.1). By marking a...
canonical: https://daily.dev/posts/how-mcp-toolbox-turns-agent-text-into-clickhouse-vectors-t4oetlvco
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: How MCP Toolbox turns agent text into ClickHouse vectors | daily.dev
og:description: Google's MCP Toolbox for Databases (v1.9.0) adds native text-to-vector-to-search support for ClickHouse (tested against ClickHouse Cloud 26.4.1). By marking a...
og:url: https://daily.dev/posts/how-mcp-toolbox-turns-agent-text-into-clickhouse-vectors-t4oetlvco
og:image: https://api.daily.dev/og/posts/T4oeTLVco.png
og:image:alt: How MCP Toolbox turns agent text into ClickHouse vectors
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# How MCP Toolbox turns agent text into ClickHouse vectors

**[ClickHouse](https://daily.dev/sources/clickhouse)** · 25 min read · 1 upvotes · 0 comments

## Summary

Google's MCP Toolbox for Databases (v1.9.0) adds native text-to-vector-to-search support for ClickHouse (tested against ClickHouse Cloud 26.4.1). By marking a tool parameter with embeddedBy in YAML, Toolbox transparently embeds text via a Gemini embedding model, binds the resulting vector as a raw []float32 to the clickhouse-go driver, and lets ClickHouse rank results with cosineDistance and an HNSW vector_similarity index - no custom embedding service required. The piece walks through installation, schema design (Array(Float32) column, ORDER BY choices, index sizing), a config format change in 1.9 (flat YAML docs vs nested), authentication via API key or Vertex ADC, the valueFromParam trick for hidden embedding parameters, storage/compression numbers for a 57-document test corpus, real search results across five topic clusters, and production caveats: Gemini is the only supported embedding provider, taskType is hardcoded to SEMANTIC_SIMILARITY (no asymmetric retrieval), REST endpoints are disabled by default, hot reload can't pick up new environment variables, and embedded queries are inlined as literals in query_log rather than true prepared statements.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://clickhouse.com/blog/mcp-toolbox-clickhouse-vectors>

## Questions this post answers

### How do I set up MCP Toolbox to automatically embed text into ClickHouse vector columns without writing my own embedding service?

Declare a Gemini embedding model resource in tools.yaml with a model name and dimension, then mark a tool parameter with embeddedBy pointing to that model name. Toolbox intercepts the raw text at invocation, calls the Gemini embedding API, and binds the resulting vector as a raw []float32 to the SQL placeholder, so the agent only ever sends and receives plain text.

_daily.dev surfaces practical setup guides like this for developers wiring agents into vector search pipelines._

### Does MCP Toolbox use real prepared statements when binding embedded vectors to ClickHouse queries?

No, despite using a question mark placeholder, the vector is inlined as a literal string by the clickhouse-go driver rather than sent as a server-side bound parameter, confirmed by pulling the executed statement from system.query_log showing a ten-kilobyte SQL string with no param_* settings present. The driver still serializes and escapes typed values, removing SQL injection risk, but every embedded query bloats query_log since vectors compress poorly.

_developers debugging query_log bloat or injection concerns in vector search setups can track these gotchas via daily.dev._

### Can I choose the embedding task type, like RETRIEVAL_DOCUMENT versus RETRIEVAL_QUERY, when using MCP Toolbox's Gemini embedding model?

No, the taskType field is hardcoded to SEMANTIC_SIMILARITY in Toolbox 1.9 and any attempt to configure taskType, useVertex, or outputDimensionality is rejected as an unknown config field. This means the same task type is used for both ingesting documents and embedding search queries, which is a plausible contributor to a compressed distance spread in retrieval results, and the only workaround is embedding outside Toolbox.

_teams evaluating retrieval quality trade-offs in embedding pipelines can follow these nuances on daily.dev._

## Similar posts on daily.dev

- [Search — The Evolution of the Karpathy LLM Wiki · Los Techies](https://daily.dev/posts/search-the-evolution-of-the-karpathy-llm-wiki-los-techies-ydht2z37z) · LosTechies · 0 upvotes · 0 comments
- [You Don't Need Embeddings for RAG](https://daily.dev/posts/you-don-t-need-embeddings-for-rag-emfjqgjs1) · TypeScript.TV · 5 upvotes · 0 comments
- [Hacker News vector search dataset](https://daily.dev/posts/hacker-news-vector-search-dataset-qxtqr95ht) · Hacker News · 0 upvotes · 0 comments
- [Build an “ask the docs” app with Laravel 13 and MariaDB Vector](https://daily.dev/posts/build-an-ask-the-docs-app-with-laravel-13-and-mariadb-vector-qre33ssfb) · MariaDB.org · 0 upvotes · 0 comments

---

Tags: [#mcp](https://daily.dev/tags/mcp), [#google-gemini](https://daily.dev/tags/google-gemini), [#vector-search](https://daily.dev/tags/vector-search), [#clickhouse](https://daily.dev/tags/clickhouse), [#embeddings](https://daily.dev/tags/embeddings)

[View this post on daily.dev](https://daily.dev/posts/how-mcp-toolbox-turns-agent-text-into-clickhouse-vectors-t4oetlvco)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"How MCP Toolbox turns agent text into ClickHouse vectors","url":"https://daily.dev/posts/how-mcp-toolbox-turns-agent-text-into-clickhouse-vectors-t4oetlvco","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/how-mcp-toolbox-turns-agent-text-into-clickhouse-vectors-t4oetlvco"},"datePublished":"2026-09-07T13:48:31.330Z","dateModified":"2026-09-13T19:10:47.552Z","description":"Google's MCP Toolbox for Databases (v1.9.0) adds native text-to-vector-to-search support for ClickHouse (tested against ClickHouse Cloud 26.4.1). By marking a...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/3b8a63b7f8f392011ad5f3702cb38f04?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/3b8a63b7f8f392011ad5f3702cb38f04?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"ClickHouse","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"ClickHouse","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/clickhouse","url":"https://daily.dev/sources/clickhouse"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/how-mcp-toolbox-turns-agent-text-into-clickhouse-vectors-t4oetlvco","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":1},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"mcp,google-gemini,vector-search,clickhouse,embeddings","timeRequired":"PT25M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"ClickHouse","item":"https://daily.dev/sources/clickhouse"},{"@type":"ListItem","position":3,"name":"How MCP Toolbox turns agent text into ClickHouse vectors"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/how-mcp-toolbox-turns-agent-text-into-clickhouse-vectors-t4oetlvco#faq","mainEntity":[{"@type":"Question","name":"How do I set up MCP Toolbox to automatically embed text into ClickHouse vector columns without writing my own embedding service?","acceptedAnswer":{"@type":"Answer","text":"Declare a Gemini embedding model resource in tools.yaml with a model name and dimension, then mark a tool parameter with embeddedBy pointing to that model name. Toolbox intercepts the raw text at invocation, calls the Gemini embedding API, and binds the resulting vector as a raw []float32 to the SQL placeholder, so the agent only ever sends and receives plain text. daily.dev surfaces practical setup guides like this for developers wiring agents into vector search pipelines."}},{"@type":"Question","name":"Does MCP Toolbox use real prepared statements when binding embedded vectors to ClickHouse queries?","acceptedAnswer":{"@type":"Answer","text":"No, despite using a question mark placeholder, the vector is inlined as a literal string by the clickhouse-go driver rather than sent as a server-side bound parameter, confirmed by pulling the executed statement from system.query_log showing a ten-kilobyte SQL string with no param_* settings present. The driver still serializes and escapes typed values, removing SQL injection risk, but every embedded query bloats query_log since vectors compress poorly. developers debugging query_log bloat or injection concerns in vector search setups can track these gotchas via daily.dev."}},{"@type":"Question","name":"Can I choose the embedding task type, like RETRIEVAL_DOCUMENT versus RETRIEVAL_QUERY, when using MCP Toolbox's Gemini embedding model?","acceptedAnswer":{"@type":"Answer","text":"No, the taskType field is hardcoded to SEMANTIC_SIMILARITY in Toolbox 1.9 and any attempt to configure taskType, useVertex, or outputDimensionality is rejected as an unknown config field. This means the same task type is used for both ingesting documents and embedding search queries, which is a plausible contributor to a compressed distance spread in retrieval results, and the only workaround is embedding outside Toolbox. teams evaluating retrieval quality trade-offs in embedding pipelines can follow these nuances on daily.dev."}}]}
```

