Skip to content

remote provision

Deploy a new Alchemy stack and configure the CLI for it.

For humans

Prerequisites

provision creates the Cloudflare infrastructure for the remote DB (and optional MCP).

You need a Cloudflare account that can create:

  • Workers (router, API, MCP, and optionally docs)
  • A D1 database
  • A Vectorize index
  • Workers AI
  • A KV namespace (for MCP OAuth state)

Usage

machine-memory remote provision

Deploys the Alchemy stack:

  1. Creates the edge router (public URL) plus private API and MCP workers
  2. Optionally builds and deploys the docs worker (docs: true in config, default for the upstream site)
  3. Connects the Workers to existing Cloudflare Secrets Store entries
  4. Leaves existing CLI URL and credentials in the OS keychain unchanged

Self-host without docs

cp iac/machine-memory.deploy.example.json ./machine-memory.deploy.json
# set domain, worker names, "docs": false
machine-memory remote provision --config ./machine-memory.deploy.json

Or:

machine-memory remote provision --no-docs --domain memory.example.com

Full field reference: Deployment options.

The config must include secretsStore.storeId and secretsStore.dbToken. These are references, not secret values. Add the optional secretsStore.oauth block to enable GitHub OAuth. remote provision does not generate or rotate a bearer token; use remote setup separately when configuring a new CLI installation.

Names and defaults

Option Environment variable Default
--config MACHINE_MEMORY_DEPLOY_CONFIG auto-discover
--domain MACHINE_MEMORY_DOMAIN (workers.dev router)
--no-docs / --docs MACHINE_MEMORY_DEPLOY_DOCS docs on
--stack-name MACHINE_MEMORY_STACK_NAME machine-memory-remote-db
--database-name MACHINE_MEMORY_DB_NAME machine-memory-db
--router-name MACHINE_MEMORY_ROUTER_NAME machine-memory-router
--api-name MACHINE_MEMORY_API_NAME machine-memory-api
--mcp-name MACHINE_MEMORY_MCP_NAME machine-memory-mcp

Each value comes from the first source that sets it: flags, then environment variables, then the config file, then defaults. For the stack, database, and API names, stored remote credentials are checked after environment variables and before the config file.

A --config path that does not exist stops provisioning with Deploy config not found at <path>. A MACHINE_MEMORY_DEPLOY_CONFIG path that does not exist prints a warning and continues with environment variables and defaults. Without either, remote provision reads machine-memory.deploy.json from the current directory if it exists.

machine-memory list --remote

MCP on the same stack

After the stack is up, follow Enable MCP. Overview: MCP.

Navigation

Type to search…

↑↓ navigate↵ selectEsc close