@backwrite/mcp
v0.1.1
Published
Official Model Context Protocol (MCP) server for Backwrite — connect Lovable, Cursor, Windsurf, and Claude Code directly to your programmable backend infrastructure
Maintainers
Readme
@backwrite/mcp
Official Model Context Protocol (MCP) server for Backwrite — the programmable backend infrastructure platform.
Connect AI tools such as Lovable, Cursor, Windsurf, and Claude Code directly to your Backwrite database to create and inspect tables, run migrations, enforce RLS policies, generate TypeScript types, and introspect database schemas autonomously.
Quick Start
1. Run with npx (zero install)
npx @backwrite/mcp2. Configure in Cursor (~/.cursor/mcp.json or project .cursor/mcp.json)
{
"mcpServers": {
"backwrite": {
"command": "npx",
"args": ["-y", "@backwrite/mcp"],
"env": {
"BACKWRITE_URL": "https://api.backwrite.dev",
"BACKWRITE_SERVICE_KEY": "bwk_service_...",
"BACKWRITE_PROJECT_ID": "bw_proj_...",
"BACKWRITE_BRANCH_ID": "br_..."
}
}
}
}3. Configure in Claude Desktop (claude_desktop_config.json)
{
"mcpServers": {
"backwrite": {
"command": "npx",
"args": ["-y", "@backwrite/mcp"],
"env": {
"BACKWRITE_URL": "https://api.backwrite.dev",
"BACKWRITE_SERVICE_KEY": "bwk_service_...",
"BACKWRITE_PROJECT_ID": "bw_proj_..."
}
}
}
}Exposed Tools
| Tool | Description |
|---|---|
| backwrite_execute_sql | Execute arbitrary SQL queries, multi-statement DDL/DML, migrations, and RLS policies. |
| backwrite_get_database_schema | 1-roundtrip complete relational schema introspection (tables, columns, types, nullability, defaults, primary keys, foreign keys, indexes, RLS policies). |
| backwrite_list_tables | List user tables with column counts and primary keys. |
| backwrite_describe_table | Detailed inspection of a specific table. |
| backwrite_list_branches | List project branches (production, preview, development). |
| backwrite_get_connection_string | Direct wire (5432) and pooler (6543) connection coordinates. |
| backwrite_generate_types | Generate TypeScript interfaces, Prisma schema, or Drizzle schema. |
License
Apache-2.0 © Backwrite
