Skip to main content
Glama
mako10k

Web Proxy MCP Server

by mako10k

proxy_generate_setup

Generate browser and system proxy setup scripts to configure web traffic routing through a specified proxy server for monitoring and analysis.

Instructions

Generate browser and system proxy setup scripts

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
proxyHostNoProxy server hostlocalhost
proxyPortNoProxy server port
browsersNoBrowser types to generate setup for

Implementation Reference

  • MCP tool handler for 'proxy_generate_setup' that invokes BrowserSetup.generateAllSetups and returns generated files info with quick guide.
    case 'proxy_generate_setup':
      const setup = await this.browserSetup.generateAllSetups(
        args.proxyHost,
        args.proxyPort
      );
      
      const quickGuide = this.browserSetup.generateQuickSetup(
        args.proxyHost,
        args.proxyPort
      );
    
      return {
        content: [{
          type: "text",
          text: `✅ Browser setup scripts generated!\n\n${quickGuide}\n\nGenerated files:\n${Object.entries(setup.files).map(([type, file]) => `• ${file.filename} - ${file.description}`).join('\n')}`
        }]
      };
  • Tool schema definition including name, description, and inputSchema with defaults for proxy host, port, and browsers.
    proxy_generate_setup: {
      name: "proxy_generate_setup",
      description: "Generate browser and system proxy setup scripts",
      inputSchema: {
        type: "object",
        properties: {
          proxyHost: {
            type: "string",
            description: "Proxy server host",
            default: "localhost"
          },
          proxyPort: {
            type: "number",
            description: "Proxy server port",
            default: 8080
          },
          browsers: {
            type: "array",
            items: {
              type: "string",
              enum: ["chrome", "firefox", "curl", "system", "pac"]
            },
            description: "Browser types to generate setup for",
            default: ["chrome", "firefox", "pac"]
          }
        }
      }
    },
  • index.js:66-74 (registration)
    MCP server registration via ListToolsRequestHandler that exposes all tools from TOOLS object, including proxy_generate_setup.
    this.server.setRequestHandler(ListToolsRequestSchema, async () => {
      return {
        tools: Object.entries(TOOLS).map(([name, tool]) => ({
          name,
          description: tool.description,
          inputSchema: tool.inputSchema
        }))
      };
    });
  • Core helper function in BrowserSetup class that generates and saves setup scripts for PAC, Chrome, Firefox, cURL, and system proxy configurations.
    async generateAllSetups(proxyHost = 'localhost', proxyPort = 8080) {
      const scripts = {
        pac: await this.generatePacFile(proxyHost, proxyPort),
        chrome: this.generateChromeSetup(proxyHost, proxyPort),
        firefox: this.generateFirefoxSetup(proxyHost, proxyPort),
        curl: this.generateCurlSetup(proxyHost, proxyPort),
        system: this.generateSystemProxySetup(proxyHost, proxyPort)
      };
    
      // Create setup directory
      try {
        await fs.mkdir(this.setupDir, { recursive: true });
      } catch (error) {
        // Directory might already exist
      }
    
      // Write all scripts to files
      const files = {};
      for (const [type, content] of Object.entries(scripts)) {
        const filename = `${type}-proxy-setup.${this._getFileExtension(type)}`;
        const filepath = path.join(this.setupDir, filename);
        await fs.writeFile(filepath, content.content);
        files[type] = {
          filename,
          filepath,
          description: content.description
        };
      }
    
      return {
        proxyHost,
        proxyPort,
        targetCount: this.targetManager.getStats().enabled,
        files,
        generatedAt: new Date().toISOString()
      };
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states what the tool does but lacks critical details: it doesn't specify if this generates scripts for immediate use, requires specific permissions, affects system state, or includes rate limits. For a tool that likely creates files or configurations, this gap is significant.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the core purpose without unnecessary words. Every part of the sentence contributes directly to understanding the tool's function, making it highly concise and well-structured.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of generating proxy scripts, no annotations, and no output schema, the description is incomplete. It doesn't cover behavioral aspects like script format, storage location, or error handling, which are crucial for an agent to use this tool effectively in a proxy management context.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema fully documents parameters like 'proxyHost', 'proxyPort', and 'browsers'. The description adds no additional meaning beyond implying generation for multiple browser types, but it doesn't explain parameter interactions or default behaviors, resulting in a baseline score.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('generate') and resource ('browser and system proxy setup scripts'), making the purpose immediately understandable. However, it doesn't specifically differentiate this tool from sibling tools like 'proxy_export_config' or 'proxy_get_pac_file', which might also involve proxy configuration outputs, so it doesn't reach the highest clarity level.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites, such as whether a proxy server must be running, or compare it to sibling tools like 'proxy_export_config' for configuration export or 'proxy_get_pac_file' for PAC file retrieval, leaving the agent without context for selection.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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

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