intercept_jvm
Intercept HTTP(S) traffic from running Java, Kotlin, or Clojure applications by attaching to their JVM processes for debugging and inspection.
Instructions
Attach to a running JVM process (Java, Kotlin, Clojure, etc.) to intercept all its HTTP(S) traffic. Uses Java agent attachment.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| proxyPort | Yes | Proxy port to route traffic through | |
| targetPid | Yes | PID of the JVM process. Use get_interceptor_metadata with id "attach-jvm" to list available JVM processes. |
Implementation Reference
- src/index.ts:297-309 (registration)The 'intercept_jvm' tool is registered in src/index.ts, where it takes proxyPort and targetPid as inputs and invokes client.activateInterceptor to perform the actual work.
server.registerTool( 'intercept_jvm', { title: 'Attach to JVM Process', description: 'Attach to a running JVM process (Java, Kotlin, Clojure, etc.) to intercept all its HTTP(S) traffic. Uses Java agent attachment.', inputSchema: z.object({ proxyPort: z.number().describe('Proxy port to route traffic through'), targetPid: z.string().describe('PID of the JVM process. Use get_interceptor_metadata with id "attach-jvm" to list available JVM processes.'), }), }, async ({ proxyPort, targetPid }) => jsonResult(await client.activateInterceptor('attach-jvm', proxyPort, { targetPid })) );