Skip to main content
Glama
mako10k

Web Proxy MCP Server

by mako10k

proxy_list_targets

Filter and retrieve status of target domains for automated traffic monitoring and analysis using the Web Proxy MCP Server.

Instructions

List all target domains and their status

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
statusNoFilter targets by statusall

Implementation Reference

  • Defines the input schema and metadata for the proxy_list_targets tool, including optional status filter.
    proxy_list_targets: { name: "proxy_list_targets", description: "List all target domains and their status", inputSchema: { type: "object", properties: { status: { type: "string", enum: ["all", "active", "inactive"], description: "Filter targets by status", default: "all" } } } },
  • Tool handler case that executes proxy_list_targets by calling targetManager.listTargets and formatting the response as a formatted text list with stats.
    case 'proxy_list_targets': const targets = this.targetManager.listTargets(args.status); const targetList = targets.map(t => `• ${t.domain} (${t.status}) - ${t.description || 'No description'}` ).join('\n'); return { content: [{ type: "text", text: `📋 Proxy Targets (${targets.length})\n\n${targetList || 'No targets configured'}\n\nStats: ${JSON.stringify(this.targetManager.getStats(), null, 2)}` }] };
  • Core implementation of listTargets method in TargetManager class, which retrieves all targets from internal Map, computes status, and filters based on statusFilter.
    listTargets(statusFilter = 'all') { const targets = Array.from(this.targets.values()).map(target => ({ ...target, status: target.enabled ? 'active' : 'inactive' })); if (statusFilter === 'active') { return targets.filter(t => t.enabled); } else if (statusFilter === 'inactive') { return targets.filter(t => !t.enabled); } return targets; }
  • index.js:66-74 (registration)
    Registers all tools including proxy_list_targets for MCP ListToolsRequest by exposing TOOLS definitions.
    this.server.setRequestHandler(ListToolsRequestSchema, async () => { return { tools: Object.entries(TOOLS).map(([name, tool]) => ({ name, description: tool.description, inputSchema: tool.inputSchema })) }; });
  • index.js:77-99 (registration)
    Registers the generic tool call handler which dispatches to ToolHandlers.handleTool for executing proxy_list_targets and other tools.
    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}` ); } });

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