zap.health_check
Verify ZAP security tool connectivity and operational status to ensure vulnerability testing readiness within the VulneraMCP bug bounty platform.
Instructions
Check if ZAP is running and accessible
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/zap.ts:39-56 (registration)Registers the zap.health_check MCP tool with input schema (no parameters) and handler that verifies ZAP client and delegates to ZAPClient.healthCheck()server.tool( 'zap.health_check', { description: 'Check if ZAP is running and accessible', inputSchema: { type: 'object', properties: {}, }, }, async (): Promise<ToolResult> => { const client = getZAPClient(); if (!client) { return formatToolResult(false, null, 'ZAP client not initialized'); } const result = await client.healthCheck(); return formatToolResult(result.success, result.data, result.error); } );
- src/integrations/zap.ts:71-87 (handler)Core implementation of health check in ZAPClient class: queries ZAP API /core/view/version/ endpoint to confirm ZAP is runningasync healthCheck(): Promise<ZAPScanResult> { try { const response = await this.client.get('/core/view/version/'); return { success: true, data: { version: response.data.version, status: 'running', }, }; } catch (error: any) { return { success: false, error: error.message || 'ZAP is not accessible', }; } }
- src/integrations/zap.ts:504-506 (helper)getZAPClient() returns the singleton ZAPClient instance used by the tool handlerexport function getZAPClient(): ZAPClient | null { return zapClient; }
- src/integrations/zap.ts:494-502 (helper)initZAP() initializes the singleton ZAPClient instance (called during tool registration)export function initZAP(baseURL?: string, apiKey?: string): ZAPClient { if (!zapClient) { zapClient = new ZAPClient( baseURL || process.env.ZAP_URL || 'http://localhost:8081', apiKey || process.env.ZAP_API_KEY ); } return zapClient; }
- src/index.ts:49-49 (registration)Main server initialization calls registerZAPTools(server) to register all ZAP tools including zap.health_checkregisterZAPTools(server);