# SingleStore MCP

> SingleStore MCP gives your AI agent direct, read-and-write access to your SingleStore data infrastructure. Run raw SQL queries, execute semantic vector searches, list all workspaces, and audit billing usage—all from your preferred chat interface.

## Overview
- **Category:** ai-frontier
- **Price:** Free
- **Tags:** sql, semantic-search, real-time-analytics, database-administration, vector-embeddings, data-infrastructure

## Description

This MCP lets your AI client act like a full database administrator for your SingleStore setup. You stop bouncing between external dashboards just to check schema details or run complex search joins. Instead, you talk to your agent, which then executes the necessary commands against your live data. It handles everything from running raw SQL queries on demand to performing advanced vector similarity searches using `vector_search`. Plus, it keeps an eye on costs, letting you audit billing usage with a simple request for metrics. When integrated via Vinkius, this single connection gives your agent total control over the entire SingleStore environment, allowing deep data analysis without ever leaving your workflow.

## Tools

### execute_sql
Sends any standard SQL query to the database for execution, retrieving the resulting dataset.

### get_billing_usage
Retrieves a summary report showing current resource usage and billing metrics for the account.

### list_databases
Generates a list of all individual databases that exist within a specified workspace container.

### list_organizations
Provides a comprehensive catalog of all organizations currently linked to the user's account.

### list_workspaces
Lists every available workspace configured under the SingleStore infrastructure.

### vector_search
Executes a similarity search to find records whose data vectors are closest to a provided query vector.

## Prompt Examples

**Prompt:** 
```
List all my available workspaces.
```

**Response:** 
```
I've successfully identified 2 distinct workspaces assigned to your account:
- **Workspace A** (ID: ws_ab12)
- **Workspace B** (ID: ws_ef56)
```

**Prompt:** 
```
List all databases within workspace ID 1234, and then find the first 5 records in 'users_db'.
```

**Response:** 
```
The databases configured for workspace 1234 includes 'users_db' and 'logs_db'. After executing a `SELECT * FROM users LIMIT 5`, here are the detailed user rows you requested.
```

## Capabilities

### Run custom SQL queries
The agent executes raw SELECT statements against a specified database to retrieve precise data points.

### Perform similarity searches
It runs semantic vector searches, finding the closest matches within your dataset based on mathematical proximity.

### Manage and list workspaces
The agent can list all existing SingleStore workspaces and organizations associated with your account.

### Identify available databases
It lists all specific databases located within a given workspace ID so you know where to run queries.

### Audit usage and billing
You retrieve real-time metrics on your account's resource consumption and associated costs using `get_billing_usage`.

## Use Cases

### Finding the right data source for a new project
A Data Engineer needs to know if their team has already set up an environment. They ask their agent, which immediately runs `list_workspaces` and presents a clean list of available IDs, saving them manual browsing.

### Investigating a sudden spike in cloud costs
A DBA suspects resource overage. Instead of pulling up the billing dashboard, they ask their agent to run `get_billing_usage`, getting an immediate, actionable metric report back in seconds.

### Connecting text search to structured data
An ML Scientist has a block of unstructured user feedback. They feed it into the agent and use `vector_search` to pull up the 10 most semantically related customer records from the database, instantly grounding their research.

### Verifying data availability before coding
A developer needs to know if a specific module exists. They ask the agent to `list_databases` within a known workspace ID, verifying that the schema is ready for development without running any code.

## Benefits

- Stop switching tabs. You run complex queries using `execute_sql` directly through conversation, getting immediate results instead of waiting for GUI forms to load.
- Deep dive into unstructured data. Instead of manual keyword searches, use `vector_search` to find meaningful connections between records based on semantic similarity.
- Know your limits before they bite you. Use the dedicated billing tools like `get_billing_usage` to audit costs and usage patterns instantly.
- Manage infrastructure from one place. The agent handles listing everything—from all workspaces via `list_workspaces` to specific databases with `list_databases`—without needing admin console access.
- Accelerate development cycles. You can list organizations or run simple checks like `list_users`, providing context to your AI client before writing complex code.

## How It Works

The bottom line is that your AI client handles the entire round trip: understanding the need, running the query against the live database, and presenting the clean output.

1. Tell your AI client what data you need (e.g., 'Show me all users who logged in last month').
2. The MCP analyzes the request, identifies the necessary tools, and executes the required actions, such as running `execute_sql` or calling `vector_search`.
3. Your agent receives structured results—the raw data tables, lists of workspaces, or usage metrics—and presents them directly to you.

## Frequently Asked Questions

**How do I use the singlestore MCP to check my monthly bill?**
You ask the agent to audit billing usage. It calls `get_billing_usage` and returns a report on your current resource consumption and associated costs.

**Is singlestore MCP for semantic search or just SQL queries?**
It handles both. While you can run raw SQL with `execute_sql`, the dedicated `vector_search` tool lets you perform advanced, meaning-based similarity searches against your data.

**What if I need to know which databases are available?**
You first use `list_workspaces` to find the container ID. Then, tell the agent to run `list_databases` using that specific workspace ID to see all contained schemas.

**Can I list organizations with singlestore MCP?**
Yes, simply request a list of associated accounts. The agent uses `list_organizations` to pull up a catalog of all linked organizational entities for your account.

**Do I need to run raw SQL queries every time with singlestore MCP?**
No. While `execute_sql` is powerful, you can also use the agent for administrative tasks like checking resource usage via `get_billing_usage`, which doesn't require running a query.