Skip to main content
Glama
CorbettCajun

SpiderFoot MCP Server

spiderfoot_start_scan

Launch a new OSINT reconnaissance scan against a target to gather intelligence, investigate threats, or perform footprinting using SpiderFoot modules.

Instructions

Start a new scan against a target.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
scannameYes
scantargetYes
modulelistNo
typelistNo
usecaseNo

Implementation Reference

  • Zod input schema (StartScanSchema) for the spiderfoot_start_scan tool, defining parameters: scanname, scantarget (required), modulelist, typelist, usecase (optional). Used in both server registrations.
    const 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:70-81 (registration)
    Registration of spiderfoot_start_scan MCP tool in stdio server (index.ts), includes input schema reference, inline handler logic (env check + sf.startScan call), and output formatting.
      '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) }] };
      }
    );
  • Registration of spiderfoot_start_scan MCP tool in HTTP server (index-http.ts), identical to stdio version: schema ref, inline handler with env check and sf.startScan delegation.
    server.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) }] };
      }
    );
  • Core helper implementation: startScan method in SpiderfootClient HTTP wrapper. Performs POST /startscan to underlying Spiderfoot server with provided args and returns response.
    async 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;
    }

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/CorbettCajun/Spiderfoot-MCP-Server'

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