Direct Creation (MCP) Details
Use this reference for MCP direct-creation examples and follow-on configuration.
Direct Creation Workflow
Step 1: Analyze Codebase
Use codebase-analysis.md to determine runtime, build/start commands, env vars, and datastores.
Step 2: Create Resources via MCP
Create a Web Service:
create_web_service(
name: "my-api",
runtime: "node", # or python, go, rust, ruby, elixir, docker
repo: "https://github.com/username/repo",
branch: "main", # optional, defaults to repo default branch
buildCommand: "npm ci",
startCommand: "npm start",
plan: "free", # free, starter, standard, pro, pro_max, pro_plus, pro_ultra
region: "oregon", # oregon, frankfurt, singapore, ohio, virginia
envVars: [
{"key": "NODE_ENV", "value": "production"}
]
)Create a Static Site:
create_static_site(
name: "my-frontend",
repo: "https://github.com/username/repo",
branch: "main",
buildCommand: "npm run build",
publishPath: "dist", # or build, public, out
envVars: [
{"key": "VITE_API_URL", "value": "https://api.example.com"}
]
)Create a Cron Job:
create_cron_job(
name: "daily-cleanup",
runtime: "node",
repo: "https://github.com/username/repo",
schedule: "0 0 * * *", # Daily at midnight (cron syntax)
buildCommand: "npm ci",
startCommand: "node scripts/cleanup.js",
plan: "free"
)Create a PostgreSQL Database:
create_postgres(
name: "myapp-db",
plan: "free", # free, basic_256mb, basic_1gb, basic_4gb, pro_4gb, etc.
region: "oregon"
)Create a Key-Value Store (Redis):
create_key_value(
name: "myapp-cache",
plan: "free", # free, starter, standard, pro, pro_plus
region: "oregon",
maxmemoryPolicy: "allkeys_lru" # eviction policy
)Step 3: Configure Environment Variables
After creating services, add environment variables:
update_environment_variables(