Skip to main content Announcing Tool Policies: AI agent permissions down to the field Read the announcement
Live 178 Actions

PlanetScale MCP Server
for AI Agents

Connect your AI agent to StackOne's PlanetScale MCP server and give it 178 MCP tools out of the box. Auth, tool execution, and security all managed.

PlanetScale logo
PlanetScale MCP Server
Built by StackOne StackOne
DrataGPLocalyzeFlipMindtoolsScreenloop

Coverage

178 Agent Actions

Agents can read, write, delete and run operations in PlanetScale. Extend your agent's capabilities with custom actions.

Authentication

Agent Tool Authentication

Per-user OAuth in one call. Your PlanetScale MCP server gets session-scoped tokens with zero credentials stored on your infra.

Agent Auth →

Security

Agent Protection

Every PlanetScale tool response scanned for prompt injection in about 2.5 ms, with 0.94 F1 on tool-response attacks, all running on a CPU.

Prompt Injection Defense →

Performance

Max Agent Context. Min Cost.

Free up to 96% of your agent's context window to enhance reasoning and reduce cost, on every PlanetScale call.

Tools Discovery →

What is the PlanetScale MCP Server?

A PlanetScale MCP server lets AI agents read and write PlanetScale data through the Model Context Protocol, Anthropic's open standard for connecting LLMs to external tools. StackOne's PlanetScale MCP server ships with 178 pre-built actions, fully extensible via the Connector Builder, plus managed authentication, prompt injection defense, observability, and agent execution runtime. Connect it from MCP clients like Claude Desktop, Claude Code, Cursor, Goose, and VS Code, or from agent frameworks like OpenAI Agents SDK, LangChain, and Vercel AI SDK.

All PlanetScale MCP Tools

Every StackOne action for PlanetScale, ready for your agent. Read, write, delete and run operations, scoped to exactly what you need.

Backups

  • Create Backup

    Create an on-demand backup of a database branch.

  • List Backups

    List backups for a database branch.

  • Get Backup

    Get a single backup of a database branch.

  • Update Backup

    Update the deletion protection of a backup.

  • Delete Backup

    Delete a backup of a database branch.

Branch Change Requests

  • List Branch Change Requests

    List cluster change requests for a Postgres branch.

  • Get Branch Change Request

    Get a cluster change request for a Postgres branch.

  • Update Branch Change Request

    Create or update a change request for cluster size, replicas, storage, extensions or parameters.

Branch Resize Requests

  • List Branch Resize Requests

    List VTGate resize requests for a Vitess (MySQL) branch.

  • Get Branch Resize Request

    Get a VTGate resize request for a Vitess (MySQL) branch.

  • Update Branch Resize Request

    Create or update a VTGate resize request for a Vitess (MySQL) branch.

Branch Config Change Requests

  • Create Branch Config Change Request

    Create a draft change to the VTGate parameters of a Vitess (MySQL) branch.

  • List Branch Config Change Requests

    List config change requests for a Vitess (MySQL) branch and its keyspaces.

  • Get Branch Config Change Request

    Get a config change request for a Vitess (MySQL) branch.

Change Requests

  • List Change Requests

    List infrastructure change requests for a branch.

  • Get Change Request

    Get an infrastructure change request for a branch.

Switchovers

  • Create Switchover

    Move the primary of a Postgres branch to a replica (switchover).

  • List Switchovers

    List primary switchovers for a Postgres branch.

  • Get Switchover

    Get a primary switchover for a Postgres branch.

Branches

  • List Branches

    List the branches of a PlanetScale database.

  • List Branches

    List all branches within a databases

Branchs

  • Create Branch

    Create a new branch in a PlanetScale database.

  • Get Branch

    Retrieve a single branch of a PlanetScale database.

  • Get Branch

    Get details about a database branch

  • Update Branch

    Rename a branch or change its deletion protection.

  • Delete Branch

    Delete a branch of a PlanetScale database.

