Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| RUN402_API_BASE | No | API base URL | https://api.run402.com |
| RUN402_CONFIG_DIR | No | Config directory for key storage | ~/.config/run402 |
Capabilities
Features and capabilities supported by this server
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| provision_postgres_project | Provision a new Postgres database. Returns project credentials on success, or payment details if x402 payment is needed. |
| run_sql | Execute SQL (DDL or queries) against a provisioned project. Returns results as a markdown table. |
| rest_query | Query or mutate data via the PostgREST REST API. Supports GET/POST/PATCH/DELETE with query params. |
| setup_rls | Apply row-level security to tables. Templates: user_owns_rows (users access own rows only), public_read (anyone reads, authenticated writes), public_read_write (open access). |
| get_schema | Introspect the database schema — tables, columns, types, constraints, and RLS policies. Useful for understanding the database structure before writing queries. |
| get_usage | Get project usage report — API calls, storage usage, limits, and lease expiry. |
| upload_file | Upload text content to project storage. Returns the storage key and size. |
| download_file | Download a file from project storage. Returns the file content. |
| delete_file | Delete a file from project storage. |
| list_files | List files in a storage bucket. Shows file names, sizes, and last modified dates. |
| deploy_function | Deploy a serverless function (Node 22) to a project. Handler signature: export default async (req: Request) => Response. Pre-bundled packages: stripe, openai, @anthropic-ai/sdk, resend, zod, uuid, jsonwebtoken, bcryptjs, cheerio, csv-parse. |
| invoke_function | Invoke a deployed function via HTTP. Returns the function's response body and status code. Useful for testing functions without building a frontend. |
| get_function_logs | Get recent logs from a deployed function. Shows console.log/error output and error stack traces from CloudWatch. |
| list_functions | List all deployed functions for a project. Shows names, URLs, runtime, timeout, and memory. |
| delete_function | Delete a deployed function from a project. |
| set_secret | Set a project secret (e.g. STRIPE_SECRET_KEY). Secrets are injected as process.env variables in functions. Setting an existing key overwrites it. |
| list_secrets | List secret keys for a project (values are not shown). Useful for checking which secrets are configured. |
| delete_secret | Delete a secret from a project. |
| deploy_site | Deploy a static site (HTML/CSS/JS). Files are uploaded to S3 and served via CloudFront at a unique URL. Costs $0.05 USDC via x402. |
| claim_subdomain | Claim a custom subdomain (e.g. myapp.run402.com) and point it at an existing deployment. Free, requires service_key auth. |
| delete_subdomain | Release a custom subdomain. The URL will stop serving content. |
| list_subdomains | List all subdomains claimed by a project. |
| bundle_deploy | One-call full-stack app deployment. Provisions a database and optionally runs migrations, applies RLS, sets secrets, deploys functions, deploys a static site, and claims a subdomain — all in a single x402 payment. |
| browse_apps | Browse public apps available for forking. Optionally filter by tags. |
| fork_app | Fork a published app into a new project. Creates a full copy including database, functions, site, and optionally claims a subdomain. |
| publish_app | Publish a project as a forkable app. Set visibility and tags for discoverability. |
| list_versions | List published versions of a project. |
| get_quote | Get tier pricing for Run402 projects. Free, no auth required. Shows prices, lease durations, storage limits, and API call limits. |
| renew_project | Renew a project's lease. Returns success or payment details if x402 payment is needed. |
| archive_project | Archive a project and remove it from the local key store. This action cannot be undone. |
| check_balance | Check billing account balance for a wallet address. Shows available and held funds. |
| list_projects | List all active projects for a wallet address. |
| wallet_status | Check local wallet status — address, network, and funding status. |
| wallet_create | Create a new local wallet (Base Sepolia testnet). Generates a private key and derives the Ethereum address. Saved to ~/.config/run402/wallet.json. |
| wallet_export | Export the local wallet address. Safe to share publicly. |
| request_faucet | Request free testnet USDC from the Run402 faucet (Base Sepolia). Rate limit: 1 per IP per 24h. Returns 0.25 USDC — enough for 2 prototype databases. |
| generate_image | Generate a PNG image from a text prompt. Costs $0.03 USDC via x402. Aspect ratios: square (1:1), landscape (16:9), portrait (9:16). |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |