PlanetScale MCP by usefulapi
Read databases, branches and schemas; create branches and deploy requests in PlanetScale.
我该使用它吗
质量与安全性
发现(4)
- LOW在 planetscale_list_public_regions 中
- LOW在 planetscale_list_branch_backups 中
- LOW在 planetscale_list_deploy_requests 中
- LOW在 planetscale_create_deploy_request 中
基于对工具定义和协议合规性的自动分析。
上下文开销
这是每次将服务器的工具加载到模型上下文窗口时所消耗的大致 token 数。数值越高,可用于其他任务的注意力就越少。
安装
一键安装
将以下内容添加到你的 `claude_desktop_config.json` 文件中:
{
"mcpServers": {
"planetscale": {
"url": "https://planetscale.usefulapi.io/mcp"
}
}
}远程端点
https://planetscale.usefulapi.io/mcpstreamable-http它能做什么
工具清单
工具(13)
🟢planetscale_list_organizations(page, per_page)
List the organizations the service token can see. Start here to find the organization name. GET /v1/organizations.
输入模式
{
"type": "object",
"properties": {
"page": {
"description": "Page number (default 1).",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"per_page": {
"description": "Results per page (default 25).",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢planetscale_get_organization(organization)
Get one organization: name, plan and settings. GET /v1/organizations/{organization}.
输入模式
{
"type": "object",
"properties": {
"organization": {
"type": "string",
"minLength": 1,
"description": "Organization name (the slug in the PlanetScale URL)."
}
},
"required": [
"organization"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢planetscale_list_public_regions(page, per_page)
List the PlanetScale regions and their cloud providers. Public endpoint: GET /v1/regions.
输入模式
{
"type": "object",
"properties": {
"page": {
"description": "Page number (default 1).",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"per_page": {
"description": "Results per page (default 25).",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢planetscale_list_databases(organization, q, kind, page, per_page)
List the databases in an organization, with their state and kind (Postgres or MySQL). GET /v1/organizations/{organization}/databases.
输入模式
{
"type": "object",
"properties": {
"organization": {
"type": "string",
"minLength": 1,
"description": "Organization name (the slug in the PlanetScale URL)."
},
"q": {
"description": "Filter by database name.",
"type": "string"
},
"kind": {
"description": "Filter by database kind, for example postgresql or vitess.",
"type": "string"
},
"page": {
"description": "Page number (default 1).",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"per_page": {
"description": "Results per page (default 25).",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
}
},
"required": [
"organization"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢planetscale_get_database(organization, database)
Get one database: state, default branch, regions and settings. GET /v1/organizations/{organization}/databases/{database}.
输入模式
{
"type": "object",
"properties": {
"organization": {
"type": "string",
"minLength": 1,
"description": "Organization name (the slug in the PlanetScale URL)."
},
"database": {
"type": "string",
"minLength": 1,
"description": "Database name."
}
},
"required": [
"organization",
"database"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢planetscale_list_branches(organization, database, q, production, safe_migrations, ...)
List the branches of a database, with ready state and whether each is a production branch. GET .../databases/{database}/branches.
输入模式
{
"type": "object",
"properties": {
"organization": {
"type": "string",
"minLength": 1,
"description": "Organization name (the slug in the PlanetScale URL)."
},
"database": {
"type": "string",
"minLength": 1,
"description": "Database name."
},
"q": {
"description": "Filter by branch name.",
"type": "string"
},
"production": {
"description": "Only production (true) or only development (false) branches.",
"type": "boolean"
},
"safe_migrations": {
"description": "Filter by safe migrations setting.",
"type": "boolean"
},
"order": {
"description": "Sort order, for example created_at.",
"type": "string"
},
"page": {
"description": "Page number (default 1).",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"per_page": {
"description": "Results per page (default 25).",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
}
},
"required": [
"organization",
"database"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢planetscale_get_branch(organization, database, branch)
Get one branch: ready state, parent branch, region and access host. GET .../branches/{branch}.
输入模式
{
"type": "object",
"properties": {
"organization": {
"type": "string",
"minLength": 1,
"description": "Organization name (the slug in the PlanetScale URL)."
},
"database": {
"type": "string",
"minLength": 1,
"description": "Database name."
},
"branch": {
"type": "string",
"minLength": 1,
"description": "Branch name, for example main."
}
},
"required": [
"organization",
"database",
"branch"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢planetscale_get_branch_schema(organization, database, branch, keyspace, namespace)
Get the CREATE statements (schema only, no table data) of a branch. GET .../branches/{branch}/schema.
输入模式
{
"type": "object",
"properties": {
"organization": {
"type": "string",
"minLength": 1,
"description": "Organization name (the slug in the PlanetScale URL)."
},
"database": {
"type": "string",
"minLength": 1,
"description": "Database name."
},
"branch": {
"type": "string",
"minLength": 1,
"description": "Branch name, for example main."
},
"keyspace": {
"description": "Keyspace name (Vitess databases only).",
"type": "string"
},
"namespace": {
"description": "Namespace name (Postgres databases only).",
"type": "string"
}
},
"required": [
"organization",
"database",
"branch"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢planetscale_list_branch_backups(organization, database, branch, state, from, ...)
List the backups of a branch, with state and time. GET .../branches/{branch}/backups.
输入模式
{
"type": "object",
"properties": {
"organization": {
"type": "string",
"minLength": 1,
"description": "Organization name (the slug in the PlanetScale URL)."
},
"database": {
"type": "string",
"minLength": 1,
"description": "Database name."
},
"branch": {
"type": "string",
"minLength": 1,
"description": "Branch name, for example main."
},
"state": {
"description": "Filter by backup state, for example success.",
"type": "string"
},
"from": {
"description": "Only backups created after this ISO 8601 time.",
"type": "string"
},
"to": {
"description": "Only backups created before this ISO 8601 time.",
"type": "string"
},
"page": {
"description": "Page number (default 1).",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"per_page": {
"description": "Results per page (default 25).",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
}
},
"required": [
"organization",
"database",
"branch"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢planetscale_list_deploy_requests(organization, database, state, branch, into_branch, ...)
List schema change deploy requests of a database, with state and branches. GET .../deploy-requests.
输入模式
{
"type": "object",
"properties": {
"organization": {
"type": "string",
"minLength": 1,
"description": "Organization name (the slug in the PlanetScale URL)."
},
"database": {
"type": "string",
"minLength": 1,
"description": "Database name."
},
"state": {
"description": "Filter by state, for example open, closed or merged.",
"type": "string"
},
"branch": {
"description": "Filter by source branch.",
"type": "string"
},
"into_branch": {
"description": "Filter by target branch.",
"type": "string"
},
"page": {
"description": "Page number (default 1).",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
},
"per_page": {
"description": "Results per page (default 25).",
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991
}
},
"required": [
"organization",
"database"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢planetscale_get_deploy_request(organization, database, number)
Get one deploy request by its number: state, diff summary and deployment status. GET .../deploy-requests/{number}.
输入模式
{
"type": "object",
"properties": {
"organization": {
"type": "string",
"minLength": 1,
"description": "Organization name (the slug in the PlanetScale URL)."
},
"database": {
"type": "string",
"minLength": 1,
"description": "Database name."
},
"number": {
"type": "integer",
"exclusiveMinimum": 0,
"maximum": 9007199254740991,
"description": "Deploy request number (from planetscale_list_deploy_requests)."
}
},
"required": [
"organization",
"database",
"number"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🔴planetscale_create_branch(organization, database, name, parent_branch)
Create a development branch from a parent branch (default main). Creates billable resources; it does not change production. POST .../branches.
输入模式
{
"type": "object",
"properties": {
"organization": {
"type": "string",
"minLength": 1,
"description": "Organization name (the slug in the PlanetScale URL)."
},
"database": {
"type": "string",
"minLength": 1,
"description": "Database name."
},
"name": {
"type": "string",
"minLength": 1,
"description": "Name of the new branch."
},
"parent_branch": {
"description": "Parent branch to copy the schema from (default main).",
"type": "string"
}
},
"required": [
"organization",
"database",
"name"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🔴planetscale_create_deploy_request(organization, database, branch, into_branch, notes)
Open a deploy request that merges schema changes from a branch into another branch. Opening it does not deploy; a person must review and deploy it. POST .../deploy-requests.
输入模式
{
"type": "object",
"properties": {
"organization": {
"type": "string",
"minLength": 1,
"description": "Organization name (the slug in the PlanetScale URL)."
},
"database": {
"type": "string",
"minLength": 1,
"description": "Database name."
},
"branch": {
"type": "string",
"minLength": 1,
"description": "Source branch with the schema changes."
},
"into_branch": {
"type": "string",
"minLength": 1,
"description": "Target branch, usually main."
},
"notes": {
"description": "Notes shown on the deploy request.",
"type": "string"
}
},
"required": [
"organization",
"database",
"branch",
"into_branch"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}社区
证据