# Xata MCP for AI Agents AI Agent Connect

> Xata MCP for AI Agents. Manage your serverless database infrastructure, projects, and organization access using natural language. Connect your account to your AI client to handle data tasks without leaving your workspace.

## Overview
- **Category:** databases
- **Price:** Free
- **Endpoint:** https://edge.vinkius.com/undefined/ai-agent-connect
- **Tags:** serverless, relational-database, vector-search, data-api, schema-management, data-orchestration

## Description

This Connector connects your Xata account to your AI agent so you can manage your serverless data infrastructure through natural conversation. Instead of jumping between different dashboards to spin up new projects or check your resource limits, you can just tell your agent what needs doing. You can handle organization management, like inviting new members or updating roles, while also managing branches and grabbing credentials. It even lets you run SQL queries directly against your data and manage your deployment pipeline by mapping GitHub repositories to specific branches. You can also handle API keys and keep your repository mapping organized. This Connector is part of the Vinkius catalog, making it easy to plug into your existing setup and give you a way to manage your database lifecycle entirely through conversation. You'll find that handling complex tasks like rotating passwords or checking observability metrics becomes a simple request rather than a series of clicks.

## Tools

### create_branch
Create a new database branch for your project. This lets you isolate development work from production data.

### create_org_api_key
Generate a new API key for your organization. Use this to provide secure access to your data.

### create_organization
Create a new Xata organization. This helps you group different projects and teams together.

### delete_user_api_keys
Bulk delete user API keys by their ID. This is a fast way to clean up old credentials.

### execute_sql
Run single or batch SQL queries over HTTP. This lets you pull data directly into your chat.

### get_branch_credentials
Get the username and password for a specific branch. This helps you grab connection details quickly.

### get_branch_metrics
View CPU, memory, and disk usage for a branch. Use this to monitor your database performance.

### get_github_repository_mapping
See which GitHub repo is linked to a branch. This helps you verify your deployment connections.

### get_organization
Fetch detailed information about a specific organization. Use this to review your current setup.

### get_project_limits
Check the resource limits for projects in an organization. This helps you manage your quotas.

### list_images
View available PostgreSQL versions and images. This helps you choose the right setup for your project.

### list_org_api_keys
List all organization-scoped API keys. Use this to audit your current security access.

### list_organization_invitations
View all pending or expired invitations. This helps you track who is joining your team.

### list_organization_members
See who belongs to a specific organization. Use this to manage your team's access levels.

### list_organizations
List all organizations you belong to. This gives you a high-level view of your account.

### list_projects
See all projects within an organization. Use this to manage your different database environments.

### list_regions
See available regions for project deployment. This helps you choose the best location for your data.

### list_user_api_keys
See the API keys for your account. Use this to manage your personal access points.

### map_github_repository
Link a GitHub repository to a database branch. This automates the connection between code and data.

### remove_organization_member
Remove a member from an organization. Use this to offboard users quickly.

### rotate_branch_credentials
Trigger a password rotation for a database branch. This keeps your credentials fresh and secure.

### update_organization
Update the general information for an organization. Use this to keep your workspace details current.

### cancel_organization_invitation
Cancel a pending invitation to an organization. This helps keep your member list clean.

### install_github_app
Link a GitHub App installation to your organization. This connects your tools to your workflow.

### invite_organization_member
Send an email invite to a user for an organization. Use this to quickly onboard new team members.

### list_branches
See all branches available in a project. This gives you a quick overview of your environments.

### create_project
Create a new project inside an organization. Use this to set up new database environments.

### create_user_api_key
Generate a new API key for a specific user. This is useful for granting individual access.

## Prompt Examples

**Prompt:** 
```
Can you create a new branch for my 'staging' project and show me the resource limits?
```

**Response:** 
```
I've created the new branch for you. Here are the current project limits:

| Metric | Limit |
| :--- | :--- |
| **CPU** | 2 Cores |
| **Memory** | 4GB |
| **Storage** | 100GB |

Let me know if you'd like me to map a GitHub repo to this new branch.
```

