Xata MCP server

Connect Xata to Claude, ChatGPT, Cursor, Claude Code, Codex, Gemini, GitHub Copilot and any other MCP client, for your whole team. Metorial adds security, governance, and tracing, and gives everyone one Magic MCP URL to connect.

What you can do with the Xata MCP server

Ask your agent in plain language. Each of these maps to a real tool on the server.

  • Use the list tables tool in Xata
  • Use the update record tool in Xata
  • Use the aggregate table tool in Xata
  • Use the get branch details tool in Xata
  • Use the delete record tool in Xata
  • Use the create table tool in Xata

Supported Tools

list_tables

List Tables

DEPRECATED — Xata Lite was permanently retired on February 28, 2026. This legacy operation is unavailable. Discover current organizations with list_organizations and use the current project/branch tools for platform management; data access uses native PostgreSQL. Legacy contract: List all tables in a database branch. Returns table names and optionally their column schemas.

update_record

Update Record

DEPRECATED — Xata Lite was permanently retired on February 28, 2026. This legacy operation is unavailable. Discover current organizations with list_organizations and use the current project/branch tools for platform management; data access uses native PostgreSQL. Legacy contract: Update an existing record in a Xata table by its ID. Only the provided fields will be updated; other fields remain unchanged. Use upsert mode to create the record if it doesn't exist.

aggregate_table

Aggregate Table

DEPRECATED — Xata Lite was permanently retired on February 28, 2026. This legacy operation is unavailable. Discover current organizations with list_organizations and use the current project/branch tools for platform management; data access uses native PostgreSQL. Legacy contract: Run analytics aggregations on a table using the search/analytics engine. Supports count, sum, average, min, max, unique count, date histograms, top values, percentiles, and nested sub-aggregations.

get_branch

Get Branch Details

DEPRECATED — Xata Lite was permanently retired on February 28, 2026. This legacy operation is unavailable. Discover current organizations with list_organizations and use the current project/branch tools for platform management; data access uses native PostgreSQL. Legacy contract: Get detailed information about a specific database branch, including its schema, tables, and metadata.

delete_record

Delete Record

DEPRECATED — Xata Lite was permanently retired on February 28, 2026. This legacy operation is unavailable. Discover current organizations with list_organizations and use the current project/branch tools for platform management; data access uses native PostgreSQL. Legacy contract: Delete a record from a Xata table by its ID.

create_table

Create Table

DEPRECATED — Xata Lite was permanently retired on February 28, 2026. This legacy operation is unavailable. Discover current organizations with list_organizations and use the current project/branch tools for platform management; data access uses native PostgreSQL. Legacy contract: Create a new table in a database branch.

create_database

Create Database

DEPRECATED — Xata Lite was permanently retired on February 28, 2026. This legacy operation is unavailable. Discover current organizations with list_organizations and use the current project/branch tools for platform management; data access uses native PostgreSQL. Legacy contract: Create a new database in the configured workspace. Optionally specify a region and initial branch name.

list_workspaces

List Workspaces

DEPRECATED — Xata Lite was permanently retired on February 28, 2026. This legacy operation is unavailable. Discover current organizations with list_organizations and use the current project/branch tools for platform management; data access uses native PostgreSQL. Legacy contract: List all workspaces accessible to the authenticated user. Useful for discovering available workspaces and their IDs.

delete_table

Delete Table

DEPRECATED — Xata Lite was permanently retired on February 28, 2026. This legacy operation is unavailable. Discover current organizations with list_organizations and use the current project/branch tools for platform management; data access uses native PostgreSQL. Legacy contract: Delete a table and all its records from a database branch. This action cannot be undone.

create_record

Create Record

DEPRECATED — Xata Lite was permanently retired on February 28, 2026. This legacy operation is unavailable. Discover current organizations with list_organizations and use the current project/branch tools for platform management; data access uses native PostgreSQL. Legacy contract: Insert a new record into a Xata table. Optionally specify a custom ID; otherwise, one is auto-generated. Supports bulk inserts by providing an array of records.

ask_ai

Ask AI

DEPRECATED — Xata Lite was permanently retired on February 28, 2026. This legacy operation is unavailable. Discover current organizations with list_organizations and use the current project/branch tools for platform management; data access uses native PostgreSQL. Legacy contract: Ask a natural language question about data in a Xata table and get an AI-generated answer. The AI searches relevant records and synthesizes a response. Supports follow-up questions using session IDs for conversational context.

query_records

Query Records

DEPRECATED — Xata Lite was permanently retired on February 28, 2026. This legacy operation is unavailable. Discover current organizations with list_organizations and use the current project/branch tools for platform management; data access uses native PostgreSQL. Legacy contract: Query and filter records from a Xata table. Supports filtering with operators, sorting, column selection, and cursor-based pagination. Use this to retrieve records matching specific criteria or to list all records in a table.

delete_database

Delete Database

DEPRECATED — Xata Lite was permanently retired on February 28, 2026. This legacy operation is unavailable. Discover current organizations with list_organizations and use the current project/branch tools for platform management; data access uses native PostgreSQL. Legacy contract: Permanently delete a database and all its branches, tables, and data. This action cannot be undone.

