spiderfoot_start_scan
Initiate a new OSINT reconnaissance scan against a specified target to gather intelligence and investigate digital footprints using SpiderFoot modules.
Instructions
Start a new scan against a target.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| modulelist | No | ||
| scanname | Yes | ||
| scantarget | Yes | ||
| typelist | No | ||
| usecase | No |
Implementation Reference
- src/index.ts:72-79 (handler)MCP tool handler for 'spiderfoot_start_scan' that checks if scans are allowed via ALLOW_START_SCAN env var and delegates to SpiderfootClient.startScanasync (input) => { const allow = (process.env.ALLOW_START_SCAN ?? 'true').toLowerCase(); if (!(allow === 'true' || allow === '1' || allow === 'yes')) { return { content: [{ type: 'text', text: 'Starting scans is disabled by configuration (ALLOW_START_SCAN=false).' }], isError: true }; } const res = await sf.startScan(input as any); return { content: [{ type: 'text', text: JSON.stringify(res) }] }; }
- src/index.ts:15-21 (schema)Zod input schema defining parameters for starting a Spiderfoot scan: scan name, target, optional modules, types, and use caseconst StartScanSchema = z.object({ scanname: z.string().min(1), scantarget: z.string().min(1), modulelist: z.string().optional(), typelist: z.string().optional(), usecase: z.enum(['all', 'investigate', 'passive', 'footprint']).optional(), });
- src/index.ts:69-80 (registration)Registration of the 'spiderfoot_start_scan' MCP tool on the McpServer instance, including title, description, schema, and handlerserver.registerTool( 'spiderfoot_start_scan', { title: 'Start Scan', description: 'Start a new scan against a target.', inputSchema: StartScanSchema.shape }, async (input) => { const allow = (process.env.ALLOW_START_SCAN ?? 'true').toLowerCase(); if (!(allow === 'true' || allow === '1' || allow === 'yes')) { return { content: [{ type: 'text', text: 'Starting scans is disabled by configuration (ALLOW_START_SCAN=false).' }], isError: true }; } const res = await sf.startScan(input as any); return { content: [{ type: 'text', text: JSON.stringify(res) }] }; } );
- src/spiderfootClient.ts:49-58 (helper)SpiderfootClient.startScan helper method that sends HTTP POST request to Spiderfoot server's /startscan endpoint with scan parametersasync startScan(args: { scanname: string; scantarget: string; modulelist?: string; // comma separated module names typelist?: string; // comma separated event types usecase?: string; // all|investigate|passive|footprint }) { const { data } = await this.http.post('/startscan', args); return data; }
- src/spiderfootClient.ts:92-97 (helper)Factory function to create SpiderfootClient instance from environment variablesexport function makeSpiderfootClientFromEnv() { const baseUrl = process.env.SPIDERFOOT_BASE_URL || 'http://127.0.0.1:5001'; const username = process.env.SPIDERFOOT_USER; const password = process.env.SPIDERFOOT_PASS; return new SpiderfootClient({ baseUrl, username, password }); }