Skip to content

: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.

fix(mcp): restore 8787 as default port for local dev (#59904)

Joshua Snyder388c95ee8bc2
diff --git a/bin/start-mcp-server b/bin/start-mcp-server
index 06dfd2f669dc..8f7f0e88816b 100755
--- a/bin/start-mcp-server
+++ b/bin/start-mcp-server
@@ -9,7 +9,7 @@ pnpm install --frozen-lockfile
if [ "$RUNTIME" = "hono" ]; then
export REDIS_URL="${REDIS_URL:-redis://localhost:6379}"
- export PORT="${PORT:-3030}"
+ export PORT="${PORT:-8787}"
exec pnpm run dev:hono
else
if [ ! -f .dev.vars ]; then
diff --git a/services/mcp/README.md b/services/mcp/README.md
index d7ee15cd317a..35c42dd3fd96 100644
--- a/services/mcp/README.md
+++ b/services/mcp/README.md
@@ -327,7 +327,7 @@ Alongside the Cloudflare Workers entry point, the same MCP code runs on Node via
pnpm run dev:hono
```
-Defaults to port **3030**, 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:3030/mcp`.
+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.