page:recipes:mcp server:starlette:persistent state

Host mcp server with Starlette: Postgres-backed state

Deploy a mcp server built with Starlette on Ample using the durable job state pattern. Compute runs the app in an isolated microVM behind a public HTTPS URL, a managed PostgreSQL 16 database is auto-provisioned and injected as DATABASE_URL. Verified on Starlette: a jobs table with a state and attempts counter, processing inside a row-locked transaction, and a second run that is a no-op (job=done attempts=1 idempotent=true). Not separately tested: your job types, payload schema and retry policy; treat the mcp server-specific behavior as your application code.

Representative Queries

Resource Requirements

Infrastructure Requirements

Framework

Starlette

Workload

MCP server

Release Status

Published

Support Status

Verified

Execution Status

Ready

Prerequisites

Tested Configuration

Input Schema

{
  "additionalProperties": false,
  "properties": {
    "env": {
      "description": "Encrypted environment variables (bucket credentials, secrets)",
      "items": {
        "pattern": "^[A-Z][A-Z0-9_]*=.*$",
        "type": "string"
      },
      "maxItems": 50,
      "type": "array"
    },
    "name": {
      "description": "App name",
      "maxLength": 63,
      "minLength": 1,
      "pattern": "^[a-z0-9-]+$",
      "type": "string"
    },
    "path": {
      "description": "Project directory or ample.toml service",
      "maxLength": 512,
      "minLength": 1,
      "type": "string"
    },
    "release_command": {
      "description": "Migration command run before activation",
      "maxLength": 512,
      "type": "string"
    },
    "start": {
      "description": "Start command (Python apps pass one explicitly)",
      "maxLength": 512,
      "type": "string"
    }
  },
  "required": ["name", "path", "start"],
  "type": "object"
}

Workflow Steps

Examples

Success Checks

Limitations

Cost Estimate

Last Verified At

2026-09-21T01:21:36Z

Unknowns

Formats