proxy_clear_upstream
Removes the global upstream proxy to route traffic directly to target servers, restoring direct connections.
Instructions
Remove the global upstream proxy. Traffic will go directly to target servers.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/upstream.ts:36-53 (registration)The 'proxy_clear_upstream' tool is registered with the MCP server using the SDK's server.tool(). It takes no parameters, calls proxyManager.clearGlobalUpstream(), and returns a JSON success/error response.
server.tool( "proxy_clear_upstream", "Remove the global upstream proxy. Traffic will go directly to target servers.", {}, async () => { try { await proxyManager.clearGlobalUpstream(); return { content: [{ type: "text", text: JSON.stringify({ status: "success", message: "Global upstream cleared." }), }], }; } catch (e) { return { content: [{ type: "text", text: JSON.stringify({ status: "error", error: String(e) }) }] }; } }, ); - src/state.ts:521-524 (handler)The clearGlobalUpstream() method on ProxyManager sets globalUpstream to null and triggers a full rebuild of mockttp rules if the proxy is running.
async clearGlobalUpstream(): Promise<void> { this.globalUpstream = null; if (this._running) await this.rebuildMockttpRules(); }