Skip to main content
Glama
mako10k

Web Proxy MCP Server

by mako10k

proxy_analyze_traffic

Analyze captured HTTP/HTTPS traffic patterns and statistics to monitor proxy activity, identify trends, and group data by domain, method, status, or time period.

Instructions

Analyze captured traffic patterns and statistics

Input Schema

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

Implementation Reference

  • Tool handler case that validates args, calls trafficAnalyzer.analyzeTraffic(), and formats the response.
    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 with name, description, and inputSchema for validation.
    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 implementation of traffic analysis: filters entries, computes summary stats and grouped data.
    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