Skip to main content
Glama

toggleHttpsInterception

Enable or disable HTTPS interception to manage and monitor network requests through the Whistle proxy server. Control secure traffic analysis for improved debugging and rule management.

Instructions

启用或禁用HTTPS拦截

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
enabledYes是否启用HTTPS拦截

Implementation Reference

  • src/index.ts:350-360 (registration)
    Registers the 'toggleHttpsInterception' MCP tool with name, description, input schema, and handler function that proxies to WhistleClient.
    server.addTool({ name: "toggleHttpsInterception", description: "启用或禁用HTTPS拦截", parameters: z.object({ enabled: z.boolean().describe("是否启用HTTPS拦截"), }), execute: async (args) => { const result = await whistleClient.toggleHttpsInterception(args.enabled); return formatResponse(result); }, });
  • MCP tool handler (execute function) that calls the underlying WhistleClient method and formats the response.
    execute: async (args) => { const result = await whistleClient.toggleHttpsInterception(args.enabled); return formatResponse(result); },
  • Zod schema defining the input parameter 'enabled' as boolean for toggling HTTPS interception.
    parameters: z.object({ enabled: z.boolean().describe("是否启用HTTPS拦截"), }),
  • Core helper method in WhistleClient class that performs the actual HTTP POST to toggle HTTPS interception in Whistle server.
    async toggleHttpsInterception(enabled: boolean): Promise<any> { const formData = new URLSearchParams(); formData.append("clientId", `${Date.now()}-${Math.floor(Math.random() * 100)}`); formData.append("interceptHttpsConnects", enabled ? "1" : "0"); const response = await axios.post( `${this.baseUrl}/cgi-bin/intercept-https-connects`, formData, { headers: { "Content-Type": "application/x-www-form-urlencoded", }, } ); return response.data; }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/7gugu/whistle-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server