Developer tools for Run402 — provision Postgres databases, deploy static sites, serverless functions, generate images, and manage x402 wallets. Available as an MCP server, an OpenClaw skill, and a CLI.
English | 简体中文
Integrations
Interface | Use when... |
Terminal, scripts, CI/CD | |
OpenClaw agent (no MCP required) | |
MCP server (this package) | Claude Desktop, Cursor, Cline, Claude Code |
Quick Start
npx run402-mcpMCP Tools
Tool | Description |
| Provision a Postgres database. Handles x402 payment. Saves credentials locally. |
| Execute SQL (DDL or queries). Returns markdown table. |
| Query/mutate via PostgREST. GET/POST/PATCH/DELETE with query params. |
| Apply row-level security templates to tables. |
| Introspect database schema — tables, columns, types, constraints, RLS policies. |
| Get project usage report — API calls, storage, limits, lease expiry. |
| Upload text content to project storage. |
| Download a file from project storage. |
| Delete a file from project storage. |
| List files in a storage bucket. |
| Deploy a serverless function (Node 22) to a project. |
| Invoke a deployed function via HTTP. |
| Get recent logs from a deployed function. |
| List all deployed functions for a project. |
| Delete a deployed function. |
| Set a project secret. Injected as process.env in functions. |
| List secret keys for a project (values not shown). |
| Delete a secret from a project. |
| Deploy static site. $0.05/deployment. Returns live URL. |
| Claim custom subdomain (e.g. myapp.run402.com). Free. |
| Release a subdomain. |
| List all subdomains claimed by a project. |
| One-call full-stack deploy: database + migrations + RLS + secrets + functions + site + subdomain. |
| Browse public apps available for forking. |
| Fork a published app into a new project. |
| Publish a project as a forkable app. |
| List published versions of a project. |
| Get tier pricing. Free, no auth required. |
| Renew lease. Handles x402 payment. |
| Archive a project and remove from local key store. |
| Check billing account balance for a wallet address. |
| List all active projects for a wallet address. |
| Check local wallet status — address, network, funding. |
| Create a new local wallet (Base Sepolia testnet). |
| Export the local wallet address. |
| Request free testnet USDC from the Run402 faucet. |
| Generate a PNG image from a text prompt. $0.03 via x402. |
Client Configuration
CLI
A standalone CLI is available in the cli/ directory.
npm install -g run402
run402 wallet create
run402 wallet fund
run402 deploy --tier prototype --manifest app.jsonSee cli/README.md for full usage.
OpenClaw
A standalone skill is available in the openclaw/ directory — no MCP server required. It calls the Run402 API directly via Node.js scripts.
cp -r openclaw ~/.openclaw/skills/run402
cd ~/.openclaw/skills/run402/scripts && npm installSee openclaw/README.md for details.
MCP Clients
Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"run402": {
"command": "npx",
"args": ["-y", "run402-mcp"]
}
}
}Cursor
Add to .cursor/mcp.json in your project:
{
"mcpServers": {
"run402": {
"command": "npx",
"args": ["-y", "run402-mcp"]
}
}
}Cline
Add to Cline MCP settings:
{
"mcpServers": {
"run402": {
"command": "npx",
"args": ["-y", "run402-mcp"]
}
}
}Claude Code
claude mcp add run402 -- npx -y run402-mcpHow It Works
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.Deploy — Use
deploy_sitefor static sites,deploy_functionfor serverless functions, orbundle_deployfor a full-stack app in one call.Renew — Call
renew_projectbefore your lease expires.
Payment Flow
Provisioning, renewing, site deployment, bundle deploy, and image generation 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.
Key Storage
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
Environment Variables
Variable | Default | Description |
|
| API base URL |
|
| Config directory for key storage |
Development
npm run build # tsc → dist/
npm test # all tests (SKILL + sync + unit)
npm run test:sync # check MCP/CLI/OpenClaw stay in sync
npm run test:skill # validate SKILL.md structureLicense
MIT