Branch Metrics

  • Get Branch Metrics

    Retrieve time-series metrics for a database branch.

  • Get Branch Metrics

    Get infrastructure metrics for a PlanetScale branch: CPU, memory, disk, replication lag, connections, PgBouncer, WAL, VTGate, and tablet health. The database kind selects the endpoint. Vitess uses tablet metrics; Postgres and Neki use branch metrics. view summary (the default) returns latest, min, avg, p95, and max for a small health set plus current disk and connection values, without raw samples. Use p95 rather than max to judge typical load. Pod memory utilization includes page cache, so the summary also returns RSS and cache bytes. Vitess shard_storage_usage is percent full, not bytes. Use view series or instant and pass metrics to drill in. Series disk is planetscale_volume_usage_percentages; the current value is planetscale_volume_usage_percentage. Postgres and Neki names look like planetscale_primary_pods_cpu_util_percentages. Vitess tablet names are short, like primary_cpu_usage and replication_lag. Use planetscale_get_insights for which queries are slow. Set include_points to return samples, at most 60 per series. Summary rolls per-pod series up to the busiest shard or role.

Branch Schemas

  • Get Branch Schema

    Retrieve the schema of a database branch.

  • Get Branch Schema

    Get the schema (tables, columns) for a database branch

Databases

  • Create Database

    Create a new PlanetScale database.

  • List Databases

    List the databases in a PlanetScale organization.

  • Get Database

    Retrieve a single PlanetScale database by name.

  • List Databases

    List the databases within an organization that the current authorization grants. This can be fewer than the organization's `database_count`, which counts every database in the organization.

  • Get Database

    Get details about a specific database

  • Delete Database

    Permanently delete a PlanetScale database.

Deploy Requests

  • Create Deploy Request

    Create a deploy request to merge schema changes from one branch into another.

  • List Deploy Requests

    List the deploy requests for a database.

  • Get Deploy Request

    Retrieve a single deploy request by its number.

Branch Query Errors

  • List Branch Query Errors

    List query errors on a branch grouped by error fingerprint.

  • Get Branch Query Error

    List the queries that raised a given error fingerprint.

Branch Query Tags

  • List Branch Query Tags

    List query tags and their values observed on a branch.

  • Get Branch Query Tag

    Retrieve a single query tag and its observed values.

Patterns Reports

  • Create Query Patterns Report

    Start generating a new query patterns report for a branch.

  • Get Query Patterns Report

    Download a finished query patterns report.

  • Delete Query Patterns Report

    Delete a query patterns report.

Insights Agent Runs

  • Create Insights Agent Run

    Start an Insights Agent run on a branch.

  • List Insights Agent Runs

    List Insights Agent runs for a branch.

  • Get Insights Agent Run

    Retrieve a single Insights Agent run by number.

  • List Insights Agent Runs

    List the Insights Agent runs on a branch. A run reviews slow queries or implements schema recommendations in the repository connected to the database, and opens a pull request when it changes code. Filter by `fingerprint` and `keyspace`, or by `schema_recommendation`, to find the runs for one query or recommendation.

  • Get Insights Agent Run

    Get an Insights Agent run by number: its state, outcome, summary, pull request, and the stages of its latest attempt. A run is pending, submitting, or running until it is completed, failed, cancelled, or skipped. Call this again to follow a run in progress.

Cancel Insights Agent Runs

  • Cancel Insights Agent Run

    Cancel an in-progress Insights Agent run.

  • Cancel Insights Agent Run

    Cancel an Insights Agent run that is pending, submitting, or running. A run that already finished cannot be cancelled.

Schema Recommendations

  • List Schema Recommendations

    List schema recommendations for a database.

  • Get Schema Recommendation

    Retrieve a single schema recommendation by number.

  • List Schema Recommendations

    List all schema recommendations for a database. Each schema recommendation is based on production data from the users database. If you have access to the code base generating the queries, evaluate the code in the context of the recommendation to determine the best steps forward for the specific application. Use schema recommendations as a data point for improvement, not a directive. Suggestions include adding indexes, removing redundant indexes, preventing primary key exhaustion, unused tables and other general performance improvements. See https://planetscale.com/docs/postgres/monitoring/schema-recommendations for a full list as well as warnings of possible risks when making schema changes. Set `state` to "open" to retrieve only open recommendations.

Keyspaces

  • Create Keyspace

    Create a new keyspace on a PlanetScale Vitess database branch.

  • List Keyspaces

    List the keyspaces of a PlanetScale Vitess database branch.

  • Get Keyspace

    Retrieve a single keyspace of a PlanetScale Vitess database branch.

  • Update Keyspace

    Configure the settings of a Vitess keyspace.

  • Delete Keyspace

    Delete a keyspace from a PlanetScale Vitess database branch.

Keyspace VSchemas

  • Get Keyspace VSchema

    Retrieve the VSchema of a Vitess keyspace.

  • Update Keyspace VSchema

    Replace the VSchema of a Vitess keyspace.

