Skip to main content
Glama
mako10k

Web Proxy MCP Server

by mako10k

proxy_export_config

Export the current proxy configuration, including optional traffic logs, to a specified file for backup or analysis. Simplifies managing proxy settings within the Web Proxy MCP Server environment.

Instructions

Export current proxy configuration to file

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filepathNoOutput file path
includeTrafficLogNoInclude traffic log in export

Implementation Reference

  • Tool handler case for 'proxy_export_config' that invokes targetManager.exportToFile with optional traffic log and formats the response.
    case 'proxy_export_config': const exported = await this.targetManager.exportToFile( args.filepath, args.includeTrafficLog && this.trafficAnalyzer ? { trafficLog: this.trafficAnalyzer.getAllEntries() } : undefined ); return { content: [{ type: "text", text: `📤 Configuration exported to ${exported.filepath}\nTargets: ${exported.targetCount}\nFile size: ${exported.fileSize} bytes` }] };
  • Input schema definition for the proxy_export_config tool, specifying parameters filepath and includeTrafficLog.
    proxy_export_config: { name: "proxy_export_config", description: "Export current proxy configuration to file", inputSchema: { type: "object", properties: { filepath: { type: "string", description: "Output file path" }, includeTrafficLog: { type: "boolean", description: "Include traffic log in export", default: false } } } },
  • Core implementation of configuration export in TargetManager class, writes JSON config including targets and optional additional data to the specified filepath.
    async exportToFile(filepath, additionalData = {}) { try { const fs = await import('fs/promises'); const path = await import('path'); // Ensure directory exists const dir = path.dirname(filepath); await fs.mkdir(dir, { recursive: true }); const exportData = { version: '1.0', exportedAt: new Date().toISOString(), targets: Object.fromEntries(this.targets), ...additionalData }; const content = JSON.stringify(exportData, null, 2); await fs.writeFile(filepath, content); return { filepath, targetCount: this.targets.size, fileSize: content.length }; } catch (error) { throw new Error(`Failed to export to file: ${error.message}`); } }

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