Skip to main content
Glama

interceptor_spawn

Run commands with proxy environment variables configured to route traffic through an MITM proxy for network traffic capture and modification.

Instructions

Spawn a command with proxy env vars pre-configured (HTTP_PROXY, HTTPS_PROXY, SSL_CERT_FILE, NODE_EXTRA_CA_CERTS, CURL_CA_BUNDLE, and 15+ more). Traffic automatically routes through the MITM proxy.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
commandYesCommand to run (e.g., 'curl', 'node', 'python')
argsNoCommand arguments
cwdNoWorking directory (default: current)
envNoAdditional env vars to set

Implementation Reference

  • The 'interceptor_spawn' MCP tool handler implementation. It uses `interceptorManager.activate("terminal", ...)` to spawn a process with proxied environment variables.
    server.tool(
      "interceptor_spawn",
      "Spawn a command with proxy env vars pre-configured (HTTP_PROXY, HTTPS_PROXY, SSL_CERT_FILE, NODE_EXTRA_CA_CERTS, CURL_CA_BUNDLE, and 15+ more). Traffic automatically routes through the MITM proxy.",
      {
        command: z.string().describe("Command to run (e.g., 'curl', 'node', 'python')"),
        args: z.array(z.string()).optional().default([]).describe("Command arguments"),
        cwd: z.string().optional().describe("Working directory (default: current)"),
        env: z.record(z.string()).optional().describe("Additional env vars to set"),
      },
      async ({ command, args, cwd, env }) => {
        try {
          const proxyInfo = requireProxy();
          const result = await interceptorManager.activate("terminal", {
            ...proxyInfo,
            command,
            args,
            cwd,
            env,
          });
          return {
            content: [{
              type: "text",
              text: JSON.stringify({ status: "success", ...result }),
            }],
          };
        } catch (e) {
          return { content: [{ type: "text", text: JSON.stringify({ status: "error", error: errorToString(e) }) }] };
        }
      },
    );

Tool Definition Quality

Score is being calculated. Check back soon.

Install Server

Other Tools

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/yfe404/proxy-mcp'

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