Skip to main content
Glama
mako10k

Web Proxy MCP Server

by mako10k

proxy_analyze_traffic

Analyzes HTTP/HTTPS traffic patterns and statistics by domain, method, status, or hour, enabling detailed insights into web proxy activity for informed decision-making.

Instructions

Analyze captured traffic patterns and statistics

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
domainNoAnalyze specific domain only
groupByNoGroup analysis results bydomain
timeframeNoTime frame for analysis24h

Implementation Reference

  • Tool handler implementation in ToolHandlers._handleAnalysisTool switch case. Validates arguments earlier, calls TrafficAnalyzer.analyzeTraffic with parameters, formats and returns the analysis as text content.
    case 'proxy_analyze_traffic': if (!this.trafficAnalyzer) { return { error: "Traffic analyzer not available", isError: true }; } const analysis = this.trafficAnalyzer.analyzeTraffic({ domain: args.domain, timeframe: args.timeframe, groupBy: args.groupBy }); return { content: [{ type: "text", text: `📊 Traffic Analysis (${args.timeframe})\n\n${JSON.stringify(analysis, null, 2)}` }] };
  • Tool definition and input schema definition in the exported TOOLS object, used for validation and MCP tool listing.
    proxy_analyze_traffic: { name: "proxy_analyze_traffic", description: "Analyze captured traffic patterns and statistics", inputSchema: { type: "object", properties: { domain: { type: "string", description: "Analyze specific domain only" }, timeframe: { type: "string", enum: ["1h", "24h", "7d", "30d", "all"], description: "Time frame for analysis", default: "24h" }, groupBy: { type: "string", enum: ["domain", "method", "status", "hour"], description: "Group analysis results by", default: "domain" } } } },
  • Core analysis logic in TrafficAnalyzer class. Filters entries by time/domain, computes summary statistics (requests, domains, avg time, error rate), groups by specified field using _groupEntries.
    analyzeTraffic(options = {}) { const entries = this.getEntries({ domain: options.domain, since: this._getTimeframeSince(options.timeframe || '24h') }); if (entries.length === 0) { return { summary: { totalRequests: 0, uniqueDomains: 0, timeframe: options.timeframe || '24h' } }; } const analysis = { summary: { totalRequests: entries.length, uniqueDomains: new Set(entries.map(e => e.domain)).size, timeframe: options.timeframe || '24h', avgResponseTime: this._calculateAverage(entries.map(e => e.responseTime)), errorRate: entries.filter(e => e.statusCode >= 400).length / entries.length }, grouped: this._groupEntries(entries, options.groupBy || 'domain') }; return analysis; }

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