proxy_transparent_status
Retrieve the current status of the transparent proxy listener, including its port and traffic count.
Instructions
Get status of the transparent proxy listener including port and traffic count.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/transparent.ts:59-71 (handler)The handler function for the 'proxy_transparent_status' tool. Registers an MCP tool that returns the status of the transparent proxy listener (running state, port, and traffic count) by calling proxyManager.getTransparentStatus().
server.tool( "proxy_transparent_status", "Get status of the transparent proxy listener including port and traffic count.", {}, async () => { return { content: [{ type: "text", text: JSON.stringify({ status: "success", ...proxyManager.getTransparentStatus() }), }], }; }, ); - src/tools/transparent.ts:62-62 (schema)The schema for the 'proxy_transparent_status' tool is empty ({}), indicating it takes no input parameters.
{}, - src/tools/transparent.ts:10-72 (registration)The registration function 'registerTransparentTools' is exported and called in src/index.ts at line 72 to register all transparent proxy tools including 'proxy_transparent_status'.
export function registerTransparentTools(server: McpServer): void { server.tool( "proxy_start_transparent", "Start the transparent proxy listener. Receives iptables-redirected traffic (no CONNECT tunnels). Shares the same CA cert, rules, and traffic buffer as the explicit proxy. The explicit proxy must be started first.", { port: z.number().optional().default(8443).describe("Port for the transparent listener (default: 8443)"), }, async ({ port }) => { try { const result = await proxyManager.startTransparent(port); const localIP = getLocalIP(); return { content: [{ type: "text", text: JSON.stringify({ status: "success", port: result.port, instructions: [ `Transparent listener active on ${localIP}:${result.port}`, "Traffic will be captured in the same buffer as the explicit proxy (tagged as 'transparent')", ], }), }], }; } catch (e) { return { content: [{ type: "text", text: JSON.stringify({ status: "error", error: String(e) }) }] }; } }, ); server.tool( "proxy_stop_transparent", "Stop the transparent proxy listener.", {}, async () => { try { await proxyManager.stopTransparent(); return { content: [{ type: "text", text: JSON.stringify({ status: "success", message: "Transparent proxy stopped." }), }], }; } catch (e) { return { content: [{ type: "text", text: JSON.stringify({ status: "error", error: String(e) }) }] }; } }, ); server.tool( "proxy_transparent_status", "Get status of the transparent proxy listener including port and traffic count.", {}, async () => { return { content: [{ type: "text", text: JSON.stringify({ status: "success", ...proxyManager.getTransparentStatus() }), }], }; }, ); } - src/state.ts:479-485 (helper)The helper method 'getTransparentStatus()' on the ProxyManager class, which returns the status object consumed by the handler, including running state, port, and trafficCount.
getTransparentStatus(): object { return { running: this._transparentRunning, port: this.transparentPort, trafficCount: this.transparentTrafficCount, }; } - src/index.ts:72-72 (registration)The call site in the entry point where registerTransparentTools is invoked, registering all transparent proxy tools on the MCP server.
registerTransparentTools(server);