Keyspace Resize Requests

  • List Keyspace Resize Requests

    List the resize requests of a Vitess keyspace.

  • Get Keyspace Resize Request

    Retrieve a single resize request of a Vitess keyspace.

  • Update Keyspace Resize Request

    Create or update the pending resize request of a Vitess keyspace.

Keyspace Config Change Requests

  • Create Keyspace Config Change Request

    Create a draft change to the mysqld or vttablet parameters of a Vitess keyspace.

  • List Keyspace Config Change Requests

    List the configuration change requests of a Vitess keyspace.

  • Get Keyspace Config Change Request

    Retrieve a single configuration change request of a Vitess keyspace.

Insights Agent Schedules

  • Get Insights Agent Schedules

    Get the Insights Agent schedules on a branch, one per run type: whether each is enabled, how often it runs, and when it runs next. Change one with `planetscale_update_insights_agent_schedule`.

  • Update Insights Agent Schedule

    Turn an Insights Agent schedule on or off, or change when it runs. Each branch has one schedule per run type: `slow_query` runs review the queries using the most database time, and `schema_recommendation` runs implement open schema recommendations. Every scheduled run is billed to the organization and can open a pull request, so turning a schedule on or changing its frequency needs the user's approval and `confirm: true`. Read the current schedules with `planetscale_get_insights_agent_schedules`.

Organizations

  • List Organizations

    List the PlanetScale organizations your account belongs to. This can include organizations the current authorization does not grant, and tools called against those return a permission error.

  • Get Organization

    Get details about a specific organization

  • List Organizations

    List the PlanetScale organizations the current token can access.

  • Get Organization

    Retrieve a single PlanetScale organization by name.

MoveTables Workflows

  • Create MoveTables Workflow

    Create a MoveTables workflow that copies tables between keyspaces of a Vitess database branch.

  • List MoveTables Workflows

    List the MoveTables workflows on a PlanetScale Vitess database branch.

  • Get MoveTables Workflow

    Retrieve the details of a MoveTables workflow on a Vitess database branch.

Passwords

  • Create Password

    Create a database connection password (credential) for a branch.

  • List Passwords

    List connection passwords for a database branch.

  • Get Password

    Get a single connection password of a database branch.

  • Update Password

    Update the name or CIDR allow-list of a password.

  • Delete Password

    Delete a database connection password.

Roles

  • Create Role

    Create a new Postgres role (connection credentials) on a database branch.

  • List Roles

    List the Postgres roles (connection credentials) on a database branch.

  • Get Role

    Retrieve a Postgres role and its connection details.

  • Update Role

    Update a Postgres role's name or query-safety settings.

  • Delete Role

    Delete a Postgres role and revoke its credentials.

