# Xata — how to use (mcp.ai)

Connect your Xata account and use 8 tools for databases straight from your AI agent. Connect with your own API key. Think data, not databases. The serverless, branchable, scalable, consistent, highly available, and searchable database service focused on the developer experience.

## Option A — via MCP (recommended)
Remote MCP endpoint (HTTP, streamable): `https://api.mcp.ai/p_xata?ms=1787295900000`
Add it as a custom/remote MCP connector in your client (Claude, Cursor, VS Code…), then authenticate when prompted. Once connected, ask the agent to use the server's tools (e.g. `xata_get_organization`).

## Option B — via direct REST API
Base URL: `https://api.mcp.ai/api/xata`
Auth: `Authorization: Bearer sk_live_…` — create a workspace API key at https://mcp.ai/settings/api-keys
Discover endpoints: `GET https://api.mcp.ai/api/xata/_endpoints`

### Endpoints
- `POST https://api.mcp.ai/api/xata/get/organization` — Tool to retrieve detailed information about a specific organization by its ID. Use when you need to check organization status, name, billing information, or admin settings.
  - body: { organization_id: string }
- `POST https://api.mcp.ai/api/xata/get/project/limits` — Tool to retrieve the default resource limits for projects in a specified organization. Use when you need to check maximum instances, storage, allowed regions, or branch limits for a Xata organization.
  - body: { organizationID: string }
- `POST https://api.mcp.ai/api/xata/list/extensions` — Tool to get available PostgreSQL extensions for a specific image. Use when you need to check which extensions can be enabled for a particular PostgreSQL version in an organization.
  - body: { image: string, region?: string, organization_id: string }
- `POST https://api.mcp.ai/api/xata/list/images` — Tool to retrieve a list of all available postgres images for a specified organization and region. Use when you need to check which database images are available for deployment.
  - body: { region?: string, organizationID: string }
- `POST https://api.mcp.ai/api/xata/list/instance/types` — Tool to retrieve a list of all instance types for the specified organization and region. Use when you need to check available instance types and their configurations including CPU, RAM, and pricing.
  - body: { region: string, organizationID: string }
- `POST https://api.mcp.ai/api/xata/list/org/api/keys` — Tool to retrieve a list of API keys for a specific Xata organization. Use when you need to view all API keys associated with an organization.
  - body: { organization_id: string }
- `POST https://api.mcp.ai/api/xata/list/regions` — Tool to retrieve a list of all regions where new branches can be deployed for the specified organization. Use when you need to check which regions are available for deploying new branches.
  - body: { organization_id: string }
- `POST https://api.mcp.ai/api/xata/update/organization` — Tool to update information for an existing organization, such as its name. Use when you need to modify organization details.
  - body: { id?: string, name?: string, organizationID: string }

## Example prompts
- "What can I do in Xata?"
- "Show me a summary of my Xata account"

## More
- Page: https://mcp.ai/xata
- Agent spec (llms.txt): https://mcp.ai/xata/llms.txt
- Postman collection: https://mcp.ai/xata/postman.json
