name = "devplan-mcp-server"
main = "src/index.ts"
compatibility_date = "2024-12-01"
compatibility_flags = ["nodejs_compat"]
workers_dev = true # Keep workers.dev subdomain active
# Custom domains
routes = [
{ pattern = "devplanmcp.store/*", zone_name = "devplanmcp.store" },
{ pattern = "mcp.devplanmcp.store/*", zone_name = "devplanmcp.store" }
]
# Observability - logs errors and console output
# Free tier: 10M log messages/month, 7-day retention
[observability]
enabled = true
[observability.logs]
enabled = true
invocation_logs = false # Keep OFF to avoid log spam from every request
# Feature flags and configuration
[vars]
AUTH_ENABLED = "false" # Set to "true" to require API keys
FREE_TIER_LIMIT = "100" # Requests per month for free tier
SESSION_INACTIVITY_TTL_DAYS = "1" # Days of inactivity before session cleanup
SESSION_ABSOLUTE_TTL_DAYS = "7" # Maximum session age in days
CLEANUP_CHECK_HOURS = "1" # Hours between cleanup alarm checks (aggressive for free tier)
# KV namespace for API keys and usage tracking
[[kv_namespaces]]
binding = "DEVPLAN_KV"
id = "e54b4971273c4ce19ddee2e47a6e50af"
[[durable_objects.bindings]]
name = "MCP_OBJECT"
class_name = "DevPlanMCP"
[[migrations]]
tag = "v1"
new_sqlite_classes = ["DevPlanMCP"]
# NUCLEAR: Delete all existing DOs to stop zombie alarm storm
[[migrations]]
tag = "v2"
deleted_classes = ["DevPlanMCP"]
# Recreate class fresh after nuclear cleanup
[[migrations]]
tag = "v3"
new_sqlite_classes = ["DevPlanMCP"]
# =============================================================================
# Secrets (add via: wrangler secret put <NAME>)
# =============================================================================
# CF_ANALYTICS_TOKEN - Cloudflare API token with "Zone Analytics:Read" permission
# Create at: https://dash.cloudflare.com/profile/api-tokens
# CF_ZONE_ID - Zone ID for devplanmcp.store
# CF_ACCOUNT_ID - Account ID (optional, for Workers analytics fallback)
# =============================================================================
# Staging Environment
# =============================================================================
[env.staging]
workers_dev = true # Deploy to workers.dev subdomain only (no custom domain)
[env.staging.vars]
AUTH_ENABLED = "false"
FREE_TIER_LIMIT = "100"
SESSION_INACTIVITY_TTL_DAYS = "1"
SESSION_ABSOLUTE_TTL_DAYS = "7"
CLEANUP_CHECK_HOURS = "1"
ENVIRONMENT = "staging"
[[env.staging.kv_namespaces]]
binding = "DEVPLAN_KV"
id = "0fb386b51fb74e7d89b606c313410a8f"
[[env.staging.durable_objects.bindings]]
name = "MCP_OBJECT"
class_name = "DevPlanMCP"
# Fresh migrations for staging (no delete needed - new worker)
[[env.staging.migrations]]
tag = "v1"
new_sqlite_classes = ["DevPlanMCP"]