# Turso MCP for AI Agents AI Agent Connect

> Turso MCP lets you manage your distributed edge databases through your AI client. It handles things like provisioning new libSQL instances, managing global locations, and rotating security tokens. Instead of jumping between your terminal and the Turso dashboard, you can just tell your agent what to do.

## Overview
- **Category:** loved-by-devs
- **Price:** Free
- **Endpoint:** https://edge.vinkius.com/vk_preview_auXgf153NbgeNT8u85XWHaGvlwZ8G20GEzWf2zUa/ai-agent-connect
- **Tags:** sqlite, edge-computing, serverless, database-orchestration, jwt-authentication, data-persistence

## Description

This Connector lets you connect your Turso account to any AI agent and take full control of your serverless SQLite infrastructure through natural conversation. It turns your chat interface into a command center for your edge database fleet. You can ask your agent to provision new databases, check which global regions your data is hitting, or rotate security keys if something goes sideways. Whether you're a platform engineer checking on a distributed database or a backend dev spinning up a test environment, you can get it done without leaving your workspace. It's one of the best ways to keep your database operations in sync with your actual development work. By connecting it through Vinkius, you get a reliable way to keep your infrastructure moving as fast as your code.

## Tools

### create_database
Create a new distributed libSQL database in a specific group. This lets you provision new environments instantly.

### create_database_token
Generate a unique connection token for a specific database instance. Use this to grant secure access.

### delete_database
Permanently remove a global database from your account. This is useful for cleaning up old resources.

### get_database_details
See the specific architectural traits and metadata for any target libSQL instance. Use this to inspect your setup.

### list_databases
Show every libSQL database currently in your registry. This provides a quick overview of your fleet.

### list_database_groups
View the logical groups that organize your database locations. This helps you understand your DB orchestration.

### list_edge_locations
See the physical Fly.io datacenter mappings for your edge locations. Use this to verify global data residency.

### list_organizations
See all the organizational tenants in your Turso account. This helps identify root organizational tenants.

### list_database_tokens
Show all the active execution JWT tokens currently in use for your databases. This helps audit active access.

### rotate_database_tokens
Invalidate all pre-existing tokens for a database to secure it. This blocks old credentials immediately.

## Prompt Examples

**Prompt:** 
```
I need to set up a new database for my staging environment in the 'dev-group'.
```

**Response:** 
```
I've successfully provisioned the 'staging-db' database in the 'dev-group'. It's now available at `staging-db-dev.turso.io`. Would you like me to generate a secure connection token for it?
```

**Prompt:** 
```
Show me all the active tokens for my production database.
```

**Response:** 
```
Here are the active JWT tokens for your **production-db**:

| Token ID | Created At | Status |
| :--- | :--- | :--- |
| `tk_9283...` | 2026-07-10 | Active |
| `tk_1120...` | 2026-07-12 | Active |

Would you like me to rotate any of these?
```

**Prompt:** 
```
Where are my databases actually hosted?
```

**Response:** 
```
Your databases are currently hosted in the following global locations:

*   **us-east-1** (Virginia)
*   **eu-west-1** (Ireland)
*   **ap-southeast-1** (Singapore)

I can give you the specific Fly.io datacenter mappings for each database if you need more detail.
```

## Capabilities

### Provision new databases
Create a new distributed libSQL database in a specific group using natural language.

### Generate secure connection tokens
Mint a unique connection token tied strictly to a specific database instance.

### Delete global database instances
Permanently remove a global database from your account to clean up resources.

### Inspect database architecture
Get the specific architectural traits and metadata for any target libSQL instance.

### Revoke old database tokens
Invalidate all pre-existing tokens for a database to block old credentials instantly.

### List all edge databases
Enumerate your complete libSQL Edge Database registry in one view.

### View logical database groups
See the logical groups that organize your database locations.

### Map global datacenter locations
Look up physical Fly.io datacenter mappings for your edge locations.

### Identify organization tenants
Identify the root organizational tenants in your Turso account.

### View active execution tokens
List all active execution JWT tokens currently in use for your databases.

## Use Cases

### Emergency Token Rotation
A developer notices a potential credential leak and asks the agent to rotate all tokens for the production-db immediately using rotate_database_tokens.

### Rapid Dev Setup
A new hire needs a sandbox and asks the agent to provision a new database for their project using create_database.

### Fleet Audit
An admin asks the agent to show all their databases and their locations to verify the global footprint using list_databases and list_edge_locations.

### Resource Cleanup
A sysadmin asks the agent to find and delete any unused databases to save money using list_databases and delete_database.

## Benefits

- Faster environment setup. Use create_database to spin up new test environments in seconds without manual dashboard clicks.
- Instant security response. Use rotate_database_tokens to kill compromised credentials immediately from your chat interface.
- Better visibility. Use list_edge_locations and list_database_groups to see exactly where your data lives globally.
- Simplified token management. Use create_database_token and list_database_tokens to manage access without hunting through settings.
- Efficient cleanup. Use delete_database to remove zombie resources and keep your serverless costs down.

## How It Works

The bottom line is that you can manage your entire distributed database fleet using only natural language.

1. Subscribe to the Connector and enter your Turso API Token in the configuration.
2. Connect the Connector to your preferred client like Claude, Cursor, or Windsurf.
3. Give your agent commands to provision databases, rotate tokens, or check global locations.

## Frequently Asked Questions

**What can I do with the Turso MCP?**
You can manage your edge database fleet using natural language. This includes provisioning new databases, listing your current registry, mapping global locations, and handling security tasks like rotating tokens.

**Can I use Turso MCP to run SQL queries?**
No, this Connector is designed for infrastructure management and database orchestration. You should use a standard SQL connector or your AI client's native SQL tools to run queries.

**How do I secure my database with Turso MCP?**
You can use the Connector to rotate all existing tokens for a database instantly. This is a great way to revoke access if you suspect a security breach or when offboarding team members.

**Can I see my global database locations?**
Yes, the Connector can look up physical datacenter mappings for your edge locations. This helps you verify where your data is hosted globally.

**Is this for serverless databases?**
Yes, this Connector is specifically built for Turso's serverless libSQL edge databases, making it perfect for distributed infrastructure.

**How does Turso MCP help with costs?**
It helps you identify and delete unused or zombie databases. By making it easier to see your entire registry, you can quickly clean up resources you no longer need.

**Can my AI agent provision a new database in a specific edge location?**
Yes. You can ask your agent to list available edge locations first, and then instruct it to create a new database in a logical group hosted in that region. Ensure you provide the target group name so the database is correctly allocated to your application fleet.

**How can I quickly revoke database access if a token is compromised?**
Simply ask your agent to invalidate or rotate the tokens for that specific database name. The AI will hit the /invalidate endpoint, blocking all old tokens instantly. Afterwards, you can ask for a fresh secure token with a 24-hour expiration.

**Can the agent check if I am approaching my dataset limits?**
Yes. When querying the details of a specific database, the agent retrieves storage metadata and group allocation facts. You can ask the AI to summarize your database sizes and flags to see which instances might need an upgrade or clean-up.