diff --git a/packages/playwright-core/src/tools/utils/mcp/http.ts b/packages/playwright-core/src/tools/utils/mcp/http.ts
index 4f81786960b3f..d6d97ab9e2460 100644
--- a/packages/playwright-core/src/tools/utils/mcp/http.ts
+++ b/packages/playwright-core/src/tools/utils/mcp/http.ts
@@ -22,6 +22,7 @@ import crypto from 'crypto';
import debug from 'debug';
import { SSEServerTransport } from '@modelcontextprotocol/sdk/server/sse.js';
import { StreamableHTTPServerTransport } from '@modelcontextprotocol/sdk/server/streamableHttp.js';
+import { isUnderTest } from '@utils/debug';
import { urlHostFromAddress } from '@utils/httpServer';
import { createHttpServer, startHttpServer } from '@utils/network';
import { ManualPromise } from '@isomorphic/manualPromise';
@@ -82,14 +83,7 @@ async function installHttpTransport(httpServer: http.Server, serverBackendFactor
}
const url = new URL(`http://localhost${req.url}`);
- if (url.pathname === '/killkillkill') {
- // Require POST plus a custom header to prevent cross-origin CSRF
- // (a browser-coerced GET or simple