MCP server for Run402 — provision and manage AI-native Postgres databases from any MCP-compatible client.
npx run402-mcp| Tool | Description |
|---|---|
provision_postgres_project |
Provision a new Postgres database (prototype/hobby/team tier) |
run_sql |
Execute SQL (DDL or queries) against a project |
rest_query |
Query/mutate data via PostgREST REST API |
upload_file |
Upload text content to project storage |
renew_project |
Renew a project's database lease |
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"run402": {
"command": "npx",
"args": ["-y", "run402-mcp"]
}
}
}Add to .cursor/mcp.json in your project:
{
"mcpServers": {
"run402": {
"command": "npx",
"args": ["-y", "run402-mcp"]
}
}
}Add to Cline MCP settings:
{
"mcpServers": {
"run402": {
"command": "npx",
"args": ["-y", "run402-mcp"]
}
}
}claude mcp add run402 -- npx -y run402-mcp- Provision — Call
provision_postgres_projectto create a database. The server handles x402 payment negotiation and stores credentials locally. - Build — Use
run_sqlto create tables,rest_queryto insert/query data, andupload_filefor storage. - Renew — Call
renew_projectbefore your lease expires.
Provisioning and renewing require x402 micropayments. When payment is needed, tools return payment details (not errors) so the LLM can reason about them and guide the user through payment.
Project credentials are saved to ~/.config/run402/projects.json with 0600 permissions. Each project stores:
anon_key— for public-facing queries (respects RLS)service_key— for admin operations (bypasses RLS)tier— prototype, hobby, or teamexpires_at— lease expiration timestamp
| Variable | Default | Description |
|---|---|---|
RUN402_API_BASE |
https://api.run402.com |
API base URL |
RUN402_CONFIG_DIR |
~/.config/run402 |
Config directory for key storage |
npm run build
npm run test:skillMIT