Other (90)

  • List Branch Vitess Parameters

    List the Vitess parameters of a MySQL branch.

  • Get Vtctld Operation

    Retrieve the status of an asynchronous vtctld operation on a MySQL branch.

  • List Database Regions

    List the regions a PlanetScale database can use for branches and read-only regions.

  • Get Deployment

    Retrieve the deployment for a deploy request.

  • List Deploy Operations

    List the deploy operations for a deploy request.

  • List Deploy Request Reviews

    List the reviews left on a deploy request.

  • Get Deploy Queue

    Retrieve the deploy queue for a database.

  • List Branch Queries

    List Query Insights statistics for each query pattern on a branch.

  • Get Query Statistics

    Retrieve time-bucketed statistics for one query pattern.

  • Get Query Summary

    Retrieve a summary of statistics for one query pattern.

  • Get Branch Query

    Retrieve a single recorded query execution by ID.

  • List Branch Query Tag Summaries

    List query statistics grouped by query tag values.

  • List Branch Anomalies

    List performance anomalies detected on a branch.

  • Get Branch Anomaly

    Retrieve a single branch anomaly by ID.

  • List Generated Query Patterns Reports

    List query patterns reports generated for a branch.

  • Get Query Patterns Report Status

    Retrieve the status of a query patterns report.

  • Get Keyspace Rollout Status

    Retrieve the infrastructure rollout status of a Vitess keyspace.

  • Get Branch Backups

    Show how a PlanetScale branch is backed up, for Vitess/MySQL, Postgres, and Neki: the backup policies that apply to it (default or custom, frequency, schedule, retention, last and next run), its most recent backups (state, started, completed, expiry, size, protected from deletion, and the policy that took it), and when the last successful backup completed. Policies are set per database and apply by target, so a production branch gets the production policies. Read-only: it does not create, delete, protect, or restore backups, or change policies. Point-in-time recovery, encryption at rest, backup region, and restore steps are not in the API; the response links the docs page for those.

  • Get Query Performance Insights

    Get query performance insights for a PlanetScale database branch. By default, aggregates the top queries across curated metrics (slowest, most time-consuming, most rows read, most inefficient, most rows affected, and highest egress) for a comprehensive view. Can also fetch queries sorted by a single metric. Supports filtering by tablet type (primary/replica). To drill down into a specific query pattern, first call without fingerprint to discover queries (each result includes a `fingerprint` and `keyspace`), then call again with both `fingerprint` and `keyspace` from that result to get the aggregated summary stats and individual executions. Note: egress_bytes and ingress_bytes values are raw bytes; the PlanetScale UI displays these as binary megabytes (1 MB = 2^20 bytes). Durations (sum_total_duration_millis) are in milliseconds. cpuTime is available for Postgres and Neki branches only; maxEgressBytes and ingressBytes/ingressBytesPerQuery/maxIngressBytes are available for MySQL/Vitess branches only. Default time window is the last 24 hours; from/to reaches back up to 365 days, but a range wider than 25 hours must be hour-aligned -- see the from/to descriptions. The individual executions in fingerprint mode are the exception: they are always limited to the last 25 hours, so a wider fingerprint call returns a full-range `summary` next to executions from the last 24 hours, and the response says so.

  • Get Postgres Server Logs

    Fetch server logs for a PlanetScale Postgres or Neki database branch (not available for Vitess/MySQL databases). Returns recent log entries sorted newest first. Supports filtering by log level, time range, server role, and pod name, plus an optional raw LogsQL query for advanced filtering (e.g. word matching, field filters, and pipe stages like 'error | stats count()'). Default time window is the last hour.

  • List Query Error Patterns

    List failing queries for a PlanetScale database branch, aggregated by error fingerprint. Each pattern reports the error message, how many times it occurred, when it was last seen, and total/average duration. Use `planetscale_list_query_error_executions` with an `error_fingerprint` from these results to see the individual failed executions behind a pattern. Data comes from PlanetScale Insights. Default time window is the last 24 hours. These results describe individual query executions, so unlike `planetscale_get_insights` and the query tag tools the window is capped at 25 hours: a wider from/to falls back to the default window server-side.

  • List Failed Query Executions

    List the individual captured query executions that failed with a given error fingerprint on a PlanetScale database branch. Each execution includes the normalized SQL, tables, keyspace, user, row counts, duration, error message, and query tags. Get an `error_fingerprint` from `planetscale_list_query_error_patterns` first. This endpoint cannot filter by tablet type, so executions from all tablet types are returned even when the fingerprint came from a tablet-filtered pattern list. Data comes from PlanetScale Insights. Default time window is the last 24 hours. These results describe individual query executions, so unlike `planetscale_get_insights` and the query tag tools the window is capped at 25 hours: a wider from/to falls back to the default window server-side.

  • List Query Tags

    List the query tags seen on a PlanetScale database branch's queries, with their values and query counts. Query tags are SQLCommenter-style annotations an application attaches in SQL comments (e.g. 'app', 'controller', 'route'), plus dimensions Insights derives from the connection itself (e.g. 'username', 'application_name'). Start here: the `id` values this returns are the only way to reach `planetscale_get_query_tag` and `planetscale_list_query_tag_summaries`, which is where query load actually gets attributed to a tag value. Each `id` keeps a one-character origin prefix -- 'S' for a tag the application submitted in a SQL comment (source: 'sql'), 'B' for one Insights captured itself (source: 'system') -- and `name` is the same id with the prefix stripped. Each value entry carries a `kind`: 'literal' is a real recorded value; 'overflow' is the synthetic 'Other' bucket aggregating values ranked beyond `values_limit`; 'collapsed' is the synthetic 'Collapsed' bucket counting queries where Insights had stopped recording this tag's values because it saw too many distinct ones, so those values are unrecoverable rather than zero. Data comes from PlanetScale Insights. Default time window is the last 24 hours; from/to reaches back up to 365 days, but a range wider than 25 hours must be hour-aligned -- see the from/to descriptions.

  • Get Query Tag Details

    Fetch one query tag on a PlanetScale database branch, with its values and their query counts. Pass the `id` from `planetscale_list_query_tags`, prefix included -- an unprefixed or unknown id returns a not-found error. Value entries carry the same `kind` ('literal', 'overflow', 'collapsed') as the listing. Use this to re-read a single tag's values under different filters -- a narrower time window, a specific fingerprint or keyspace, or `literal_values_only` -- without listing every tag on the branch again. Data comes from PlanetScale Insights. Default time window is the last 24 hours; from/to reaches back up to 365 days, but a range wider than 25 hours must be hour-aligned -- see the from/to descriptions.

  • List Cluster Sizes

    List available PlanetScale cluster sizes (SKUs) for an organization and database engine, including Neki-specific PS-*_NEKI sizes. PS-* sizes use autoscaling network-backed storage; M-* sizes use super fast NVMe storage drives. The rate field is for an HA cluster with 2 replicas; replica_rate is for a single instance. Single instance databases are only available for Postgres. Metal instances must be HA.

  • List Live Connections

    List live connections on a PlanetScale branch for Vitess/MySQL, Postgres, and Neki. Read-only: it does not cancel queries or terminate connections. Do not poll faster than every few seconds. The list is cached for 1 second and returns 503 while that lock is held; retry once after about 1 second. Vitess reads one primary tablet's processlist, not replicas or vtgate sessions, and those rows have no transaction start. A Vitess branch with more than one keyspace, or a sharded keyspace, returns needs_target and the available keyspaces or shards; call again with keyspace and shard. Postgres and Neki reject keyspace and shard. include_query_text defaults to false so raw SQL stays out of the response; when true, query text is truncated to 500 characters. The summary counts the filtered rows by state, user, and application, and reports the longest query, the oldest transaction, and how many sessions are blocked. rows keeps the longest matches, at most limit (default 50, max 200).

  • Search PlanetScale Documentation

    Search across PlanetScale documentation and blog posts to find relevant information, code examples, API references, and guides. Use this tool when you need to answer questions about PlanetScale, find specific documentation, understand how features work, or locate implementation details. The search returns contextual content with titles and direct links to documentation pages and /blog posts.

  • Get Billing Card Setup Status

    Get a Stripe Checkout payment method setup started by planetscale_update_payment_method. Use the setup_id returned by that tool; it is not a payment method ID. This is a one-time check and does not wait. If pending, give checkout_url to the customer and call this tool again only after they finish Checkout. If completed, this tool also returns the saved card brand, last four digits, expiration, and cardholder name as confirmation. Failed or expired setups cannot be resumed. Requires full access to the organization's payment method to inspect the setup and return the saved card.

  • List Regions

    List the regions available for an organization.

  • List Invoices

    List all invoices for an organization.

  • Get Invoice Line Items

    Get all line items for an invoice. See prorated costs broken down by database branch. Including storage, egress bandwidth and development branches.

  • Get Billing Payment Method

    Get the current payment method for an organization

  • Get MoveTables Workflow Status

    Retrieve the copy progress and traffic state of a MoveTables workflow.

  • List Admin Size SKUs

    List the admin node sizes available for a Neki (PlanetScale Postgres) branch.

  • List Cluster Size SKUs

    List the cluster sizes available to a PlanetScale organization.

  • List Postgres Versions

    List the published PostgreSQL versions available for an engine.

  • List Public Regions

    List all public PlanetScale regions.

  • List Regions For Organization

    List the regions available to a PlanetScale organization.

  • Get Current User

    Retrieve the user associated with the current token.

  • Get Default Role

    Retrieve the default postgres role for a branch.

  • Update Branch Cluster Config

    Change the cluster size of a branch.

  • Update Safe Migrations

    Set safe migrations on or off for a branch.

  • Update Database Settings

    Update the settings of a PlanetScale database.

  • Update Auto Apply

    Enable or disable auto-apply for a deploy request.

  • Update Auto Delete Branch

    Enable or disable auto-delete of the source branch for a deploy request.

  • Update Aggressive Cutover

    Enable or disable aggressive cutover for a deploy request.

  • Update Billing Email

    Update the email address PlanetScale sends invoices and billing notices to for an organization. Use when a customer asks to change, set, or update their billing email. This does not change the card on file; call planetscale_update_payment_method to start a Stripe Checkout session for that. Requires the Update billing email permission. The current billing email is on planetscale_get_organization.

  • Cancel Branch Change Request

    Cancel the pending change or resize request of a branch.

  • Submit Branch Config Change Requests

    Submit draft config change requests for a branch and its keyspaces.

  • Cancel Branch Config Change Request

    Cancel a draft or pending branch config change request.

  • Cancel Change Request

    Cancel an infrastructure change request for a branch.

  • Lint Branch Schema

    Run schema lint checks against a database branch.

  • Enable Safe Migrations

    Enable safe migrations on a branch.

  • Disable Safe Migrations

    Disable safe migrations on a branch.

  • Promote Branch

    Promote a development branch to production.

  • Demote Branch

    Demote a production branch to development.

  • Run Branch Maintenance

    Start maintenance on a PostgreSQL branch.

  • Check Deploy Request Storage

    Check whether the target branch has enough storage to deploy a deploy request.

  • Review Deploy Request

    Approve or comment on a deploy request.

  • Queue Deploy Request

    Queue a deploy request for deployment.

  • Cancel Queued Deploy Request

    Cancel a queued or in-progress deploy request deployment.

  • Complete Gated Deploy Request

    Apply the staged schema changes of a gated deploy request.

  • Force Cutover Deploy Request

    Enable force cutover for a deploy request.

  • Complete Errored Deploy

    Mark an errored deploy request deployment as complete.

  • Complete Revert

    Revert the schema changes of a deployed deploy request.

  • Skip Revert Period

    Skip the revert period for a deployed deploy request.

  • Close Deploy Request

    Close an open deploy request without deploying it.

  • Dismiss Schema Recommendation

    Dismiss a schema recommendation.

  • Cancel Keyspace Resize Request

    Cancel the pending resize request of a Vitess keyspace.

  • Cancel Keyspace Config Change Request

    Cancel a draft or pending configuration change request of a Vitess keyspace.

  • Summarize Query Tag Performance

    Break query statistics on a PlanetScale database branch down by query tag value -- total time, latency, rows read, and errors per application, route, job, or user. This is the tool that answers 'which part of my app is causing this load', as opposed to `planetscale_get_insights`, which answers 'which query'. Pass one or more tag `id` values from `planetscale_list_query_tags` in `tags`; several ids group by the combination of their values. Each row's `dimensions` maps the grouped tag ids to that row's values. Rows are sorted descending by `sort_by` (default 'totalTime'). A curated set of metrics is requested by default; `fields` widens or narrows it, and the response echoes the effective set as a map from each requested name to the key it is serialized under, since the two differ (`count` arrives as `query_count`). Metrics outside that set are stripped, so a 0 on a returned metric is a real measurement rather than an unrequested field. The `sort_by` metric is always included, whether or not it was asked for. `dimension_counts` reports how many matched queries had the grouping tag's value collapsed (`collapsed_count`) out of the total (`total_count`) -- those queries carry the tag, but their value was never recorded and cannot be recovered. Data comes from PlanetScale Insights. Default time window is the last 24 hours; from/to reaches back up to 365 days, but a range wider than 25 hours must be hour-aligned -- see the from/to descriptions.

  • Run A Read-only SQL Query

    Execute a read-only SQL query against a PlanetScale database. Write operations are rejected by the database role. This tool creates short-lived credentials and executes the query securely. Queries have a maximum execution time of 50 seconds — if a query exceeds this limit it will be cancelled, so ensure queries are optimized. For Postgres and Neki, this tool uses an ephemeral pg_read_all_data role that does not bypass row-level security (RLS); zero-row or zero-count results on RLS-protected tables may mean rows are hidden by policy, and the response may include warnings when that risk is detected. For Postgres and Neki only: optionally specify postgres_database_name when the user wants to query a non-default database.

  • Run A Write SQL Query

    Execute a write SQL query (INSERT, UPDATE, DELETE, or DDL) against a PlanetScale database. This tool creates short-lived credentials and executes the query securely. Queries have a maximum execution time of 50 seconds — if a query exceeds this limit it will be cancelled, so ensure queries are optimized. TRUNCATE is blocked. DELETE and UPDATE without WHERE clause are blocked. For Postgres and Neki only: use postgres_database_name when the user has created additional databases in the same cluster and wants to run the query against a non-default database. IMPORTANT: DELETE queries and DDL statements (CREATE, DROP, ALTER, RENAME) require human confirmation - you MUST ask the user for explicit approval before setting confirm_destructive: true. Never set confirm_destructive without first showing the user the exact query and getting their explicit 'yes' or approval.

  • Start Billing Card Setup

    Start a secure Stripe Checkout session to add or replace an organization's billing card. Use when a customer asks to add, set, replace, or update their PlanetScale payment method. This tool never collects card details: return checkout_url to the customer and let them complete Stripe Checkout in their browser. It returns a setup_id; do not call this tool again while that setup is pending. After the customer finishes, call planetscale_get_payment_method_setup with the same organization and setup_id. Requires full access to the organization's payment method. To change the invoice email rather than the card, call planetscale_update_billing_email.

  • Start Insights Agent Run

    Start an Insights Agent run on a branch. The agent reviews up to 5 slow queries from `planetscale_get_insights`, or implements up to 5 open schema recommendations from `planetscale_list_schema_recommendations`, in the repository connected to the database. When it changes code it opens a pull request. Each run is billed to the organization, so get the user's approval and pass `confirm: true`. The database needs a connected repository, which the user sets up in the PlanetScale app under Database > Settings > Integrations. Follow the run with `planetscale_get_insights_agent_run`.

  • Submit Insights Agent Run Feedback

    Record whether a completed Insights Agent run was useful, when the user says so. Only rate a run when the user expresses an opinion about it; never rate one on your own judgement. A `not_useful` rating can carry a `reason` (wrong diagnosis, fix wouldn’t work, too risky, already known, doesn’t fit, or other) and either rating a free-text `note`. Rating again replaces the earlier rating. Only completed runs take feedback.

  • Submit Feedback

    Report a concrete problem or friction with PlanetScale or these tools for PlanetScale to review: an incorrect result, a confusing error, a documentation gap, or a missing tool. Positive feedback about what works well is welcome too. PlanetScale engineers read these directly, so keep each field brief and plain. Write in neutral, professional language, and describe the user's frustration rather than quoting it. Returns a receipt only; no follow-up will reach this session. Submit only real observations, one per call. Each submission is sent with the user's PlanetScale user ID and email address. Never include credentials, secrets, query results, or other data from the user's databases.

  • Ask A Question

    Record a question about PlanetScale you could not answer with planetscale_search_documentation or the other tools, so PlanetScale can fill the gap. This is not a support channel: no answer will come back now or later in this session, so do not wait for one or ask again. Continue with the documentation and your best judgment. Submit only real unanswered questions. Write in neutral, professional language, and describe the user's frustration rather than quoting it. Each submission is sent with the user's PlanetScale user ID and email address. Never include credentials, secrets, query results, or other data from the user's databases.

  • Start List MoveTables Workflows

    Start asynchronous listing of the MoveTables workflows on a Vitess database branch.

  • Start MoveTables Workflow

    Start or resume a stopped MoveTables workflow.

  • Stop MoveTables Workflow

    Pause a running MoveTables workflow.

  • Switch Traffic MoveTables Workflow

    Switch query traffic for a MoveTables workflow to the target keyspace.

  • Reverse Traffic MoveTables Workflow

    Switch query traffic for a MoveTables workflow back to the source keyspace.

  • Complete MoveTables Workflow

    Finish a MoveTables workflow and clean up after all traffic is switched.

  • Cancel MoveTables Workflow

    Cancel a MoveTables workflow that is still in progress.

  • Renew Password

    Renew an expiring password to extend its TTL.

  • Renew Role

    Renew the expiration of a Postgres role.

  • Reset Role Password

    Reset a Postgres role's password.

  • Reset Default Role

    Reset the password of the branch's default postgres role.

  • Reassign Role Objects

    Reassign the database objects owned by a role to another role.

Set Up Your PlanetScale MCP Server in Minutes

One endpoint. Any framework. Your agent is talking to PlanetScale in under 10 lines of code.

Agent Frameworks

Claude Desktop
{
  "mcpServers": {
    "stackone": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote@latest",
        "https://api.stackone.com/mcp?x-account-id=<account_id>",
        "--header",
        "Authorization: Basic <YOUR_BASE64_TOKEN>"
      ]
    }
  }
}

Check More Data Infrastructure MCP Servers

Datadog

560+ actions

Grafana

239+ actions

ClickHouse

172+ actions

Fivetran

172+ actions

Better Stack

145+ actions

Supabase

138+ actions

New Relic

135+ actions

FAQ

PlanetScale MCP Server FAQ

Ready to put your agents to work?