quick_port_scan
Scan an IP address to identify open ports for security assessment and network analysis.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ip | Yes | IP address to perform a quick port scan on |
Implementation Reference
- src/tools/network-adv.ts:39-46 (handler)The actual implementation of the port scan logic using the HackerTarget API.
async scanPorts(ip: string): Promise<string> { try { const response = await fetch(`https://api.hackertarget.com/nmap/?q=${ip}`); return await response.text(); } catch (error) { throw new McpError(ErrorCode.InternalError, `Port Scan error: ${(error as Error).message}`); } } - src/index.ts:697-706 (registration)Registration of the quick_port_scan tool in the MCP server instance.
server.tool( "quick_port_scan", { ip: z.string().describe("IP address to perform a quick port scan on") }, async ({ ip }) => { const result = await netAdvClient.scanPorts(ip); return { content: [{ type: "text", text: result }], }; } );