run402
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. |
| apply_expose | Apply a declarative authorization manifest to a project (POST /projects/v1/admin/:id/expose). The manifest describes the full authorization surface: tables (with policy, owner_column, force_owner_on_insert, i_understand_this_is_unrestricted, custom_sql), views (with base, select, filter), and rpcs (with signature, grant_to). Convergent: applying the same manifest twice is a no-op; items dropped between applies have their policies/grants/triggers/views revoked. Tables are dark by default — any table not declared with expose:true is unreachable via anon/authenticated. |
| validate_manifest | Validate an auth/expose manifest without applying it. This checks the authorization manifest used by manifest.json, database.expose, and apply_expose; it is not deploy-manifest validation. Optional migration_sql is reference context only and is not executed. Use deploy planning/dry-run surfaces for deploy manifest questions. |
| get_expose | Get the current authorization manifest for a project (GET /projects/v1/admin/:id/expose). Returns the last-applied manifest from |
| 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. |
| assets_put | Upload a blob (file or inline content) to project storage via direct-to-S3. Accepts local_path (any size up to 5 TiB) or content (≤ 1 MB inline). Public blobs get a CDN URL; private blobs require authenticated reads. Use |
| assets_get | Download a blob to a local file path. Writes bytes directly to disk (no context-window bloat). Returns size + SHA-256 header (if the blob has one stored). |
| assets_ls | List blobs in a project with optional prefix filter over a flat key namespace. Supports pagination via cursor. |
| assets_rm | Delete a blob from project storage and decrement the project's storage_bytes. |
| assets_sign | Generate a time-boxed S3 presigned GET URL for a blob. Use this to share a private blob externally without exposing your apikey. Default TTL 1 hour, max 7 days. |
| diagnose_public_url | Returns the live CDN state for a public blob URL (probed once from gateway-us-east-1 — NOT a global view). Use this when a deployed asset shows the wrong version or you suspect cache staleness. The result includes |
| wait_for_cdn_freshness | Polls the CDN until a MUTABLE blob URL serves the expected SHA-256, or the timeout elapses. For mutable URLs only — for immutable URLs (the |
| deploy_function | Deploy a serverless function (Node 22) to a project. Handler signature: export default async (req: Request) => Response. The function can |
| 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, memory, and (for functions deployed under bundling-at-deploy) the Functions runtime version ( |
| delete_function | Delete a deployed function from a project. |
| update_function | Update a function's schedule, timeout, or memory without re-deploying code. Pass schedule as a cron expression to set/update, or null to remove. |
| set_secret | Set a project secret (e.g. STRIPE_SECRET_KEY). Values are write-only and injected as process.env variables in functions. Setting an existing key overwrites it. Use this before deploy, then declare the key with secrets.require. |
| list_secrets | List secret keys for a project. Values and value-derived hashes are never shown; use this only to check which keys are configured. |
| delete_secret | Delete a secret from a project. |
| jobs_submit | Submit a fixed platform-managed job. The request must match the gateway jobs API shape: job_type, input with input.json, and max_cost_usd_micros. The SDK supplies the required idempotency header. |
| jobs_get | Get a managed job run by id. |
| jobs_logs | Read recent runner logs for a managed job. Use tail to cap entries and since for an epoch millisecond lower bound. |
| jobs_cancel | Cancel a queued or running managed job. |
| deploy_site | Deploy a static site (HTML/CSS/JS) from inline file bytes. Files are staged to a temp directory, then uploaded via the v1.32 plan/commit transport — only bytes the gateway doesn't already have are PUT. Served at a unique URL via CloudFront. Free with active tier. |
| deploy_site_dir | Deploy a static site from a local directory. Walks the tree, hashes each file, and uploads only the bytes the gateway doesn't already have via the v1.32 plan/commit transport. Files named .git, node_modules, or .DS_Store are skipped; symlinks are rejected. Re-deploying an unchanged tree issues no S3 PUTs. Free with active tier. |
| deploy | Unified deploy primitive (v1.34+). Accepts a structured ReleaseSpec — database (migrations + expose), value-free secrets.require/delete declarations, functions, site, site.public_paths, subdomains, and routes.replace web routes — with explicit replace vs patch semantics per resource. Use site.public_paths for clean static URLs such as /events backed by release asset events.html; explicit mode does not expose /events.html unless separately declared, while mode: 'implicit' restores filename-derived reachability and can widen access. Route entries map exact/final-wildcard browser paths like /admin and /admin/* to Node 22 Fetch Request -> Response functions, or exact GET/HEAD method-aware static aliases such as /events to { type: 'static', file: 'events.html' }; intentional read-only GET/HEAD wildcard function routes may set acknowledge_readonly: true. Direct /functions/v1/:name remains API-key protected. Secret values must be set first with set_secret, never placed in deploy specs. All bytes ride through CAS (no inline-body cap). Returns release_id, URLs, warnings, and a structured progress-event log. Stops before upload/commit on confirmation-required warnings unless reviewed codes are passed with allow_warning_codes or allow_warnings is true. |
| deploy_diagnose_url | Read-only authenticated diagnostics for a Run402 public URL or host/path pair. Explains whether the current live release would serve the URL, including match, diagnostic body status, static manifest/cache metadata when returned, structured warnings for ignored query/fragment, and next steps. This does not fetch bytes, purge cache, mutate deploy state, or expose internal CAS URLs. |
| deploy_resume | Resume a deploy operation that ended in |
| deploy_list | List recent deploy operations for a project. Returns operation_id, status, release_id, and timestamps. Use this to build deploy-history UIs or to find a recent operation_id to feed into |
| deploy_events | Fetch the recorded phase-event stream for a deploy operation. Returns the same |
| deploy_release_get | Fetch a release inventory by id. Returns release metadata, effective/desired state kind, site path inventory, function inventory, secret keys, subdomains, and applied migrations. Use |
| deploy_release_active | Fetch the current-live release inventory for a project. Returns |
| deploy_release_diff | Diff two release targets for a project. |
| ci_create_binding | Create a GitHub Actions CI/OIDC deploy binding by sending a locally signed delegation to the SDK. This MCP wrapper does not sign or broaden authority; the signed delegation defines the repository/branch or environment, allowed events/actions, and optional route_scopes. Without route_scopes, CI cannot deploy route declarations. |
| ci_list_bindings | List CI/OIDC deploy bindings for a project, including route_scopes when delegated. Use this to inspect which GitHub Actions subjects can deploy before editing bindings. |
| ci_get_binding | Get one CI/OIDC deploy binding by id, including its subject, allowed events/actions, repository id, revocation state, and route_scopes. |
| ci_revoke_binding | Revoke one CI/OIDC deploy binding. Revocation stops future CI gateway requests, but does not undo already deployed releases or rotate secrets. |
| 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. |
| add_custom_domain | Register a custom domain (e.g. example.com) to point at a Run402 subdomain. Returns DNS instructions for the human to configure. |
| list_custom_domains | List all custom domains registered for a project. |
| check_domain_status | Check if a custom domain's DNS is configured and SSL is active. Poll this after registering a domain. |
| remove_custom_domain | Release a custom domain mapping. Traffic to the domain will no longer route to Run402. |
| 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. |
| tier_status | Check current tier subscription — tier name, status, expiry, usage, and function authoring caps when returned (max timeout, memory, scheduled functions, min cron interval). Requires allowance auth. |
| set_tier | Subscribe, renew, or upgrade tier. Auto-detects action based on allowance state. Returns success or payment details if x402 payment is needed. |
| delete_project | Immediately and irreversibly delete a project: the gateway runs the full destructive cascade (drop tenant schema, delete Lambda functions, release subdomains, tombstone mailbox, remove sender domain, wipe secrets and app versions) and sets status=purged. This tool also removes the project from the local key store. Distinct from the automatic lease-expiry grace window — this action is the explicit purge and cannot be undone. To recover from a missed renewal use |
| pin_project | Pin a project so it is not garbage-collected or expired. Admin only — uses the configured allowance wallet for run402 platform admin auth; project owners authenticating with service_key or a non-admin SIWX wallet will receive 403 admin_required. Not a self-service command for regular users. |
| promote_user | Promote a user to project_admin role by email. Admins can manage secrets from the browser. Requires service_key. |
| demote_user | Demote a user from project_admin role by email. Reverts to default authenticated role. Requires service_key. |
| check_balance | Check billing account balance for an agent allowance address. Shows available and held funds. |
| list_projects | List all active projects for an agent allowance address. |
| allowance_status | Check local agent allowance status — address, network, and funding status. |
| allowance_create | Create a new local agent allowance (Base Sepolia testnet). Generates a private key and derives the Ethereum address. Saved to ~/.config/run402/allowance.json. |
| allowance_export | Export the local agent allowance 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). |
| create_mailbox | Create a project-scoped email mailbox at @mail.run402.com. One mailbox per project. |
| send_email | Send an email from the project's mailbox. Two modes: template (project_invite, magic_link, notification) or raw HTML (subject + html). Optional from_name for display name. Single recipient only. |
| list_emails | List sent emails from the project's mailbox. Shows message ID, template, recipient, status, and timestamp. |
| get_email | Get a sent email with details and any replies. |
| get_email_raw | Get the raw RFC-822 bytes of an inbound email message, base64-encoded. The decoded bytes are bit-identical to the DKIM-signed original — no parsing, normalization, or CRLF cleanup. Use this for cryptographic verification (DKIM checks, zk-email proofs). Inbound messages only; outbound returns 404. For display/threading, use get_email instead. |
| get_mailbox | Get the project's mailbox info (ID, address, slug). Use to check if a mailbox exists. |
| delete_mailbox | Delete the project's mailbox (irreversible — drops all messages and webhook subscriptions). Requires confirm=true. If mailbox_id is omitted, resolves the project's mailbox. |
| register_mailbox_webhook | Register a webhook on the project's mailbox. Receives POST notifications for email events (delivery, bounced, complained, reply_received). |
| list_mailbox_webhooks | List all webhooks registered on the project's mailbox. |
| get_mailbox_webhook | Get details of a specific webhook by ID. |
| delete_mailbox_webhook | Delete a webhook. Idempotent — succeeds even if already deleted. |
| update_mailbox_webhook | Update a webhook's URL and/or events. At least one field required. Events is a full replacement, not a merge. |
| ai_translate | Translate text to a target language. Requires service key and active AI Translation add-on. Supports optional source language and context hint. |
| ai_moderate | Run content moderation on text. Returns flagged status and category scores. Free for all projects, requires service key. |
| ai_usage | Get AI translation usage for the current billing period — used words, quota, and remaining balance. |
| send_message | Send a message to the Run402 developers. Requires an active tier. |
| set_agent_contact | Register agent contact info (name, email, webhook). New or changed emails start operator email reply verification. Free with allowance auth. |
| get_agent_contact_status | Get the current agent contact assurance state: wallet_only, email_pending, email_verified, passkey_pending, or operator_passkey. |
| verify_agent_contact_email | Start or resend the operator email reply challenge for the active agent contact email. Does not expose the challenge secret. |
| start_operator_passkey_enrollment | Email a short-lived Run402 operator passkey enrollment link to the verified contact email. Requires email_verified. |
| create_checkout | Create a Stripe checkout URL for your human to fund your agent allowance with a credit card. |
| billing_history | View billing transaction history for an agent allowance address. |
| update_version | Update metadata (description, tags, visibility, fork_allowed) of a published app version. |
| delete_version | Delete a published app version. |
| get_app | Inspect a specific published app — details, required secrets, fork pricing. |
| init | Set up agent allowance, request faucet funding, and check tier status — single-call bootstrap. Idempotent, safe to re-run. |
| status | Full account snapshot — allowance, billing balance, tier subscription, projects, and active project. Single-call overview. |
| project_info | Show local project details — REST URL, keys, site URL, and deployment info. Reads from local keystore only. |
| project_use | Set the active/default project in the local keystore. |
| project_keys | Get anon_key and service_key for a project from the local keystore. |
| request_magic_link | Send a passwordless login email (magic link) to a project user. Auto-creates the user on first verification. Rate limited per email (5/hr) and per project (by tier). |
| verify_magic_link | Exchange a magic link token for access_token + refresh_token. Creates the user if they don't exist. Token is single-use and expires in 15 minutes. |
| create_auth_user | Create or update a project auth user with the service key. Can set project_admin and optionally send a trusted invite. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/kychee-com/run402'
If you have feedback or need assistance with the MCP directory API, please join our Discord server