Threat.Zone MCP Server
Offers sandbox analysis capabilities for Android environments, enabling malware analysis on Android systems.
Provides sandbox analysis in Linux environments for analyzing potentially malicious files and their behavior.
Enables sandbox analysis in macOS environments to detect and analyze threats targeting Apple operating systems.
Uses Python for implementation and provides Python-based installation methods for the MCP server.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Threat.Zone MCP Server analyze this suspicious file for malware"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
████████╗██╗ ██╗██████╗ ███████╗ █████╗ ████████╗ ███████╗ ██████╗ ███╗ ██╗███████╗███╗ ███╗ ██████╗██████╗
╚══██╔══╝██║ ██║██╔══██╗██╔════╝██╔══██╗╚══██╔══╝ ╚══███╔╝██╔═══██╗████╗ ██║██╔════╝████╗ ████║██╔════╝██╔══██╗
██║ ███████║██████╔╝█████╗ ███████║ ██║ ███╔╝ ██║ ██║██╔██╗ ██║█████╗ ██╔████╔██║██║ ██████╔╝
██║ ██╔══██║██╔══██╗██╔══╝ ██╔══██║ ██║ ███╔╝ ██║ ██║██║╚██╗██║██╔══╝ ██║╚██╔╝██║██║ ██╔═══╝
██║ ██║ ██║██║ ██║███████╗██║ ██║ ██║ ██╗███████╗╚██████╔╝██║ ╚████║███████╗██║ ╚═╝ ██║╚██████╗██║
╚═╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ ╚═╝ ╚═╝╚══════╝ ╚═════╝ ╚═╝ ╚═══╝╚══════╝╚═╝ ╚═╝ ╚═════╝╚═╝ Threat.Zone MCP Server
A Model Context Protocol (MCP) server for the Threat.Zone API, built with FastMCP. This server provides LLMs with access to Threat.Zone's malware analysis capabilities through standardized MCP tools.
Features
File Analysis: Submit files for malware analysis including sandbox execution, static analysis, and CDR (Content Disarm and Reconstruction)
URL Analysis: Analyze URLs for threats and malicious content
Submission Management: Retrieve detailed analysis results, indicators, IoCs, and YARA rules
Network Analysis: Access DNS queries, HTTP/TCP/UDP requests, and network threats
Report Generation: Download sanitized files and HTML reports
User Management: Get user information and submission limits
Related MCP server: Malware-Sandbox-mcp
Installation
Using pip
pip install threatzone-mcpUsing uv (recommended)
uv add threatzone-mcpDevelopment Installation
git clone https://github.com/threat-zone/threatzonemcp.git
cd threatzonemcp
uv sync --devConfiguration
Set your Threat.Zone API credentials as environment variables:
export THREATZONE_API_KEY="your_api_key_here"
# Optional: For private tenants or on-premise deployments
export THREATZONE_API_URL="https://your-tenant.threat.zone"Or create a .env file:
THREATZONE_API_KEY=your_api_key_here
# Optional: Custom API URL (defaults to https://app.threat.zone)
THREATZONE_API_URL=https://your-tenant.threat.zoneSupported Deployments
Public Cloud:
https://app.threat.zone(default)Private Tenant:
https://your-tenant.threat.zoneOn-Premise:
https://your-server.company.com
Connecting Threat.Zone MCP Server to Claude Desktop
Prerequisites
Claude Desktop installed - Download from Claude Desktop
UV installed -
brew install uvorcurl -LsSf https://astral.sh/uv/install.sh | shThreat.Zone API Key - Get from Threat.Zone Settings
Setup Steps
1. Prepare the MCP Server
# Clone and setup the project
git clone <your-repo-url>
cd threatzonemcp
# Install with UV
uv venv
uv pip install -e .
# Test the server works
THREATZONE_API_KEY=your_key uv run threatzone-mcp
# Should start without errors2. Configure Claude Desktop
Option A: Using UV (Recommended)
Find your Claude Desktop config directory:
macOS:
~/Library/Application Support/Claude/Windows:
%APPDATA%\Claude\Linux:
~/.config/Claude/
Create or edit
claude_desktop_config.json:
{
"mcpServers": {
"threatzone": {
"command": "uv",
"args": [
"run",
"--directory",
"/full/path/to/your/threatzonemcp",
"threatzone-mcp"
],
"env": {
"THREATZONE_API_KEY": "your_actual_api_key_here",
"THREATZONE_API_URL": "https://your-tenant.threat.zone"
}
}
}
}Option B: Using Python directly
{
"mcpServers": {
"threatzone": {
"command": "python",
"args": [
"-m",
"threatzone_mcp.server"
],
"cwd": "/full/path/to/your/threatzonemcp",
"env": {
"THREATZONE_API_KEY": "your_actual_api_key_here",
"PYTHONPATH": "/full/path/to/your/threatzonemcp/src"
}
}
}
}Option C: Using virtual environment directly
{
"mcpServers": {
"threatzone": {
"command": "/full/path/to/your/threatzonemcp/.venv/bin/python",
"args": [
"-m",
"threatzone_mcp.server"
],
"cwd": "/full/path/to/your/threatzonemcp",
"env": {
"THREATZONE_API_KEY": "your_actual_api_key_here",
"PYTHONPATH": "/full/path/to/your/threatzonemcp/src"
}
}
}
}3. Important Configuration Notes
Replace placeholders:
Replace
/full/path/to/your/threatzonemcpwith the actual full pathReplace
your_actual_api_key_herewith your Threat.Zone API key
Get the full path:
cd threatzonemcp
pwd # This shows the full pathVerify API key: Make sure your API key is valid by testing:
# For public cloud (default)
curl -H "Authorization: Bearer your_api_key" https://app.threat.zone/public-api/me
# For private tenant or on-premise
curl -H "Authorization: Bearer your_api_key" https://your-tenant.threat.zone/public-api/meAPI URL Configuration (Optional):
Public Cloud: No need to set
THREATZONE_API_URL(uses default)Private Tenant: Set
THREATZONE_API_URL=https://your-tenant.threat.zoneOn-Premise: Set
THREATZONE_API_URL=https://your-server.company.com
4. Restart Claude Desktop
After saving the configuration:
Quit Claude Desktop completely
Restart Claude Desktop
Look for the 🔌 icon in a new chat to confirm MCP servers are connected
5. Test the Connection
In Claude Desktop, try asking:
"Can you get my Threat.Zone user information?"
or
"What are the available threat levels in Threat.Zone?"
Claude should be able to use the MCP tools to interact with the Threat.Zone API.
Troubleshooting
Common Issues
"Server not found" error:
Check the full path is correct
Verify UV is installed and in PATH
Test the command manually:
uv run --directory /path/to/threatzonemcp threatzone-mcp
"API key required" error:
Verify the API key is set correctly in the env section
Test the API key works with curl
"Permission denied" error:
Make sure the script is executable
Check file permissions
Python import errors:
Verify the virtual environment is properly set up
Check PYTHONPATH includes the src directory
Available Tools
Once connected, Claude will have access to these Threat.Zone tools:
Analysis Tools
URL Analysis:
scan_url- Analyze URLs for threatsFile Analysis:
scan_file_sandbox- Advanced sandbox analysis with full configurationscan_file_sandbox_simple- Simple sandbox analysis with defaultsscan_file_static- Static file analysisscan_file_cdr- Content Disarm and Reconstruction
Results & Monitoring
Submission Details:
get_submission,get_submission_status_summaryThreat Intelligence:
get_submission_indicators,get_submission_iocsDetection Rules:
get_submission_yara_rules,get_submission_varist_resultsNetwork Activity:
get_submission_dns,get_submission_http,get_submission_tcp,get_submission_udp,get_submission_network_threatsArtifacts:
get_submission_artifacts,get_submission_config_extractor
Helper Functions
Status Interpretation:
interpret_status,interpret_threat_levelConstants:
get_metafields,get_levels,get_statuses,get_sample_metafield
User Management
Account Info:
get_user_infoSubmission History:
get_my_submissions,get_public_submissionsSearch:
search_by_hash
Downloads
Files:
download_sanitized_file(CDR-cleaned files)Reports:
download_html_report(detailed analysis reports)
Example Claude Conversations
Once connected, you can ask Claude things like:
"Analyze this suspicious PDF file with Windows 11 environment and internet access enabled"
"Check the status of my recent submissions and show me any that found malware"
"What are the network connections and DNS queries from submission UUID abc-123?"
"Download the analysis report for my latest submission"
"Monitor submission progress and notify me when analysis is complete"
Claude will use the appropriate MCP tools to interact with Threat.Zone and provide comprehensive malware analysis insights!
Usage
Running the Server
# Using the installed script
threatzone-mcp
# Or directly with Python
python -m threatzone_mcp.serverAvailable Tools
The server provides the following MCP tools:
Constants & Helpers
get_metafields()- Get available metafields for advanced configurationget_levels()- Get threat levelsget_statuses()- Get submission statusesget_sample_metafield()- Get sample configuration for sandbox analysisinterpret_status(status_value)- Convert numeric status to human-readable descriptioninterpret_threat_level(level_value)- Convert numeric threat level to descriptionget_submission_status_summary(uuid)- Get submission with interpreted status and threat levelget_server_config()- Get current server configuration and connection status
User Information
get_user_info()- Get current user information and limits
Scanning
scan_url(url, is_public=False)- Analyze a URLscan_file_sandbox(file_path, ...)- Submit file for advanced sandbox analysis with full configurationscan_file_sandbox_simple(file_path, is_public=False, entrypoint=None, password=None)- Submit file for sandbox analysis with default settingsscan_file_static(file_path, is_public=False, entrypoint=None, password=None)- Submit file for static analysisscan_file_cdr(file_path, is_public=False, entrypoint=None, password=None)- Submit file for CDR processing
Submission Retrieval
get_submission(uuid)- Get submission detailsget_submission_indicators(uuid)- Get submission indicatorsget_submission_iocs(uuid)- Get Indicators of Compromiseget_submission_yara_rules(uuid)- Get matched YARA rulesget_submission_varist_results(uuid)- Get Varist Hybrid Analyzer resultsget_submission_artifacts(uuid)- Get analysis artifactsget_submission_config_extractor(uuid)- Get extracted configurations
Network Analysis
get_submission_dns(uuid)- Get DNS queriesget_submission_http(uuid)- Get HTTP requestsget_submission_tcp(uuid)- Get TCP requestsget_submission_udp(uuid)- Get UDP requestsget_submission_network_threats(uuid)- Get network threats
User Submissions
get_my_submissions(page=1, jump=10)- Get user's submissionsget_public_submissions(page=1, jump=10)- Get public submissionssearch_by_hash(hash, page=1, jump=10)- Search submissions by hash
Downloads
download_sanitized_file(uuid)- Download CDR-sanitized filedownload_html_report(uuid)- Download HTML analysis report
Advanced Sandbox Analysis
The scan_file_sandbox tool supports comprehensive configuration options for detailed malware analysis:
Environment Options
Windows:
w7_x64,w10_x64,w11_x64macOS:
macosAndroid:
androidLinux:
linux
Analysis Configuration
Timeout: 60, 120, 180, 240, or 300 seconds
Work Path:
desktop,root,%AppData%,windows,tempMouse Simulation: Enable/disable user interaction simulation
Internet Connection: Allow/block network access
HTTPS Inspection: Monitor encrypted traffic
Raw Logs: Include detailed execution logs
Snapshots: Capture VM state during execution
Sleep Evasion: Detect anti-analysis techniques
Smart Tracing: Advanced behavioral analysis
Dump Collector: Collect memory dumps
Usage Examples
Simple Analysis:
# Use default settings
await client.call_tool("scan_file_sandbox_simple", {
"file_path": "/path/to/file.exe"
})Advanced Analysis:
# Full configuration control
await client.call_tool("scan_file_sandbox", {
"file_path": "/path/to/file.exe",
"environment": "w11_x64",
"timeout": 300,
"internet_connection": True,
"https_inspection": True,
"raw_logs": True,
"modules": ["csi", "cdr"]
})See examples/advanced_sandbox_example.py for detailed usage examples.
Understanding Results
Submission Status Values
The API returns numeric status codes that indicate the current state of your submission:
Value | Status | Description |
1 | File received | File has been uploaded and queued for analysis |
2 | Submission failed | Analysis failed due to error or timeout |
3 | Submission running | Analysis is currently in progress |
4 | Submission VM ready | Virtual machine is prepared and starting analysis |
5 | Submission finished | Analysis completed successfully |
Threat Level Values
Analysis results include a threat level indicating the severity of findings:
Value | Level | Description |
0 | Unknown | Unable to determine threat level |
1 | Informative | File appears benign with some notable behaviors |
2 | Suspicious | File exhibits potentially malicious characteristics |
3 | Malicious | File confirmed as malware or highly dangerous |
Usage Examples
Check submission status:
# Get raw status
submission = await client.call_tool("get_submission", {"uuid": "submission_id"})
print(f"Status code: {submission['status']}")
# Get interpreted status
summary = await client.call_tool("get_submission_status_summary", {"uuid": "submission_id"})
print(f"Status: {summary['status_description']}")
print(f"Threat Level: {summary['threat_level_description']}")Monitor analysis progress:
import asyncio
async def wait_for_analysis(uuid):
while True:
summary = await client.call_tool("get_submission_status_summary", {"uuid": uuid})
status = summary.get('status')
if status == 5: # Finished
print(f"Analysis complete! Threat level: {summary['threat_level_description']}")
break
elif status == 2: # Failed
print("Analysis failed")
break
else:
print(f"Status: {summary['status_description']}")
await asyncio.sleep(10) # Wait 10 seconds before checking againAPI Reference
All tools follow the Threat.Zone API specification. For detailed parameter descriptions and response formats, refer to the Threat.Zone API documentation.
Error Handling
The server includes comprehensive error handling for:
Authentication failures (401)
Invalid requests (400/422)
Not found errors (404)
Rate limiting
Network issues
License
GPL v3 License. See LICENSE for details.
Contributing
Fork the repository
Create a feature branch
Make your changes
Add tests
Submit a pull request
Support
For issues and questions:
Available Tools
31 toolsdownload_html_reportC
Download HTML analysis report for a submission.
Args: uuid: Submission UUID
Returns: HTML report content
Inputs: uuid (required). Returns: result
download_sanitized_fileB
Download the CDR-sanitized file for a given submission UUID.
Args: uuid: Submission UUID
Returns: Base64-encoded file content
Inputs: uuid (required). Returns: result
get_levelsA
Get threat levels used in analysis results.
Inputs: no named parameters. Returns: object
get_metafieldsB
Get available metafields for scan configuration.
Inputs: no named parameters. Returns: object
get_my_submissionsB
Get user's submissions with pagination.
Args: page: Page number (default: 1) jump: Number of items per page (default: 10)
Inputs: page, jump. Returns: object
get_public_submissionsC
Get public submissions with pagination.
Args: page: Page number (default: 1) jump: Number of items per page (default: 10)
Inputs: page, jump. Returns: object
get_sample_metafieldB
Get sample metafield configuration for sandbox analysis.
Inputs: no named parameters. Returns: object
get_server_configB
Get current server configuration including API URL and connection status.
Returns: Configuration details including API URL, version, and status
Inputs: no named parameters. Returns: object
get_statusesB
Get submission statuses.
Inputs: no named parameters. Returns: object
get_submissionC
Get submission details by UUID.
Args: uuid: Submission UUID
Inputs: uuid (required). Returns: object
get_submission_artifactsC
Get all artifacts for a specific submission.
Args: uuid: Submission UUID
Inputs: uuid (required). Returns: object
get_submission_config_extractorC
Get all extracted configurations for a specific submission.
Args: uuid: Submission UUID
Inputs: uuid (required). Returns: object
get_submission_dnsC
Get all DNS queries for a specific submission.
Args: uuid: Submission UUID
Inputs: uuid (required). Returns: object
get_submission_httpB
Get all HTTP requests and packets for a specific submission.
Args: uuid: Submission UUID
Inputs: uuid (required). Returns: object
get_submission_indicatorsC
Get all indicators for a specific submission.
Args: uuid: Submission UUID
Inputs: uuid (required). Returns: object
get_submission_iocsC
Get all Indicators of Compromise for a specific submission.
Args: uuid: Submission UUID
Inputs: uuid (required). Returns: object
get_submission_network_threatsB
Get all network threats for a specific submission.
Args: uuid: Submission UUID
Inputs: uuid (required). Returns: object
get_submission_status_summaryB
Get submission details with interpreted status and threat level.
Args: uuid: Submission UUID
Returns: Submission details with human-readable status and threat level
Inputs: uuid (required). Returns: object
get_submission_tcpB
Get all TCP requests and packets for a specific submission.
Args: uuid: Submission UUID
Inputs: uuid (required). Returns: object
get_submission_udpC
Get all UDP requests and packets for a specific submission.
Args: uuid: Submission UUID
Inputs: uuid (required). Returns: object
get_submission_varist_resultsC
Get Varist Hybrid Analyzer results for a specific submission.
Args: uuid: Submission UUID
Inputs: uuid (required). Returns: object
get_submission_yara_rulesC
Get all matched YARA rules for a specific submission.
Args: uuid: Submission UUID
Inputs: uuid (required). Returns: object
get_user_infoB
Get current user information, workspace details, and usage limits.
Inputs: no named parameters. Returns: object
interpret_statusA
Interpret a numeric status value from submission results.
Args: status_value: Numeric status value (1-5)
Returns: Human-readable status description
Inputs: status_value (required). Returns: result
interpret_threat_levelA
Interpret a numeric threat level value from analysis results.
Args: level_value: Numeric threat level (0-3)
Returns: Human-readable threat level description
Inputs: level_value (required). Returns: result
scan_file_cdrB
Submit a file for CDR (Content Disarm and Reconstruction) processing.
Args: file_path: Path to the file to process is_public: Whether the scan results should be public entrypoint: File to execute within archive (if applicable) password: Password for archive files (if applicable)
Inputs: file_path (required), is_public, entrypoint, password. Returns: object
scan_file_sandboxA
Submit a file for advanced sandbox analysis with detailed configuration.
Args: file_path: Path to the file to analyze is_public: Whether the scan results should be public (default: False) entrypoint: File to execute within archive (if applicable) password: Password for archive files (if applicable) environment: Analysis environment - w7_x64, w10_x64, w11_x64, macos, android, linux (default: w10_x64) timeout: Analysis timeout in seconds - 60, 120, 180, 240, 300 (default: 180) work_path: Working directory - desktop, root, %AppData%, windows, temp (default: desktop) mouse_simulation: Enable mouse simulation (default: True) https_inspection: Enable HTTPS inspection (default: False) internet_connection: Enable internet connection (default: False) raw_logs: Include raw logs (default: False) snapshot: Take VM snapshots (default: False) sleep_evasion: Enable sleep evasion techniques (default: False) smart_tracing: Enable smart tracing (default: False) dump_collector: Enable dump collection (default: False) open_in_browser: Open files in browser (default: False) extension_check: Perform extension check (default: True) modules: Analysis modules to use, e.g., ["csi", "cdr"] (default: None) auto_config: Use automatic configuration (default: False)
Inputs: file_path (required), is_public, entrypoint, password, +15 more. Returns: object
scan_file_sandbox_simpleA
Submit a file for simple sandbox analysis using default settings.
This is a simplified version of scan_file_sandbox with default configurations. Use scan_file_sandbox for advanced configuration options.
Args: file_path: Path to the file to analyze is_public: Whether the scan results should be public (default: False) entrypoint: File to execute within archive (if applicable) password: Password for archive files (if applicable)
Inputs: file_path (required), is_public, entrypoint, password. Returns: object
scan_file_staticC
Submit a file for static analysis.
Args: file_path: Path to the file to analyze is_public: Whether the scan results should be public entrypoint: File to execute within archive (if applicable) password: Password for archive files (if applicable)
Inputs: file_path (required), is_public, entrypoint, password. Returns: object
scan_urlC
Analyze a URL for threats and malicious content.
Args: url: The URL to analyze is_public: Whether the scan results should be public
Inputs: url (required), is_public. Returns: object
search_by_hashC
Search submissions by file hash (MD5, SHA1, or SHA256).
Args: hash: File hash to search for page: Page number (default: 1) jump: Number of items per page (default: 10)
Inputs: hash (required), page, jump. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 31 tools
Most tools have distinct purposes targeting specific submission data types or actions, but some overlap exists. For example, get_submission_indicators and get_submission_iocs could be confusing as both relate to threat indicators, though their descriptions suggest iocs might be a subset. The three scan_file_* tools are well-differentiated by analysis type (CDR, sandbox, static).
Tool names follow a highly consistent verb_noun pattern throughout. All tools use snake_case with clear prefixes: 'get_' for retrieval, 'download_' for file downloads, 'scan_' for analysis submissions, 'interpret_' for value translation, and 'search_' for searching. This consistency makes the tool set predictable and easy to navigate.
With 31 tools, the count feels heavy for a threat analysis server. While the domain involves detailed submission data retrieval, many tools are variations fetching specific artifact types (DNS, HTTP, TCP, UDP, etc.) that could potentially be consolidated. The number exceeds typical well-scoped ranges (3-15 tools), suggesting some tool proliferation.
The tool set provides comprehensive coverage for a threat analysis platform. It includes submission creation (multiple scan types), retrieval (detailed artifacts, statuses, reports), search capabilities, user/system information, and interpretation helpers. There are no apparent gaps in the core workflow from submission to analysis results retrieval.
Maintenance
Related MCP Connectors
Enrich, search, assess, and manage threat intelligence through 80+ typed MCP tools.
Find, vet, and run MCP tools through a secure audited gateway with prompt-injection risk scoring
MCP tools for agents: web research, content extraction, email, DNS, and blockchain intelligence.
Agentic cybersecurity tool: URL phishing/malware scanning and more.
Related MCP Servers
AlicenseNot gradedqualityBmaintenanceWraps the ScanMalware.com API to enable phishing triage, malware scanning, and certificate inspection through natural language, allowing users to submit scans, retrieve results, and analyze threats via MCP tools.1Apache 2.0- AlicenseAqualityCmaintenanceEnables assistants to analyze files and URLs for malware by integrating with security services like VirusTotal and ANY.RUN, returning threat reports.20MIT
- FlicenseNot gradedqualityDmaintenanceEnables AI agents to invoke DeepAnalyze's intelligent analysis capabilities through MCP tools, including multi-round reasoning, code execution, and file operations.-
- AlicenseAqualityBmaintenanceEnables AI agents to access VirusTotal intelligence through MCP, supporting file, URL, domain, and IP lookups, plus analysis, via remote HTTP or local stdio.8MIT