create_branch

Create Branch

DEPRECATED — Xata Lite was permanently retired on February 28, 2026. This legacy operation is unavailable. Discover current organizations with list_organizations and use the current project/branch tools for platform management; data access uses native PostgreSQL. Legacy contract: Create a new database branch using Xata's copy-on-write branching. The new branch shares storage with its parent and only stores differences. Dev branches can scale to zero when inactive.

add_table_column

Add Table Column

DEPRECATED — Xata Lite was permanently retired on February 28, 2026. This legacy operation is unavailable. Discover current organizations with list_organizations and use the current project/branch tools for platform management; data access uses native PostgreSQL. Legacy contract: Add a new column to an existing table. Supports all Xata column types including string, int, float, bool, text, email, datetime, vector, link, file, and json.

summarize_table

Summarize Table

DEPRECATED — Xata Lite was permanently retired on February 28, 2026. This legacy operation is unavailable. Discover current organizations with list_organizations and use the current project/branch tools for platform management; data access uses native PostgreSQL. Legacy contract: Run strongly consistent calculations (count, sum, average, min, max) on groups of data. Use this for real-time statistics and group-by operations without relying on the eventually consistent search store.

list_databases

List Databases

DEPRECATED — Xata Lite was permanently retired on February 28, 2026. This legacy operation is unavailable. Discover current organizations with list_organizations and use the current project/branch tools for platform management; data access uses native PostgreSQL. Legacy contract: List all databases in the configured workspace. Returns database names, regions, and metadata.

delete_branch

Delete Branch

DEPRECATED — Xata Lite was permanently retired on February 28, 2026. This legacy operation is unavailable. Discover current organizations with list_organizations and use the current project/branch tools for platform management; data access uses native PostgreSQL. Legacy contract: Delete a database branch. This removes the branch and any data unique to it.

execute_transaction

Execute Transaction

DEPRECATED — Xata Lite was permanently retired on February 28, 2026. This legacy operation is unavailable. Discover current organizations with list_organizations and use the current project/branch tools for platform management; data access uses native PostgreSQL. Legacy contract: Execute multiple record operations (insert, update, delete, get) as a single atomic transaction. All operations succeed together or fail together, ensuring data consistency.

get_record

Get Record

DEPRECATED — Xata Lite was permanently retired on February 28, 2026. This legacy operation is unavailable. Discover current organizations with list_organizations and use the current project/branch tools for platform management; data access uses native PostgreSQL. Legacy contract: Retrieve a single record by its ID from a Xata table. Optionally select specific columns to return.

get_table_schema

Get Table Schema

DEPRECATED — Xata Lite was permanently retired on February 28, 2026. This legacy operation is unavailable. Discover current organizations with list_organizations and use the current project/branch tools for platform management; data access uses native PostgreSQL. Legacy contract: Get the schema (column definitions) of a specific table. Useful for understanding the structure of a table before querying or inserting data.

search_records

Search Records

DEPRECATED — Xata Lite was permanently retired on February 28, 2026. This legacy operation is unavailable. Discover current organizations with list_organizations and use the current project/branch tools for platform management; data access uses native PostgreSQL. Legacy contract: Run a free-text search across a single table or the entire database branch. Powered by the Elasticsearch-based search engine with support for fuzziness, column boosting, and filters. Results are ranked by relevancy.

list_branches

List Branches

DEPRECATED — Xata Lite was permanently retired on February 28, 2026. This legacy operation is unavailable. Discover current organizations with list_organizations and use the current project/branch tools for platform management; data access uses native PostgreSQL. Legacy contract: List all branches of a Xata database. Returns branch names, creation times, and metadata.

list_projects

List Projects

List accessible projects in a current Xata organization. Requires project:read. Projects contain Postgres branches; they are distinct from retired Lite databases.

get_project

Get Project

Inspect a current Xata project and its scale-to-zero configuration. Requires project:read; discover its ID with list_projects.

create_project_branch

Create Project Branch

Provision a new Postgres branch inheriting data and configuration from an explicitly selected parent branch. This allocates billable compute/storage and can copy sensitive parent data. Requires branch:write. Provisioning is asynchronous; use get_project_branch to check readiness.

update_project_branch

Update Project Branch

Change a current Postgres branch name, description, hibernation or scale-to-zero settings. Hibernation changes availability; waking a branch allocates compute and can incur charges. Requires branch:write. Use get_project_branch to read back asynchronous state changes.

get_project_branch

Get Project Branch

Read current Postgres branch metadata, provisioning/health status and compute configuration without database credentials. Use this to check asynchronous creation or state changes. Requires branch:read.

list_organizations

List Organizations

List the current Xata organizations accessible to this API key. Requires org:read; these organization IDs are distinct from retired Xata Lite workspace IDs.

delete_project_branch

Delete Project Branch

Permanently delete a current Postgres branch and all its unique data. Requires branch:write. Verify the target with get_project_branch; deletion cannot be undone.

list_project_branches

List Project Branches

