: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
feat(tasks): resolve sandbox MCP URL on hosted dev (#63205)
Vojta Bartošee46dfb14e23
diff --git a/products/tasks/backend/temporal/process_task/tests/test_utils.py b/products/tasks/backend/temporal/process_task/tests/test_utils.pyindex 202d1653db96..acaadc7e0097 100644--- a/products/tasks/backend/temporal/process_task/tests/test_utils.py+++ b/products/tasks/backend/temporal/process_task/tests/test_utils.py@@ -36,6 +36,7 @@ class TestGetSandboxMcpConfigs(TestCase):("https://app.posthog.com", "https://mcp.posthog.com/mcp"),("https://us.posthog.com", "https://mcp.posthog.com/mcp"),("https://eu.posthog.com", "https://mcp-eu.posthog.com/mcp"),+ ("https://app.dev.posthog.dev", "https://mcp.dev.posthog.dev/mcp"),])def test_derives_mcp_config_from_site_url(self, site_url: str, expected_mcp_url: str) -> None:diff --git a/products/tasks/backend/temporal/process_task/utils.py b/products/tasks/backend/temporal/process_task/utils.pyindex 6136d00e73e9..1b79983f7530 100644--- a/products/tasks/backend/temporal/process_task/utils.py+++ b/products/tasks/backend/temporal/process_task/utils.py@@ -326,6 +326,7 @@ def get_sandbox_ph_mcp_configs(Uses SANDBOX_MCP_URL if explicitly set, otherwise derives it from SITE_URL:- app.posthog.com / us.posthog.com → https://mcp.posthog.com/mcp- eu.posthog.com → https://mcp-eu.posthog.com/mcp+ - app.dev.posthog.dev → https://mcp.dev.posthog.dev/mcp- Other hosts → empty list (MCP not available)"""url = _resolve_mcp_url()@@ -355,6 +356,8 @@ def _resolve_mcp_url() -> str | None:return "https://mcp.posthog.com/mcp"if hostname == "eu.posthog.com":return "https://mcp-eu.posthog.com/mcp"+ if hostname == "app.dev.posthog.dev":+ return "https://mcp.dev.posthog.dev/mcp"# Local dev: point to the local wrangler dev MCP server via# host.docker.internal, since the sandbox runs in Docker.