Skip to main content
Glama

tech_detection

Identify technologies and frameworks used by target websites to support security assessments and penetration testing workflows.

Instructions

Detect technologies used by target website

Input Schema

NameRequiredDescriptionDefault
urlYesTarget URL

Input Schema (JSON Schema)

{ "properties": { "url": { "description": "Target URL", "type": "string" } }, "required": [ "url" ], "type": "object" }

Implementation Reference

  • Main handler function for the 'tech_detection' tool. Fetches the target URL using axios, parses response with cheerio, detects technologies from headers/HTML/meta/scripts using helper methods, returns ScanResult.
    async techDetection(url: string): Promise<ScanResult> { try { const technologies: TechDetectionResult[] = []; // Make HTTP request to analyze headers and content const response = await axios.get(url, { timeout: 10000, headers: { 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36' } }); const headers = response.headers; const html = response.data; const $ = cheerio.load(html); // Detect technologies from headers this.detectFromHeaders(headers, technologies); // Detect technologies from HTML content this.detectFromHTML($, technologies); // Detect technologies from meta tags this.detectFromMetaTags($, technologies); // Detect technologies from script sources this.detectFromScripts($, technologies); return { target: url, timestamp: new Date().toISOString(), tool: 'tech_detection', results: { technologies, headers: headers, status_code: response.status, server_info: { server: headers.server || 'Unknown', powered_by: headers['x-powered-by'] || 'Unknown', generator: $('meta[name="generator"]').attr('content') || 'Unknown' } }, status: 'success' }; } catch (error) { return { target: url, timestamp: new Date().toISOString(), tool: 'tech_detection', results: {}, status: 'error', error: error instanceof Error ? error.message : String(error) }; } }
  • Interface defining the structure of detected technologies returned by tech_detection.
    export interface TechDetectionResult { technology: string; version?: string; confidence: number; category: string; }
  • MCP tool input schema validation for tech_detection tool.
    inputSchema: { type: "object", properties: { url: { type: "string", description: "Target URL" } }, required: ["url"]
  • src/index.ts:109-119 (registration)
    Tool registration in MCP server's listTools handler, defining name, description, and input schema.
    { name: "tech_detection", description: "Detect technologies used by target website", inputSchema: { type: "object", properties: { url: { type: "string", description: "Target URL" } }, required: ["url"] } },
  • src/index.ts:511-512 (registration)
    Dispatch handler in MCP server's CallToolRequestSchema that routes calls to reconTools.techDetection.
    case "tech_detection": return respond(await this.reconTools.techDetection(args.url));
  • Helper method to detect web servers (Apache, Nginx, IIS) and backend technologies (PHP, ASP.NET) from HTTP response headers.
    private detectFromHeaders(headers: any, technologies: TechDetectionResult[]): void { // Server detection if (headers.server) { const server = headers.server.toLowerCase(); if (server.includes('apache')) { technologies.push({ technology: 'Apache HTTP Server', version: this.extractVersion(server, 'apache'), confidence: 100, category: 'Web Server' }); } else if (server.includes('nginx')) { technologies.push({ technology: 'Nginx', version: this.extractVersion(server, 'nginx'), confidence: 100, category: 'Web Server' }); } else if (server.includes('iis')) { technologies.push({ technology: 'Microsoft IIS', version: this.extractVersion(server, 'iis'), confidence: 100, category: 'Web Server' }); } } // X-Powered-By detection if (headers['x-powered-by']) { const poweredBy = headers['x-powered-by'].toLowerCase(); if (poweredBy.includes('php')) { technologies.push({ technology: 'PHP', version: this.extractVersion(poweredBy, 'php'), confidence: 100, category: 'Programming Language' }); } else if (poweredBy.includes('asp.net')) { technologies.push({ technology: 'ASP.NET', version: this.extractVersion(poweredBy, 'asp.net'), confidence: 100, category: 'Web Framework' }); } } }

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/adriyansyah-mf/mcp-pentest'

If you have feedback or need assistance with the MCP directory API, please join our Discord server