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
| Name | Required | Description | Default |
|---|---|---|---|
| proxyPort | Yes | Proxy port to route traffic through | |
| containerId | Yes | Docker 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 })) );