:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
chore(mcp): migrate local-dev env to .env and retire stale worker docs (#70298)
Rafael Audibertb9dcdfa7ce20
diff --git a/bin/start-mcp-server b/bin/start-mcp-serverindex 00609b0ea143..49c5abbcc828 100755--- a/bin/start-mcp-server+++ b/bin/start-mcp-server@@ -7,36 +7,41 @@ RUNTIME="${MCP_RUNTIME:-hono}"pnpm install --frozen-lockfile-# `.dev.vars` is the canonical local-dev env (Wrangler convention). The hono-# entry also reads it (see scripts/dev-hono.ts) — make sure it exists either-# way, otherwise OAuth metadata advertises cloud (`oauth.posthog.com`) and-# MCP clients try to auth against production instead of local Django.-if [ ! -f .dev.vars ]; then- cp .dev.vars.example .dev.vars+# `.env` is the canonical local-dev env (see .env.example) - make sure it+# exists, otherwise OAuth metadata advertises cloud (`oauth.posthog.com`)+# and MCP clients try to auth against production instead of local Django.+if [ ! -f .env ]; then+ cp .env.example .env+ if [ -f .dev.vars ]; then+ echo "NOTE: .dev.vars is no longer read - created .env from .env.example." >&2+ echo "Move any custom values from .dev.vars into .env, then delete .dev.vars." >&2+ fi+fi++# SITE_URL on devboxes points at the public per-workspace subdomain; rewrite+# the three PostHog-pointing keys so MCP's OAuth metadata advertises a host+# browsers can actually reach. Runs every start (not just first creation) so+# .env stays in sync when the workspace subdomain changes.+loopback_re='^https?://(localhost|127\.0\.0\.1)([:/]|$)'+if [ -n "${SITE_URL:-}" ] && ! [[ "${SITE_URL}" =~ $loopback_re ]]; then+ tmp=$(mktemp)+ grep -Ev '^(POSTHOG_API_BASE_URL|POSTHOG_MCP_APPS_ANALYTICS_BASE_URL|POSTHOG_ANALYTICS_HOST)=' .env > "$tmp" || true+ mv "$tmp" .env+ # Leading \n guards against the prior file missing a trailing newline.+ printf '\n%s\n%s\n%s\n' \+ "POSTHOG_API_BASE_URL=${SITE_URL}" \+ "POSTHOG_MCP_APPS_ANALYTICS_BASE_URL=${SITE_URL}" \+ "POSTHOG_ANALYTICS_HOST=${SITE_URL}" \+ >> .envfiif [ "$RUNTIME" = "hono" ]; thenexport REDIS_URL="${REDIS_URL:-redis://localhost:6379}"export PORT="${PORT:-8787}"- exec pnpm run dev:hono-else-- # SITE_URL on devboxes points at the public per-workspace subdomain; rewrite- # the three PostHog-pointing keys so MCP's OAuth metadata advertises a host- # browsers can actually reach. Runs every start (not just first creation) so- # .dev.vars stays in sync when the workspace subdomain changes.- loopback_re='^https?://(localhost|127\.0\.0\.1)([:/]|$)'- if [ -n "${SITE_URL:-}" ] && ! [[ "${SITE_URL}" =~ $loopback_re ]]; then- tmp=$(mktemp)- grep -Ev '^(POSTHOG_API_BASE_URL|POSTHOG_MCP_APPS_ANALYTICS_BASE_URL|POSTHOG_ANALYTICS_HOST)=' .dev.vars > "$tmp" || true- mv "$tmp" .dev.vars- # Leading \n guards against the prior file missing a trailing newline.- printf '\n%s\n%s\n%s\n' \- "POSTHOG_API_BASE_URL=${SITE_URL}" \- "POSTHOG_MCP_APPS_ANALYTICS_BASE_URL=${SITE_URL}" \- "POSTHOG_ANALYTICS_HOST=${SITE_URL}" \- >> .dev.vars- fi-exec pnpm run dev+else+ # Edge-proxy worker only (wrangler dev) - the MCP protocol itself is+ # served by the Hono runtime. Wrangler reads `.env` when `.dev.vars`+ # is absent.+ exec pnpm run dev:proxyfidiff --git a/docs/internal/sandboxes-setup-guide.md b/docs/internal/sandboxes-setup-guide.mdindex f8b33762fd30..c515f5900842 100644--- a/docs/internal/sandboxes-setup-guide.md+++ b/docs/internal/sandboxes-setup-guide.md@@ -177,15 +177,15 @@ SANDBOX_MCP_URL=https://<mcp-8787-subdomain>.ngrok-free.app/mcp`SANDBOX_MCP_URL` overrides the `host.docker.internal` default (which only resolves from local Docker sandboxes, not Modal). Without it, sandbox agents can't reach the MCP server and lose access to the PostHog `execute-sql`, query, and tool-calling stack.-### MCP server `.dev.vars`+### MCP server `.env`-`MODAL_DOCKER` (and the local Docker provider) both depend on the MCP Worker running at `localhost:8787`. The Worker reads its config from `services/mcp/.dev.vars` — without it, things like `POSTHOG_API_BASE_URL`, the UI-apps token, and analytics keys are missing and the Worker will either refuse to start or return broken responses to the sandbox.+`MODAL_DOCKER` (and the local Docker provider) both depend on the MCP server running at `localhost:8787`. The server reads its config from `services/mcp/.env` — without it, things like `POSTHOG_API_BASE_URL`, the UI-apps token, and analytics keys are missing and the server will either refuse to start or return broken responses to the sandbox.```bash-cd services/mcp && cp .dev.vars.example .dev.vars+cd services/mcp && cp .env.example .env```-Then fill in the secrets. `INKEEP_API_KEY` (for the `docs-search` tool) lives in 1Password under **"Inkeep API key - mcp"**. `POSTHOG_UI_APPS_TOKEN` and `POSTHOG_ANALYTICS_API_KEY` are public PostHog `phc_*` project keys — for local dev you can paste the same key you use for analytics, or leave them as the placeholder (analytics calls will no-op). Restart the `mcp` phrocs process after changing `.dev.vars`.+Then fill in the secrets. `POSTHOG_UI_APPS_TOKEN` and `POSTHOG_ANALYTICS_API_KEY` are public PostHog `phc_*` project keys — for local dev you can paste the same key you use for analytics, or leave them as the placeholder (analytics calls will no-op). Restart the `mcp` phrocs process after changing `.env`.### Local agent packagesdiff --git a/services/mcp/.dev.vars.example b/services/mcp/.dev.vars.exampledeleted file mode 100644index 4a1731148f98..000000000000--- a/services/mcp/.dev.vars.example+++ /dev/null@@ -1,21 +0,0 @@-# Custom API base URL for self-hosted PostHog instances.-# WARNING: In PostHog Production, do NOT set this - the code automatically handles US/EU routing.-# See getAuthorizationServerUrl() in src/lib/constants.ts for details.-POSTHOG_API_BASE_URL=http://localhost:8010--# Public-facing PostHog URL used when rendering the clickable links in tool responses-# (the `_posthogUrl` field). Set this when POSTHOG_API_BASE_URL points at a non-clickable-# hostname (e.g. cluster-internal Hono routing). Falls back to POSTHOG_API_BASE_URL when unset.-# POSTHOG_PUBLIC_URL=http://localhost:8010--# Base URL for serving MCP UI app static assets (Worker's own URL)-MCP_APPS_BASE_URL=http://localhost:8787--# PostHog base URL for MCP Apps analytics (CSP and event ingestion)-POSTHOG_MCP_APPS_ANALYTICS_BASE_URL=http://localhost:8010-POSTHOG_UI_APPS_TOKEN=your_posthog_ui_apps_token_here--# PostHog API key for dev/self-hosted analytics-# If not set, simply won't capture any analytics-POSTHOG_ANALYTICS_API_KEY=local_api_key-POSTHOG_ANALYTICS_HOST=http://localhost:8010\ No newline at end of filediff --git a/services/mcp/.env.example b/services/mcp/.env.exampleindex e45a55b555a3..a2de58286976 100644--- a/services/mcp/.env.example+++ b/services/mcp/.env.example@@ -1,15 +1,41 @@-# Local-dev environment for the MCP Hono server.-# Copy to .env and fill in the real values. .env is gitignored.+# Local-dev environment for the MCP service. Copy to .env and fill in the+# real values. .env is gitignored.+#+# This is the single local-dev env file: the Hono server (scripts/dev-hono.ts),+# the edge-proxy worker (wrangler falls back to .env when .dev.vars is absent),+# and the UI-apps build (scripts/build-ui-apps.ts) all read it.## In production (k8s), these go in via the charts repo's Kubernetes# secret manifest for the MCP deployment, not via this file.+# Custom API base URL for self-hosted PostHog instances.+# WARNING: In PostHog Production, do NOT set this - the code automatically handles US/EU routing.+# See getAuthorizationServerUrl() in src/lib/constants.ts for details.+POSTHOG_API_BASE_URL=http://localhost:8010++# Public-facing PostHog URL used when rendering the clickable links in tool responses+# (the `_posthogUrl` field). Set this when POSTHOG_API_BASE_URL points at a non-clickable+# hostname (e.g. cluster-internal Hono routing). Falls back to POSTHOG_API_BASE_URL when unset.+# POSTHOG_PUBLIC_URL=http://localhost:8010++# Base URL for serving MCP UI app static assets (the MCP server's own URL)+MCP_APPS_BASE_URL=http://localhost:8787++# PostHog base URL for MCP Apps analytics (CSP and event ingestion)+POSTHOG_MCP_APPS_ANALYTICS_BASE_URL=http://localhost:8010+POSTHOG_UI_APPS_TOKEN=phc_<your_ui_apps_project_api_key>++# PostHog project API key for dev/self-hosted analytics+# If not set, simply won't capture any analytics+POSTHOG_ANALYTICS_API_KEY=phc_<your_analytics_project_api_key>+POSTHOG_ANALYTICS_HOST=http://localhost:8010+# HMAC-SHA256 signing secret for the typed-confirm `confirmed_action`-# paradigm — bound to user identity, tool purpose, TTL, and a single-use+# paradigm - bound to user identity, tool purpose, TTL, and a single-use# nonce inside every `<tool>-prepare` token.## - Minimum 32 bytes. Anything shorter is rejected at boot.-# - Missing or short → the paradigm is disabled (no boot crash);+# - Missing or short: the paradigm is disabled (no boot crash);# non-`confirmed_action` tools keep working, `-prepare`/`-execute`# calls fail at request time, the `mcp_confirmed_action_runtime_installed`# gauge reports 0.diff --git a/services/mcp/.gitignore b/services/mcp/.gitignoreindex cb9fb7267975..c132cd6d43c1 100644--- a/services/mcp/.gitignore+++ b/services/mcp/.gitignore@@ -2,8 +2,8 @@ node_modules# wrangler files.wrangler+# Legacy local-dev env file, replaced by .env - keep ignoring stragglers.dev.vars-!.dev.vars.example.mcp.json.env.testdiff --git a/services/mcp/CONTRIBUTING.md b/services/mcp/CONTRIBUTING.mdindex 63dc233574a8..ea934f79d911 100644--- a/services/mcp/CONTRIBUTING.md+++ b/services/mcp/CONTRIBUTING.md@@ -27,11 +27,11 @@ services/mcp/│ │ ├── hooks/ # Shared React hooks (useToolResult)│ │ └── styles/ # Base CSS with CSS variables│ └── schema/ # Zod schemas for API types-├── public/ui-apps/ # Built UI apps for Workers Static Assets (generated, gitignored)+├── public/ui-apps/ # Built UI app static assets (generated, gitignored)├── dist/ # npm package output (generated)├── vite.ui-apps.config.ts # Vite config for UI apps├── tsup.config.ts # tsup config for npm package-└── wrangler.jsonc # Cloudflare Worker config+└── wrangler.jsonc # Cloudflare edge-proxy worker config```## Local Development@@ -58,7 +58,7 @@ If you need to run the MCP server standalone:cd services/mcp# Copy env file if needed-cp .dev.vars.example .dev.vars+cp .env.example .env# Install dependenciespnpm install@@ -66,7 +66,7 @@ pnpm install# Build UI apps (required before running)pnpm run build:ui-apps-# Start the server+# Start the server (needs a local Redis on port 6379 for session state)pnpm run dev```@@ -131,9 +131,9 @@ In phrocs, start both `mcp-ui-apps` and `mcp`:1. Press `a` to see all processes2. Navigate to `mcp-ui-apps` and press `s` to start (builds UI apps and watches for changes)-3. Navigate to `mcp` and press `s` to start (runs wrangler dev server)+3. Navigate to `mcp` and press `s` to start (runs the Hono dev server)-The `mcp-ui-apps` process runs vite in watch mode. Changes to `src/ui-apps/` trigger rebuilds, and wrangler automatically reloads when `public/ui-apps/` changes.+The `mcp-ui-apps` process runs vite in watch mode. Changes to `src/ui-apps/` trigger rebuilds, and the server picks up the new bundles from `public/ui-apps/` on the next request.**Option 2: Manual terminals**@@ -335,12 +335,12 @@ For apps that need fully custom logic (like `debug.tsx` or `query-results.tsx`):## Deployment-The MCP server is deployed to Cloudflare Workers. Deployment is handled by CI/CD:+The MCP server ships as the `posthog-mcp` Docker image to PostHog's US and EU Kubernetes clusters:- **CI** (`.github/workflows/ci-mcp.yml`): Runs tests on PRs and master-- **Publish** (`.github/workflows/mcp-publish.yml`): Publishes to npm on version bump+- **CD** (`.github/workflows/cd-mcp-image.yml`): Builds and pushes the image on master, then dispatches a deploy to the charts repo-To deploy manually to Cloudflare:+The Cloudflare edge-proxy worker in front of it (`mcp.posthog.com`, see [ARCHITECTURE.md](ARCHITECTURE.md)) is deployed separately:```bashpnpm run deploydiff --git a/services/mcp/README.md b/services/mcp/README.mdindex 45d6f4e4796d..fe8653cb5727 100644--- a/services/mcp/README.md+++ b/services/mcp/README.md@@ -306,40 +306,42 @@ The header wins when both the header and the query parameter are set. Reserved v### Data processing-The MCP server is hosted on a Cloudflare worker which can be located outside of the EU / US, for this reason the MCP server does not store any sensitive data outside of your cloud region.+The MCP server runs in PostHog's US and EU Kubernetes clusters and stores session state in the region you connect to.+A stateless Cloudflare Worker in front of it only authenticates requests and routes them to your cloud region; it does not store any sensitive data.### Using self-hosted instances-If you're using a self-hosted instance of PostHog, you can specify a custom base URL by adding the `POSTHOG_BASE_URL` [environment variable](https://developers.cloudflare.com/workers/configuration/environment-variables) when running the MCP server locally or on your own infrastructure, e.g. `POSTHOG_BASE_URL=https://posthog.example.com`+If you're using a self-hosted instance of PostHog, you can specify a custom base URL by setting the `POSTHOG_API_BASE_URL` environment variable when running the MCP server locally or on your own infrastructure, e.g. `POSTHOG_API_BASE_URL=https://posthog.example.com`# Development-To run the MCP server locally, run the following command:+To run the MCP server (Hono on Node) locally, run the following command:```bashpnpm run dev```-And replace `https://mcp.posthog.com/mcp` with `http://localhost:8787/mcp` in the MCP configuration.+Or use `bin/start-mcp-server` from the repo root, which also bootstraps `.env` and sets Redis/port defaults.+Then replace `https://mcp.posthog.com/mcp` with `http://localhost:8787/mcp` in the MCP configuration.-### Hono runtime (Node)+The server defaults to port **8787**, reads config from `.env` (see `.env.example`), and expects a local Redis on port `6379` for session state; production deployments must set `REDIS_URL` to a TLS-encrypted `rediss://` endpoint.-Alongside the Cloudflare Workers entry point, the same MCP code runs on Node via Hono — this is what ships to our k8s clusters. Useful locally when you want a CF-runtime-free debugger, fewer Wrangler quirks, or to repro a k8s-only bug.+### Edge-proxy worker (Cloudflare)++In production, a thin Cloudflare Worker sits in front of the Hono deployments as a stateless edge router: it serves the OAuth metadata endpoints, validates tokens, resolves the caller's cloud region, and proxies `/mcp` traffic to `mcp.us.posthog.com` / `mcp.eu.posthog.com`.+It does not serve the MCP protocol itself - see [ARCHITECTURE.md](ARCHITECTURE.md).+To run just the worker locally:```bash-pnpm run dev:hono+pnpm run dev:proxy```-Defaults to port **8787**, reads config from `.env` (Node-only — separate from `.dev.vars`, which Wrangler reads), and expects a local Redis on port `6379` (used in place of Durable Objects for session state) for local development; production deployments must set `REDIS_URL` to a TLS-encrypted `rediss://` endpoint. Same routes as the CF server — point your client at `http://localhost:8787/mcp`.--`bin/start-mcp-server` runs the Wrangler/CF version by default; set `MCP_RUNTIME=hono` to start the Hono runtime instead.-### Developing with local resourcesTo develop with warm loading for MCP resources (workflows, prompts, examples):1. Start the [context-mill](https://github.com/PostHog/context-mill) dev server: `cd ../context-mill && npm run dev`-2. Start the MCP server with local resources: `pnpm run dev:local-resources`+2. Start the MCP server with local resources: `pnpm run dev:local-resources` (runs `bin/start-mcp-server` with `POSTHOG_MCP_LOCAL_SKILLS_URL` pointed at context-mill)Changes in the examples repo will be reflected on the next request.@@ -352,9 +354,9 @@ This repository is organized to support multiple language implementations:### Development Commands-- `pnpm run dev` - Start development server-- `pnpm run schema:build:json` - Generate JSON schema for other language implementations-- `pnpm run lint && pnpm run format` - Format and lint code+- `pnpm run dev` - Start the MCP development server+- `pnpm run dev:proxy` - Start the edge-proxy worker (wrangler)+- `pnpm run format` - Format and lint code### Adding New Tools@@ -362,12 +364,7 @@ See the [tools documentation](typescript/src/tools/README.md) for a guide on add### Environment variables-- Create `.dev.vars` in the root-- Add Inkeep API key to enable `docs-search` tool (see `Inkeep API key - mcp`)--```bash-INKEEP_API_KEY="..."-```+Copy `.env.example` to `.env` in the root and adjust the values as needed.### Configuring the Model Context Protocol Inspectordiff --git a/services/mcp/package.json b/services/mcp/package.jsonindex 003920abd7bd..8dd1274b4d89 100644--- a/services/mcp/package.json+++ b/services/mcp/package.json@@ -18,15 +18,15 @@"build:ui-apps": "pnpm run build:quill && pnpm run generate:ui-apps && tsx scripts/build-ui-apps.ts","build:ui-apps:watch": "pnpm run build:quill && pnpm run generate:ui-apps && tsx scripts/build-ui-apps.ts --watch","build": "pnpm run build:ui-apps",- "dev": "wrangler dev",- "dev:local-resources": "wrangler dev --var POSTHOG_MCP_LOCAL_SKILLS_URL:http://localhost:8765/skills-mcp-resources.zip",+ "dev": "tsx watch --include=scripts --include=.env scripts/dev-hono.ts",+ "dev:proxy": "wrangler dev",+ "dev:local-resources": "POSTHOG_MCP_LOCAL_SKILLS_URL=http://localhost:8765/skills-mcp-resources.zip ../../bin/start-mcp-server","deploy": "wrangler deploy","cf-typegen": "wrangler types","inspector": "npx @modelcontextprotocol/inspector npx -y mcp-remote@latest http://localhost:8787/mcp","build:hono": "tsx scripts/build-hono.ts","build:cli": "tsx scripts/build-cli.ts","build:cli:release": "tsx scripts/build-cli-release.ts",- "dev:hono": "tsx watch --include=scripts --include=.dev.vars --include=.env scripts/dev-hono.ts","test": "vitest","test:integration": "vitest run --config vitest.integration.config.mts","test:hono": "vitest run --config vitest.hono.config.mts",diff --git a/services/mcp/scripts/build-ui-apps.ts b/services/mcp/scripts/build-ui-apps.tsindex 5a0877588ee9..7c5fe9718979 100644--- a/services/mcp/scripts/build-ui-apps.ts+++ b/services/mcp/scripts/build-ui-apps.ts@@ -21,12 +21,17 @@ import { discoverApps, MCP_ROOT_DIR, ROOT_DIR } from './utils'// Where to store the built filesconst OUT_DIR = resolve(MCP_ROOT_DIR, 'public/ui-apps')-// Load environment variables from .dev.vars (Cloudflare convention)-const devVarsPath = resolve(MCP_ROOT_DIR, '.dev.vars')-if (existsSync(devVarsPath)) {- const output = dotenvConfig({ path: devVarsPath })+// Load environment variables from .env (see .env.example)+const dotEnvPath = resolve(MCP_ROOT_DIR, '.env')+if (existsSync(dotEnvPath)) {+ const output = dotenvConfig({ path: dotEnvPath })const loadedKeys = Object.keys(output.parsed || {})- console.info('📝 Loaded environment from .dev.vars', loadedKeys)+ console.info('📝 Loaded environment from .env', loadedKeys)+} else if (existsSync(resolve(MCP_ROOT_DIR, '.dev.vars'))) {+ console.warn(+ '⚠️ Support for `.dev.vars` was removed - move your local config to `.env` (see .env.example). ' ++ 'Building with fallback values (no analytics token).'+ )}function buildAppAsync(appName: string): Promise<void> {diff --git a/services/mcp/scripts/dev-hono.ts b/services/mcp/scripts/dev-hono.tsindex 1019dfbc25ef..92259ba52876 100644--- a/services/mcp/scripts/dev-hono.ts+++ b/services/mcp/scripts/dev-hono.ts@@ -9,19 +9,27 @@ import { resolve } from 'path'import { copyInstructions } from './copy-instructions'import { honoEsbuildOptions, honoOutfile } from './hono-esbuild-config'-// Load the same local-dev config the Workers (wrangler) runtime uses, so-// hono and wrangler boot with the same env. Wrangler reads `.dev.vars`-// natively; in hono mode we have to load it ourselves. `.env` (if present)-// still wins because it's the more conventional override slot.-const dotDevVars = resolve(process.cwd(), '.dev.vars')-if (existsSync(dotDevVars)) {- process.loadEnvFile(dotDevVars)-}+// `.env` is the single local-dev env file (see .env.example). Wrangler reads+// it natively too (falling back from `.dev.vars`), so hono and the edge-proxy+// worker boot with the same env.const dotEnv = resolve(process.cwd(), '.env')if (existsSync(dotEnv)) {process.loadEnvFile(dotEnv)}+// Without these the server boots but misbehaves subtly (OAuth metadata+// advertises production, UI app resources aren't registered) - surface the+// misconfig loudly, especially for setups still holding config in the+// removed `.dev.vars` file.+const requiredVars = ['POSTHOG_API_BASE_URL', 'MCP_APPS_BASE_URL']+const missingVars = requiredVars.filter((name) => !process.env[name])+if (missingVars.length > 0) {+ console.warn(+ `[dev-hono] missing required env var(s): ${missingVars.join(', ')}. ` ++ 'Support for `.dev.vars` was removed - move your local config to `.env` (see .env.example).'+ )+}+copyInstructions()// flox sets SSL_CERT_FILE; Node's TLS layer only reads NODE_EXTRA_CA_CERTS.diff --git a/services/mcp/vitest.config.mts b/services/mcp/vitest.config.mtsindex ede36fd41984..f63025b0994f 100644--- a/services/mcp/vitest.config.mts+++ b/services/mcp/vitest.config.mts@@ -17,7 +17,8 @@ const markdownLoader = {// Two projects run under a single `pnpm test` invocation:// - `unit` → fast Node-pool suite (default pool, ~2s)-// - `workers` → DO/runtime integration via @cloudflare/vitest-pool-workers+// - `workers` → edge-proxy worker entry-point HTTP behavior via+// @cloudflare/vitest-pool-workers// Integration tests that need a real PostHog backend stay in their own// config (vitest.integration.config.mts) — they boot the full stack and// aren't suitable for the default run.diff --git a/services/mcp/vitest.workers.config.mts b/services/mcp/vitest.workers.config.mtsindex 196d0a655bea..3a394cb77c5e 100644--- a/services/mcp/vitest.workers.config.mts+++ b/services/mcp/vitest.workers.config.mts@@ -19,7 +19,7 @@ export default defineConfig({wrangler: { configPath: './wrangler.jsonc' },miniflare: {bindings: {- // Override secrets loaded from .dev.vars. Empty values+ // Override secrets loaded from .env. Empty values// make init()'s analytics / observability paths short-// circuit cleanly.POSTHOG_API_BASE_URL: '',