Skip to main content
Glama

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
NameRequiredDescriptionDefault
proxyPortYesProxy port to route traffic through
targetPidYesPID 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 }))
    );

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