Skip to main content
Glama

intercept_docker_container

Intercept and inspect HTTP(S) traffic from Docker containers by injecting proxy settings to capture all outgoing web traffic for debugging purposes.

Instructions

Intercept all HTTP(S) traffic from a running Docker container. Injects proxy settings into the container to capture all outgoing HTTP traffic.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
proxyPortYesProxy port to route traffic through
containerIdYesDocker container ID to attach to. Use get_interceptor_metadata with id "docker-attach" to list available containers.

Implementation Reference

  • src/index.ts:192-204 (registration)
    Tool registration and handler definition for 'intercept_docker_container', which uses the 'client.activateInterceptor' helper to attach to a docker container.
    server.registerTool(
      'intercept_docker_container',
      {
        title: 'Attach to Docker Container',
        description: 'Intercept all HTTP(S) traffic from a running Docker container. Injects proxy settings into the container to capture all outgoing HTTP traffic.',
        inputSchema: z.object({
          proxyPort: z.number().describe('Proxy port to route traffic through'),
          containerId: z.string().describe('Docker container ID to attach to. Use get_interceptor_metadata with id "docker-attach" to list available containers.'),
        }),
      },
      async ({ proxyPort, containerId }) =>
        jsonResult(await client.activateInterceptor('docker-attach', proxyPort, { containerId }))
    );

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