Provides SpiderFoot OSINT scanning capabilities through a Python-based MCP server, enabling comprehensive reconnaissance, investigation, and footprinting operations with scan management, result retrieval, and export functionality.
SpiderFoot MCP Server
A Model Context Protocol (MCP) server that provides SpiderFoot scanning capabilities through a standardized interface.
Overview
This MCP server allows you to interact with SpiderFoot's OSINT scanning capabilities through Claude and other MCP-compatible tools. It provides comprehensive scan management, result retrieval, and export functionality.
Features
- Scan Management: Start, stop, delete, and monitor SpiderFoot scans
- Real-time Status: Get scan status, progress, and completion notifications
- Result Access: Retrieve scan results, summaries, and logs
- Export Capabilities: Export scan data in JSON, CSV, and Excel formats
- Search Functionality: Search across scan results
- Server Health: Ping server and check connectivity/version
- Module Management: Access available SpiderFoot modules
Prerequisites
- Python 3.8+
- Access to a SpiderFoot server (local or remote)
- Required Python packages (see Installation)
Installation
- Install required dependencies:
- Set up environment variables in
.env
:
Configuration
The server expects these environment variables:
SPIDERFOOT_URL
: Base URL of your SpiderFoot instance (default:http://localhost:5001
)SPIDERFOOT_USERNAME
: Username for HTTP digest authentication (default:admin
)SPIDERFOOT_PASSWORD
: Password for authentication (required)
Available MCP Tools
Core Scan Operations
start_scan(target, scan_name, modules?, use_case?)
- Start a new scanget_scan_status(scan_id)
- Get current scan statuslist_scans()
- List all scans on the serverstop_scan(scan_id)
- Stop a running scandelete_scan(scan_id)
- Delete a scan and its data
Results and Analysis
get_scan_results(scan_id, event_type?)
- Get scan resultsget_scan_summary(scan_id, by?)
- Get scan summary by module/typeget_scan_log(scan_id, limit?, from_rowid?)
- Get scan log entriesexport_scan_results(scan_id, export_format?)
- Export results (JSON/CSV/Excel)search_scan_results(query, scan_id?)
- Search across results
Utility Functions
ping()
- Test server connectivity and get versionget_available_modules()
- List available SpiderFoot moduleswait_for_scan_completion(scan_id, poll_interval?, timeout?)
- Wait for scan completionget_active_scans_summary()
- Get summary of tracked scans
Usage Examples
Starting a Scan
Monitoring Progress
Retrieving Results
Running the Server
Development/Testing
Production
The server automatically validates environment variables and tests connectivity on startup.
API Implementation Details
Authentication
Uses HTTP Digest Authentication as required by SpiderFoot API v4.0.
Response Handling
The implementation properly handles SpiderFoot's unique response formats:
- List responses:
['SUCCESS', 'data']
or['ERROR', 'message']
- Scan data: Arrays with positional fields
[id, name, target, created, started, completed, status, ...]
- JSON responses: Standard dictionaries for modules and complex data
Key Fixes Applied
- JSON Accept Header: Required for JSON responses instead of HTML
- Module Specification: Even with use cases, specific modules must be provided
- Parameter Names: Correct parameter names for each endpoint (
ids
vsid
,by
parameter for summaries) - Response Format Handling: Proper parsing of list-based responses
Supported SpiderFoot Versions
- Primary: SpiderFoot v4.0.0
- Compatibility: Should work with SpiderFoot v4.x series
Use Cases
Passive Reconnaissance
Investigation
Footprinting
Error Handling
The server provides comprehensive error handling with detailed messages:
- Connection failures
- Authentication errors
- Invalid scan parameters
- API endpoint errors
- Response parsing issues
Security Considerations
- Credentials are loaded from environment variables
- HTTP Digest Authentication for API security
- No secrets logged or exposed in responses
- Secure handling of scan data
Troubleshooting
Common Issues
- 404 Errors: Usually indicate incorrect endpoint or missing parameters
- Authentication Failures: Check username/password and server accessibility
- Module Errors: Ensure modules are specified even with use cases
- Connection Issues: Verify server URL and network connectivity
Testing Connectivity
Debug Logging
Enable debug logging in the client for detailed API call information.
Development Notes
- The implementation follows SpiderFoot's official
sfcli
patterns - All endpoints tested against live SpiderFoot v4.0.0 instance
- MCP tools provide structured responses with success/error handling
- Maintains compatibility with both single and batch operations
Contributing
When extending functionality:
- Follow existing error handling patterns
- Handle both list and dict response formats
- Test against actual SpiderFoot instance
- Update documentation for new tools
License
This project follows the same licensing as SpiderFoot for compatibility.
This server cannot be installed
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
Enables interaction with SpiderFoot's OSINT scanning capabilities through Claude and other MCP-compatible tools. Supports comprehensive scan management, real-time monitoring, result retrieval, and export functionality for reconnaissance and investigation workflows.
Related MCP Servers
- -securityFlicense-qualityEnables integration between MCP clients and the Handwriting OCR service, allowing users to upload images and PDF documents, check processing status, and retrieve OCR results as Markdown.Last updated -5JavaScript
- -securityAlicense-qualityAn MCP server that integrates with Sonar API to provide Claude with real-time web search capabilities for comprehensive research.Last updated -0JavaScriptMIT License
- AsecurityAlicenseAqualityRun your own runbooks from Claude Desktop. You can create your runbooks and execute them with other MCP servers.Last updated -24PythonApache 2.0
- -securityFlicense-qualityMCP server to perform various OSINT tasks by leveraging common network reconnaissance tools.Last updated -28Python