MySQL-compatible serverless database
## PlanetScale MCP Server: Serverless MySQL Platform The **PlanetScale MCP Server** integrates PlanetScale into Google Antigravity, enabling serverless MySQL operations with branching, non-blocking schema changes, and instant scaling directly from your development environment. ### Why PlanetScale MCP? - **Serverless**: Scale automatically without management - **Branching**: Git-like database branching for development - **Non-Blocking DDL**: Schema changes without downtime - **Vitess Powered**: Built on Vitess sharding technology - **Global**: Multi-region deployment ### Key Features #### 1. SQL Queries ```python # Execute query result = await mcp.query(""" SELECT id, name, email, created_at FROM users WHERE status = ? ORDER BY created_at DESC LIMIT 50 """, params=["active"]) for row in result["rows"]: print(f"User: {row['name']} ({row['email']})") ``` #### 2. Branch Operations ```python # Create branch branch = await mcp.create_branch( database="myapp", name="feature-auth", parent_branch="main" ) # List branches branches = await mcp.list_branches(database="myapp") for b in branches: print(f"Branch: {b['name']} ({b['production']})") # Create deploy request deploy = await mcp.create_deploy_request( database="myapp", branch="feature-auth", into_branch="main" ) # Delete branch await mcp.delete_branch(database="myapp", branch="feature-auth") ``` #### 3. Schema Management ```python # Get schema schema = await mcp.get_schema( database="myapp", branch="main" ) # Compare branches diff = await mcp.diff_branches( database="myapp", base="main", head="feature-auth" ) for change in diff["schema_changes"]: print(f"Change: {change['type']} - {change['name']}") ``` #### 4. Database Operations ```python # Get database info db = await mcp.get_database(name="myapp") print(f"Database: {db['name']} - Region: {db['region']}") # Get connection strings connections = await mcp.get_connections( database="myapp", branch="main" ) print(f"Host: {connections['host']}") ``` ### Configuration ```json { "mcpServers": { "planetscale": { "command": "npx", "args": ["-y", "@anthropic/mcp-planetscale"], "env": { "PLANETSCALE_ORG": "your-org", "PLANETSCALE_TOKEN": "your-api-token", "DATABASE_URL": "mysql://user:pass@host/db" } } } } ``` ### Use Cases **Feature Development**: Create branches for feature development. **Zero-Downtime Migrations**: Schema changes without locks. **CI/CD**: Integrate database changes with pipelines. **Scaling**: Handle traffic spikes automatically. The PlanetScale MCP enables serverless MySQL within your development environment.
{
"mcpServers": {
"planetscale": {
"mcpServers": {
"planetscale": {
"env": {
"DATABASE_URL": "mysql://user:pass@host/db?sslaccept=strict"
},
"args": [
"-y",
"planetscale-mcp-server"
],
"command": "npx"
}
}
}
}
}