Skip to main content
Glama
mako10k

Web Proxy MCP Server

by mako10k

proxy_get_pac_file

Retrieve the Proxy Auto-Configuration (PAC) file content for automated browser proxy setup, specifying the proxy server host and port for integration with Web Proxy MCP Server.

Instructions

Get the current PAC (Proxy Auto-Configuration) file content

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
proxyHostNoProxy server hostlocalhost
proxyPortNoProxy server port

Implementation Reference

  • Schema definition for the proxy_get_pac_file tool including input validation for proxy host and port.
    proxy_get_pac_file: { name: "proxy_get_pac_file", description: "Get the current PAC (Proxy Auto-Configuration) file content", inputSchema: { type: "object", properties: { proxyHost: { type: "string", description: "Proxy server host", default: "localhost" }, proxyPort: { type: "number", description: "Proxy server port", default: 8080 } } } },
  • Tool handler that calls targetManager.generatePacFile and formats the response with PAC content.
    case 'proxy_get_pac_file': const pacContent = this.targetManager.generatePacFile( args.proxyHost, args.proxyPort ); return { content: [{ type: "text", text: `📄 PAC File Content:\n\n\`\`\`javascript\n${pacContent}\n\`\`\`` }] };
  • Generates the actual PAC file JavaScript content based on currently enabled proxy targets, including domain matching logic for subdomains.
    generatePacFile(proxyHost = 'localhost', proxyPort = 8080) { const enabledTargets = Array.from(this.targets.values()) .filter(target => target.enabled); const domainChecks = enabledTargets.map(target => { if (target.includeSubdomains) { return ` if (host === "${target.domain}" || host.endsWith(".${target.domain}")) return "PROXY ${proxyHost}:${proxyPort}";`; } else { return ` if (host === "${target.domain}") return "PROXY ${proxyHost}:${proxyPort}";`; } }).join('\n'); return `function FindProxyForURL(url, host) { host = host.toLowerCase(); // Proxy specific domains through our proxy server ${domainChecks} // All other traffic goes direct return "DIRECT"; } // Generated by Web Proxy MCP Server // Last updated: ${new Date().toISOString()} // Active targets: ${enabledTargets.length}`; }

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