# MyScale (SQL Vector Database API) MCP for AI Agents AI Agent Connect

> MyScale (SQL Vector Database API) MCP lets you manage high-performance vector databases using standard SQL. You can run queries, perform similarity searches, and handle indices directly through your AI agent. It connects the power of ClickHouse with advanced vector capabilities, giving you full control over your RAG backend without switching contexts. It's the fastest way to manage high-dimensional data using familiar commands.

## Overview
- **Category:** databases
- **Price:** Free
- **Endpoint:** https://edge.vinkius.com/vk_preview_vWeauVyztoYzGBsy6h9azMYGgJ3R8tQDDZfTvuoy/ai-agent-connect
- **Tags:** sql, vector-search, rag, clickhouse, database-management

## Description

This Connector lets you treat your MyScale cluster like a standard SQL database while keeping the specialized power of vector search. Instead of jumping between different management consoles or writing complex custom scripts, you can just tell your AI agent what you need. If you need to build a new table for embeddings, check the health of your HNSW indices, or run a complex similarity search with specific filters, it just happens. It handles the heavy lifting of SQL construction and distance functions for you. You get to stay in your flow while your agent handles the database maintenance and data retrieval. It's part of the Vinkius catalog, making it easy to plug into your existing setup so you can manage high-dimensional data as easily as a regular row of text. You don't have to worry about the underlying ClickHouse syntax or the specific nuances of MSTG or ScaNN indices. Your agent understands the intent, and this Connector translates that into the correct commands. It's about moving from manual database administration to a conversational workflow where you can inspect data distributions, monitor build statuses, and update schemas in seconds. You get the reliability of a production-grade SQL backend with the speed of a modern vector search tool.

## Tools

### vector_search
Perform a similarity search where the Connector handles the SQL and distance functions. You get relevant results based on vector proximity.

### create_vector_index
Add a new vector index to a specific table. Use this to optimize search performance for your most frequent queries.

### ping_cluster
Confirm your cluster is reachable and your credentials are correct. It's a quick way to verify your connection before starting work.

### create_vector_table
Create a new table with a dedicated vector column. This helps you set up new data structures for embeddings quickly.

### execute_sql_query
Run any SQL query on your cluster with automatic JSON formatting for results. It's perfect for standard data retrieval.

### check_index_status
See if your vector indices are built, in progress, or errored out. This keeps you informed on the progress of large index builds.

## Prompt Examples

**Prompt:** 
```
Is my MyScale cluster up and can you see the tables?
```

**Response:** 
```
I've checked the connection for you. 

**Status:** ✅ Connected

I've pinged the cluster and confirmed that your credentials are valid. I can see the following tables are currently active:
- `articles`
- `product_embeddings`
- `user_profiles`
```

**Prompt:** 
```
Search for 'blue shoes' in the products table and show me the top 3 results.
```

**Response:** 
```
I'm searching the products table for 'blue shoes' and looking for the top 3 matches. Here are the best results I found:

| Product ID | Name | Similarity Score |
|---|---|---|
| P-992 | Navy Blue Running Shoes | 0.94 |
| P-104 | Cobalt Sneakers | 0.88 |
| P-442 | Deep Blue Trainers | 0.82 |
```

**Prompt:** 
```
I need a new table for user embeddings with 768 dimensions. Can you set that up?
```

**Response:** 
```
I've initiated the creation of the new table for you. 

**Table Details:**
- **Name:** `user_embeddings`
- **Dimensions:** 768
- **Engine:** MergeTree

I've set up the float array constraints and the primary ID column. Let me know if you'd like me to create a vector index for it as well.
```

## Capabilities

### Run complex SQL queries
Execute standard and custom SQL commands on your cluster directly through your agent.

### Perform similarity searches
Get relevant results based on vector proximity without writing complex math or distance functions.

### Create vector tables
Build new data structures for embeddings using natural language commands.

### Monitor index health
Check the progress and status of your vector indices in real time.

### Add new vector indices
Optimize search performance by creating specialized indices like HNSW or ScaNN.

### Verify cluster connectivity
Instantly check if your cluster is reachable and your credentials are correct.

## Use Cases

### Rapid RAG Backend Prototyping
An AI engineer needs to test a new embedding model. They ask their agent to create a new table and a ScaNN index using `create_vector_table` and `create_vector_index`.

### Real-time Index Monitoring
A data scientist is deploying a large dataset and needs to know when the build is finished. They use `check_index_status` to monitor progress.

### Complex Filtered Similarity Search
A developer needs to find items with a specific attribute and high similarity. They ask the agent to perform a `vector_search` with a custom SQL filter.

### Quick Schema Updates
A backend developer needs to add a new column to an existing table. They use `execute_sql_query` to run the ALTER command without opening a terminal.

## Benefits

- Stop writing manual SQL for similarity searches by using the `vector_search` tool to handle distance functions automatically.
- Monitor large-scale index builds in real time with `check_index_status` to ensure your data is ready for production.
- Build new data environments faster by using `create_vector_table` to define dimensions and constraints via natural language.
- Simplify data retrieval by using `execute_sql_query` which automatically formats results into JSON for your application.
- Reduce context switching by managing your ClickHouse-powered vector database directly inside your AI client.
- Verify your database connection instantly with `ping_cluster` to save time on troubleshooting credentials.

## How It Works

The bottom line is you get a natural language interface for high-performance vector database management.

1. Subscribe to the Connector and enter your MyScale Cluster URL, Username, and Password.
2. Connect the Connector to your preferred AI client like Claude, Cursor, or Windsurf.
3. Ask your agent to perform tasks like creating tables, running searches, or checking index status.

## Frequently Asked Questions

**How do I connect MyScale (SQL Vector Database API) MCP to my agent?**
Once you subscribe, you'll just need to provide your MyScale Cluster URL, username, and password in your client settings. This connects your agent directly to your database.

**Can MyScale (SQL Vector Database API) MCP handle complex SQL joins?**
Yes, it can execute arbitrary SQL queries. Your agent can handle complex joins and filters just like a standard SQL database.

**Does MyScale (SQL Vector Database API) MCP support HNSW indices?**
It does. You can use your agent to create and monitor HNSW indices, which are excellent for high-performance similarity searches.

**How does MyScale (SQL Vector Database API) MCP speed up my RAG workflow?**
It lets you manage your RAG backend using natural language. You can quickly create tables, check index health, and run searches without writing manual SQL code.

**Is MyScale (SQL Vector Database API) MCP compatible with ClickHouse?**
Yes, it's designed to work with MyScale, which combines ClickHouse power with advanced vector search capabilities.

**Can I use MyScale (SQL Vector Database API) MCP to manage multiple clusters?**
You can manage your specific cluster by providing the correct URL and credentials. This allows your agent to handle the maintenance of your production vector data.

**How can I check if my vector index has finished building?**
Use the `check_index_status` tool. It queries the system tables to show you the current status (Built, InProgress, or Error) for all vector indices in your cluster.

**Can I perform a vector search with metadata filtering?**
Yes! The `vector_search` tool includes an optional `filter` parameter where you can provide a SQL WHERE clause (e.g., "category = 'science'") to restrict your search results.

**What SQL commands are supported by the execute tool?**
The `execute_sql_query` tool supports standard MyScale/ClickHouse SQL, including SELECT, CREATE, ALTER, and INSERT. For SELECT queries, it automatically formats the output as JSON for the agent.