Token导航 LogoToken导航TokenDH.com
Threat.Zone MCP Server logo
安全风控stdio官方级别未说明来源级核验

Threat.Zone MCP Server

MCP Server

Threat.Zone MCP服务器是一个基于FastMCP构建的恶意软件分析平台,提供文件分析、URL分析、网络分析和报告生成等功能,适用于安全研究和威胁情报场景。

工具数

0

提示词数

0

GitHub Stars

13

资源数

0
PythonClaude安全Claude DesktopClaude

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

threat-zone

提供方

threat-zone

最后核验

2026/5/17 20:19

运行时

Python

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

命令预览

pip install threatzone-mcp

详细介绍

████████╗██╗  ██╗██████╗ ███████╗ █████╗ ████████╗   ███████╗ ██████╗ ███╗   ██╗███████╗███╗   ███╗ ██████╗██████╗ 
╚══██╔══╝██║  ██║██╔══██╗██╔════╝██╔══██╗╚══██╔══╝   ╚══███╔╝██╔═══██╗████╗  ██║██╔════╝████╗ ████║██╔════╝██╔══██╗
   ██║   ███████║██████╔╝█████╗  ███████║   ██║        ███╔╝ ██║   ██║██╔██╗ ██║█████╗  ██╔████╔██║██║     ██████╔╝
   ██║   ██╔══██║██╔══██╗██╔══╝  ██╔══██║   ██║       ███╔╝  ██║   ██║██║╚██╗██║██╔══╝  ██║╚██╔╝██║██║     ██╔═══╝ 
   ██║   ██║  ██║██║  ██║███████╗██║  ██║   ██║   ██╗███████╗╚██████╔╝██║ ╚████║███████╗██║ ╚═╝ ██║╚██████╗██║     
   ╚═╝   ╚═╝  ╚═╝╚═╝  ╚═╝╚══════╝╚═╝  ╚═╝   ╚═╝   ╚═╝╚══════╝ ╚═════╝ ╚═╝  ╚═══╝╚══════╝╚═╝     ╚═╝ ╚═════╝╚═╝     

威胁。区域MCP服务器

用于威胁的模型上下文协议(MCP)服务器。API区,采用FastMCP构建。此服务器为LLM提供对Threat的访问权限。通过标准化的MCP工具实现Zone的恶意软件分析功能。

特性

  • 文件分析:提交用于恶意软件分析的文件,包括沙盒执行、静态分析和CDR(内容解除武装和重建)
  • URL分析:分析URL中的威胁和恶意内容
  • 提交管理:检索详细的分析结果、指标、IoC和YARA规则
  • 网络分析:访问DNS查询、HTTP/TCP/UDP请求和网络威胁
  • 报告生成:下载经过净化的文件和HTML报告
  • 用户管理:获取用户信息和提交限制

安装

使用pip

pip install threatzone-mcp

使用紫外线(推荐)

uv add threatzone-mcp

开发安装

git clone https://github.com/threat-zone/threatzonemcp.git
cd threatzonemcp
uv sync --dev

配置

设置你的威胁。区域API凭据作为环境变量:

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"

或者创建一个 .env 文件:

THREATZONE_API_KEY=your_api_key_here
# Optional: Custom API URL (defaults to https://app.threat.zone)
THREATZONE_API_URL=https://your-tenant.threat.zone

支持的部署

  • 公共云: https://app.threat.zone (默认)
  • 私人租户: https://your-tenant.threat.zone
  • 前提的: https://your-server.company.com

连接威胁。将MCP服务器区域连接到Claude桌面

先决条件

  1. 已安装Claude Desktop -下载自 克劳德桌面版
  2. UV已安装 - brew install uvcurl -LsSf https://astral.sh/uv/install.sh | sh
  3. 威胁。API区域密钥 -从 威胁。分区设置

设置步骤

1.准备MCP服务器

# Clone and setup the project
git clone 
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 errors

2.配置克劳德桌面

选项A:使用紫外线(推荐)

  1. 查找您的Claude Desktop配置目录:

- macOS: ~/Library/Application Support/Claude/ - 视窗: %APPDATA%\Claude\ - Linux: ~/.config/Claude/

  1. 创建或编辑 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"
       }
    }
  }
}

选项B:直接使用Python

{
  "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"
      }
    }
  }
}

