Skip to main content
Glama

spiderfoot_export_json

Export SpiderFoot OSINT scan results in JSON format using scan IDs for data analysis or integration with other tools.

Instructions

Export scan results in JSON for CSV of IDs.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idsYes

Implementation Reference

  • The core handler logic for the 'spiderfoot_export_json' tool. It sends a POST request to Spiderfoot's '/scanexportjsonmulti' endpoint with the CSV of scan IDs and returns the JSON export data.
    async exportJson(idsCsv: string) { const { data } = await this.http.post('/scanexportjsonmulti', { ids: idsCsv }); return data; }
  • src/index.ts:100-104 (registration)
    Registration of the 'spiderfoot_export_json' tool in the stdio MCP server, including input schema and thin wrapper handler that calls the client exportJson method.
    server.registerTool( 'spiderfoot_export_json', { title: 'Export JSON', description: 'Export scan results in JSON for CSV of IDs.', inputSchema: { ids: z.string() } }, async ({ ids }) => ({ content: [{ type: 'text', text: JSON.stringify(await sf.exportJson(ids)) }] }) );
  • Registration of the 'spiderfoot_export_json' tool in the HTTP MCP server, identical to the stdio version.
    server.registerTool( 'spiderfoot_export_json', { title: 'Export JSON', description: 'Export scan results in JSON for CSV of IDs.', inputSchema: { ids: z.string() } }, async ({ ids }) => ({ content: [{ type: 'text', text: JSON.stringify(await sf.exportJson(ids)) }] }) );
  • Zod schema definition for the tool input (scan IDs as string), though registration uses a similar inline schema.
    const ExportJsonSchema = z.object({ ids: z.string().min(1) });
  • Helper function to create the SpiderfootClient instance from environment variables, used to instantiate 'sf' in both server registrations.
    export 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 }); }

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