Skip to main content
Glama

intercept_existing_terminal

Generate shell commands to intercept HTTP(S) traffic from processes launched in an existing terminal by routing through a specified proxy port.

Instructions

Get a command to run in an existing terminal to start intercepting HTTP(S) traffic from processes launched in that terminal. Returns shell-specific commands for bash, zsh, fish, etc.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
proxyPortYesProxy port to route traffic through

Implementation Reference

  • Tool registration and handler definition for 'intercept_existing_terminal', which uses the client to activate the interceptor.
    server.registerTool(
      'intercept_existing_terminal',
      {
        title: 'Intercept Existing Terminal',
        description: 'Get a command to run in an existing terminal to start intercepting HTTP(S) traffic from processes launched in that terminal. Returns shell-specific commands for bash, zsh, fish, etc.',
        inputSchema: z.object({
          proxyPort: z.number().describe('Proxy port to route traffic through'),
        }),
      },
      async ({ proxyPort }) => jsonResult(await client.activateInterceptor('existing-terminal', proxyPort))
    );
  • The underlying HttpToolkitClient implementation for activating an interceptor.
    async activateInterceptor(
      id: string,
      proxyPort: number,
      options?: unknown
    ): Promise<{ result: { success: boolean; metadata?: unknown } }> {
      return this.request(
        'POST',
        `/interceptors/${encodeURIComponent(id)}/activate/${proxyPort}`,
        options || {}
      );
    }

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/fdciabdul/httptoolkit-mcp'

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