**Prompt:** 
```
I need to invite dev-team@company.com to our main organization.
```

**Response:** 
```
I've sent that invitation to dev-team@company.com for the 'Main-Org' organization. You can see all pending invites here:

| Email | Status |
| :--- | :--- |
| dev-team@company.com | Pending |

Would you like me to check if they've accepted yet?
```

**Prompt:** 
```
Run a query to count how many active users we have in the 'analytics' table.
```

**Response:** 
```
I ran that SQL query for you.

**Result:** 1,240 active users.

Would you like me to run any other queries on the analytics table or export this data?
```

## Capabilities

### Create database branches
Spin up new environments for testing or production with a single request.

### Execute SQL queries
Run single or batch queries directly through your agent to fetch data.

### Manage organization members
Invite users, remove members, or cancel pending invites through chat.

### Rotate branch credentials
Refresh database passwords without manual configuration in your dashboard.

### Map GitHub repositories
Link your code repos to specific database branches to keep everything in sync.

### Check resource limits
View project quotas and observability data like CPU and memory on the fly.

## Use Cases

### Spinning up a dev environment
A developer needs a new branch for a feature. They ask the agent to use create_branch and map_github_repository to get it ready in seconds.

### Managing team access
A manager needs to add a freelancer. They tell the agent to use invite_organization_member and get_organization to ensure the right permissions are set.

### Quick data inspection
A data analyst needs to check a count. They ask the agent to use execute_sql to run a query and report back the results.

### Security audit
A DevOps lead needs to clean up old keys. They ask the agent to use list_user_api_keys and delete_user_api_keys to remove stale credentials.

## Benefits

- Manage your database branches without leaving your IDE by using create_branch to spin up new environments instantly.
- Run complex queries faster by using execute_sql to pull data directly into your chat window for immediate analysis.
- Handle team access easily by using invite_organization_member and remove_organization_member to manage your user base.
- Secure your infrastructure by using rotate_branch_credentials to refresh passwords without manual configuration in a dashboard.
- Keep your deployments in sync by using map_github_repository to link your code to your database branches automatically.
- Monitor your usage with get_branch_metrics to see CPU and memory stats without opening a separate observability tab.

## How It Works

The bottom line is you get full control over your serverless database lifecycle through a simple chat interface.

1. Subscribe to the Xata MCP on the Vinkius Marketplace.
2. Enter your Xata API Key into your AI client settings.
3. Start asking your agent to create projects, run queries, or manage keys.

## Frequently Asked Questions

**How does the Xata MCP help with my database workflow?**
It lets you manage your serverless database infrastructure through your AI agent. You can create projects, branches, and manage members without leaving your current workspace.

**Can I use the Xata MCP to run SQL queries?**
Yes, your agent can run single or batch SQL queries directly. You can ask it to fetch specific data or perform updates on your tables.

**How do I manage my team's access using Xata?**
You can use the agent to invite new members, remove old ones, and manage organization roles. It handles the invitations and membership updates for you.

**Does the Xata MCP support GitHub integration?**
Yes, it can link your GitHub repositories to specific database branches. This helps keep your code and data infrastructure in sync.

**Can I monitor my database performance with this?**
You can ask your agent to check branch metrics like CPU, memory, and disk usage. It pulls this data directly from Xata for you.

**Is it possible to rotate my database passwords?**
Yes, the Connector can trigger a password rotation for your branches. This keeps your credentials fresh and secure without manual configuration.

**Can I see all organizations I have access to?**
Yes! Use the `list_organizations` tool to retrieve all Xata organizations available to your current API key.

**How do I start a new project in a specific organization?**
Simply use the `create_project` action providing the `organization_id` and the desired name for your new project.

**Can I run raw SQL queries through the agent?**
Yes, the `execute_sql` tool allows you to run SQL queries directly against your database branches for advanced data manipulation and analysis.