List current Postgres branches in a project. Requires branch:read. Returns metadata without database credentials; the API returns the complete accessible collection.

Connect Xata to your AI client

Every client uses the same Magic MCP URL, and so does any other MCP client. Add it once and sign in with SSO.

  1. Enable Xata in Metorial. In your Metorial portal, enable the Xata MCP server and sign in with the account that owns the data. Access stays governed by your team policies.
  2. Add a custom connector. Open Customize, then Connectors. Select Add, then Custom, then Web.
  3. Paste your Metorial MCP URL. Name it Metorial, paste your Magic MCP URL (<your-magic-mcp-url>) and continue.
  4. Sign in. Select Add and sign in to load Xata tools.

Run Xata through the Metorial gateway

One governed layer for every app your agents reach, not a separate connector per tool.

  • Give Xata and every other app to your whole team through one MCP gateway, behind your SSO.
  • Scope which teams and agents can use Xata tools with role-based access control, and trace every call.
  • Prefer to run it yourself? Metorial is open source and self-hostable.

More integrations teams use with Xata

Google Sheets

Create, read, and update spreadsheets and their cell data. Read and write values to individual cells, ranges, or multiple ranges using A1 notation or named ranges. Apply cell formatting including text styles, backgrounds, borders, number formats, and conditional formatting. Manage sheets (tabs) within a spreadsheet—add, delete, copy, rename, and reorder them. Create and manage embedded charts, pivot tables, filter views, data validation rules, protected ranges, named ranges, and merged cells. Perform batch operations to apply multiple updates atomically.

GitHub

Manage repositories, issues, and pull requests. Create and configure branches, star repositories, review code, and merge changes. Automate CI/CD workflows with GitHub Actions, manage workflow runs, secrets, and artifacts. Track issues with labels, milestones, and assignees. Search across code, repositories, issues, and users. Manage organizations, teams, and memberships. Create and manage projects, gists, packages, deployments, and environments. Access security alerts including code scanning, secret scanning, and Dependabot alerts. Read and write file contents in repositories. Manage webhooks, notifications, and codespaces.

Salesforce

Manage CRM data including Accounts, Contacts, Leads, Opportunities, Cases, and custom objects. Create, read, update, and delete records. Query data using SOQL and search across objects using SOSL. Perform bulk data operations for large-scale imports, exports, and migrations. Execute composite requests to batch multiple operations in a single API call. Access analytics, reports, and dashboards. Manage files and attachments associated with records. Interact with Chatter feeds, posts, and groups for social collaboration. Manage org metadata including custom objects, fields, layouts, and workflows. Query data using GraphQL for precise data retrieval across related objects.

Sharepoint

Manage SharePoint sites, document libraries, lists, and files. Create, read, update, and delete lists and list items with custom columns. Resolve site users to numeric Person/Group LookupId values. Upload, download, move, copy, and version files in document libraries. Search across sites, files, folders, lists, and list items using Microsoft Search. Manage permissions at site, list, and item levels with granular access control. Define and manage content types and site columns. Retrieve site properties and search for sites across Microsoft 365.

Airtable

Create, read, update, and delete records in Airtable bases and tables. Manage base schemas including creating tables and fields. Filter records using formulas, sort by fields, and scope queries to specific views. Upsert records to find, create, or update in a single call. Upload attachments to records, read and write record comments, list accessible bases, and receive real-time base change events through webhooks.

Google Drive

Upload, download, create, copy, move, rename, trash, and permanently delete files and folders in Google Drive. Search for files using complex queries filtering by name, MIME type, owner, modification date, labels, and other metadata. Share files and folders with specific users, groups, or domains with role-based permissions (owner, writer, commenter, reader). Manage shared drives and their members. Export Google Workspace files (Docs, Sheets, Slides) to standard formats like PDF, DOCX, and XLSX. Track file revision history and restore earlier versions. Create, read, update, and delete threaded comments and replies on files. Read label definitions and search files by label. Browse the Drive apps installed for your account. Store app-specific data in a hidden per-user folder.

Technical notes for Xata

Discover current Xata organizations and projects, inspect Postgres branch status, provision child branches from an explicit parent, update names and hibernation or scale-to-zero settings, and permanently delete branches. Historical Xata Lite operations remain deprecated after its retirement.

Frequently asked questions

Common questions about connecting Xata to AI agents with Metorial.

  1. How many tools does the Xata MCP server have?
    The Xata MCP server exposes 32 tools, including List Tables, Update Record, Aggregate Table. Each one is governed and traced through Metorial.
  2. Xata exposes tools your agents call on demand; it does not publish event triggers yet. Everything still runs through one governed MCP URL.
  3. Any MCP client, including VS Code, Windsurf, Zed, OpenCode and Grok. Each one reaches the Xata MCP server through the same Metorial URL.
  4. Use role-based access control to decide which teams, users, and agents can use Xata and which of its tools they can call.
  5. Yes. Metorial is open source, so you can run the Xata MCP server yourself or use the hosted gateway.

Connect Xata to production AI agents

See how Metorial gives your team governed access to Xata, with tracing and security controls built in.