选项C:直接使用虚拟环境

{
  "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.重要配置说明

  1. 替换占位符:

- 替换 /full/path/to/your/threatzonemcp 实际完整路径 - 替换 your_actual_api_key_here 你的威胁。API区密钥

  1. 获取完整路径:
cd threatzonemcp
pwd  # This shows the full path
  1. 验证API密钥:通过测试确保API密钥有效:
# 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/me
  1. API URL配置 (可选):

- 公共云:无需设置 THREATZONE_API_URL (使用默认值) - 私人租户:设置 THREATZONE_API_URL=https://your-tenant.threat.zone - 前提的:设置 THREATZONE_API_URL=https://your-server.company.com

4.重新启动克劳德桌面

保存配置后:

  1. 完全退出克劳德桌面
  2. 重新启动克劳德桌面
  3. 寻找🔌 图标 在新的聊天中确认MCP服务器已连接

5.测试连接

在Claude Desktop中,尝试询问:

“你能得到我的Threat.Zone用户信息吗?”

“threat.Zone中的可用威胁级别是什么?”

Claude应该能够使用MCP工具与威胁进行交互。API区。

故障排除

常见问题

  1. “找不到服务器”错误:

- 检查完整路径是否正确 - 验证UV是否已安装并位于PATH中 - 手动测试命令: uv run --directory /path/to/threatzonemcp threatzone-mcp

  1. “需要API密钥”错误:

- 验证在env部分中是否正确设置了API密钥 - 使用curl测试API密钥的工作情况

  1. “权限被拒绝”错误:

- 确保脚本可执行 - 检查文件权限

  1. Python导入错误:

- 验证虚拟环境是否已正确设置 - 检查Python是否包含src目录

可用工具

一旦连接,克劳德将可以访问这些威胁。区域工具:

分析工具

  • URL分析: scan_url -分析URL中的威胁
  • 文件分析:

- scan_file_sandbox -具有完整配置的高级沙盒分析 - scan_file_sandbox_simple -带有默认值的简单沙盒分析 - scan_file_static -静态文件分析 - scan_file_cdr -内容解除武装与重建

结果与监测

  • 提交详情: get_submission, get_submission_status_summary
  • 威胁情报: get_submission_indicators, get_submission_iocs
  • 检测规则: get_submission_yara_rules, get_submission_varist_results
  • 网络活动: get_submission_dns, get_submission_http, get_submission_tcp, get_submission_udp, get_submission_network_threats
  • 人工制品: get_submission_artifacts, get_submission_config_extractor

辅助函数

  • 状态解释: interpret_status, interpret_threat_level
  • 常量: get_metafields, get_levels, get_statuses, get_sample_metafield

用户管理

  • 账户信息: get_user_info
  • 提交历史记录: get_my_submissions, get_public_submissions
  • 搜索: search_by_hash

下载

  • 文件: download_sanitized_file (CDR已清理文件)
  • 报告: download_html_report (详细分析报告)

克劳德对话示例

连接后,您可以问Claude以下问题:

“在启用Windows 11环境和互联网访问的情况下分析此可疑的PDF文件”
“检查我最近提交的状态,并向我显示任何发现的恶意软件”
“提交UUID abc-123的网络连接和DNS查询是什么?”
“下载我最新提交的分析报告”
“监控提交进度,并在分析完成时通知我”

Claude将使用适当的MCP工具与Threat进行交互。分区并提供全面的恶意软件分析见解!

用法

运行服务器

# Using the installed script
threatzone-mcp

# Or directly with Python
python -m threatzone_mcp.server

可用工具

服务器提供以下MCP工具:

常量和助手

  • get_metafields() -获取可用图元字段以进行高级配置
  • get_levels() -获取威胁级别
  • get_statuses() -获取提交状态
  • get_sample_metafield() -获取沙盒分析的示例配置
  • interpret_status(status_value) -将数字状态转换为人类可读的描述
  • interpret_threat_level(level_value) -将数字威胁级别转换为描述
  • get_submission_status_summary(uuid) -获取带有解释状态和威胁级别的提交
  • get_server_config() -获取当前服务器配置和连接状态

用户信息

  • get_user_info() -获取当前用户信息和限制

扫描

  • scan_url(url, is_public=False) -分析URL
  • scan_file_sandbox(file_path, ...) -提交具有完整配置的高级沙盒分析文件
  • scan_file_sandbox_simple(file_path, is_public=False, entrypoint=None, password=None) -使用默认设置提交沙盒分析文件
  • scan_file_static(file_path, is_public=False, entrypoint=None, password=None) -提交静态分析文件
  • scan_file_cdr(file_path, is_public=False, entrypoint=None, password=None) -提交文件以进行CDR处理

提交检索

  • get_submission(uuid) -获取提交详细信息
  • get_submission_indicators(uuid) -获取提交指标
  • get_submission_iocs(uuid) -获取妥协指标
  • get_submission_yara_rules(uuid) -获取匹配的YARA规则
  • get_submission_varist_results(uuid) -获取Varist混合分析仪结果
  • get_submission_artifacts(uuid) -获取分析工件
  • get_submission_config_extractor(uuid) -获取提取的配置

网络分析

  • get_submission_dns(uuid) -获取DNS查询
  • get_submission_http(uuid) -获取HTTP请求
  • get_submission_tcp(uuid) -获取TCP请求
  • get_submission_udp(uuid) -获取UDP请求
  • get_submission_network_threats(uuid) -获取网络威胁

用户提交

  • get_my_submissions(page=1, jump=10) -获取用户提交的内容
  • get_public_submissions(page=1, jump=10) -获取公开提交
  • search_by_hash(hash, page=1, jump=10) -按哈希值搜索提交内容

下载

  • download_sanitized_file(uuid) -下载CDR净化文件
  • download_html_report(uuid) -下载HTML分析报告

高级沙盒分析

scan_file_sandbox 该工具支持全面的配置选项,用于详细的恶意软件分析:

环境选项

  • 视窗: w7_x64, w10_x64, w11_x64
  • macOS: macos
  • 安卓: android
  • Linux: linux

分析配置

  • 超时:60、120、180、240或300秒
  • 工作路径: desktop, root, %AppData%, windows, temp
  • 鼠标模拟:启用/禁用用户交互模拟
  • Internet连接:允许/阻止网络访问
  • HTTPS检查:监视加密流量
  • 原始日志:包括详细的执行日志
  • 快照:在执行过程中捕获VM状态
  • 睡眠逃避:检测反分析技术
  • 智能追踪:高级行为分析
  • 垃圾收集器:收集内存转储

使用示例

简单分析:

# Use default settings
await client.call_tool("scan_file_sandbox_simple", {
    "file_path": "/path/to/file.exe"
})

高级分析:

# 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"]
})

