Skip to main content
Glama
mako10k

Web Proxy MCP Server

by mako10k

proxy_update_target

Modify domain configurations in the Web Proxy MCP Server to enable/disable targets, capture headers, or capture body data for monitoring and analysis.

Instructions

Update target domain configuration

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
captureBodyNoEnable/disable body capture
captureHeadersNoEnable/disable header capture
descriptionNoNew description
domainYesDomain to update
enabledNoEnable/disable target

Implementation Reference

  • Main handler logic for the proxy_update_target tool. Constructs update object from args, calls TargetManager.updateTarget, and formats response.
    case 'proxy_update_target': const updates = {}; if ('enabled' in args) updates.enabled = args.enabled; if ('description' in args) updates.description = args.description; if ('captureHeaders' in args) updates.captureHeaders = args.captureHeaders; if ('captureBody' in args) updates.captureBody = args.captureBody; const updated = this.targetManager.updateTarget(args.domain, updates); return { content: [{ type: "text", text: `Target updated: ${args.domain}\nStatus: ${updated ? 'success' : 'not found'}\nUpdates: ${JSON.stringify(updates, null, 2)}` }] };
  • Input schema validation for proxy_update_target tool parameters.
    proxy_update_target: { name: "proxy_update_target", description: "Update target domain configuration", inputSchema: { type: "object", properties: { domain: { type: "string", description: "Domain to update" }, description: { type: "string", description: "New description" }, enabled: { type: "boolean", description: "Enable/disable target" }, captureHeaders: { type: "boolean", description: "Enable/disable header capture" }, captureBody: { type: "boolean", description: "Enable/disable body capture" } }, required: ["domain"] } },
  • index.js:77-98 (registration)
    MCP server request handler for tool calls, which dispatches to ToolHandlers.handleTool for execution.
    this.server.setRequestHandler(CallToolRequestSchema, async (request) => { const { name, arguments: args } = request.params; try { const result = await this.toolHandlers.handleTool(name, args || {}); if (result.isError) { throw new McpError( ErrorCode.InternalError, result.error ); } return result; } catch (error) { console.error(`Tool error [${name}]:`, error.message); throw new McpError( ErrorCode.InternalError, `Tool execution failed: ${error.message}` ); }
  • index.js:66-73 (registration)
    MCP server request handler for listing tools, exposing proxy_update_target schema via TOOLS object.
    this.server.setRequestHandler(ListToolsRequestSchema, async () => { return { tools: Object.entries(TOOLS).map(([name, tool]) => ({ name, description: tool.description, inputSchema: tool.inputSchema })) };
  • Core updateTarget method in TargetManager that modifies the target config in memory and updates PAC file.
    updateTarget(domain, updates) { const target = this.targets.get(domain.toLowerCase()); if (!target) { return false; } // Apply updates if ('enabled' in updates) target.enabled = updates.enabled; if ('description' in updates) target.description = updates.description; if ('includeSubdomains' in updates) target.includeSubdomains = updates.includeSubdomains; if ('captureHeaders' in updates) target.captureHeaders = updates.captureHeaders; if ('captureBody' in updates) target.captureBody = updates.captureBody; target.lastModified = new Date(); this._updatePacFile(); return true; }

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