examples/advanced_sandbox_example.py 查看详细的使用示例。

了解结果

提交状态值

API返回数字状态代码,指示您提交的当前状态:

状态描述
1文件已收到文件已上传并排队等待分析
2提交失败由于错误或超时,分析失败
3提交正在运行分析当前正在进行中
4提交VM就绪虚拟机已准备就绪并开始分析
5提交完成分析成功完成

威胁级别值

分析结果包括指示发现严重程度的威胁级别:

级别描述
0未知无法确定威胁级别
1信息性文件看起来是良性的,有一些明显的行为
2可疑文件具有潜在的恶意特征
3恶意文件被确认为恶意软件或高度危险

使用示例

检查提交状态:

# 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']}")

监控分析进度:

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 again

api参考

所有工具都遵循威胁。API区规范。有关详细的参数说明和响应格式,请参阅 威胁。API区域文件.

错误处理

该服务器包括全面的错误处理功能,用于:

  • 身份验证失败(401)
  • 无效请求(400/422)
  • 未发现错误(404)
  • 速率限制
  • 网络问题

许可证

GPL v3许可证。看 许可证 了解详情。

贡献

  1. 复刻仓库
  2. 创建要素分支
  3. 进行更改
  4. 添加测试
  5. 提交拉取请求

支持

对于问题和疑问:

目录标签

目录标签

PythonClaude安全恶意软件分析本地部署威胁检测安全研究沙箱分析内容净化

支持客户端

Claude DesktopClaude

接入字段

传输方式(transport,传输协议)

stdio

鉴权方式(authType,认证方式)

token

运行时(runtime,运行环境)

Python

工具数量(toolCount,工具数)

0

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

stdiotoken部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

来源信息

继续浏览同类 MCP