Skip to main content
Glama

WireMCP

by 0xKoda

Wire-MCP 横幅

WireMCP

WireMCP 是一个模型上下文协议 (MCP) 服务器,旨在为大型语言模型 (LLM) 提供实时网络流量分析功能。WireMCP 利用基于 Wireshark 的tshark构建的工具,捕获并处理实时网络数据,为 LLM 提供结构化上下文,以协助执行威胁搜寻、网络诊断和异常检测等任务。

特征

WireMCP 向 MCP 客户端公开以下工具,增强 LLM 对网络活动的理解:

  • capture_packets :捕获实时流量并以 JSON 格式返回原始数据包数据,使 LLM 能够分析数据包级别的详细信息(例如 IP 地址、端口、HTTP 方法)。
  • get_summary_stats :提供协议层次结构统计信息,让 LLM 了解流量组成的概况(例如,TCP 与 UDP 的使用情况)。
  • get_conversations :提供 TCP/UDP 对话统计信息,允许 LLM 跟踪端点之间的通信流。
  • check_threats :捕获 IP 并根据 URLhaus 黑名单进行检查,为 LLM 提供威胁情报环境以识别恶意活动。
  • check_ip_threats :针对多个威胁源执行针对特定 IP 地址的目标威胁情报查找,提供详细的信誉和威胁数据。
  • analyze_pcap :分析 PCAP 文件以 JSON 格式提供全面的数据包数据,从而实现对网络流量的详细捕获后分析。
  • extract_credentials :扫描 PCAP 文件中来自各种协议(HTTP Basic Auth、FTP、Telnet)的潜在凭证,协助进行安全审计和取证分析。

它如何帮助法学硕士

WireMCP 通过以下方式弥合原始网络数据和 LLM 理解之间的差距:

  • 情境化流量:将实时数据包捕获转换为 LLM 可以解析和推理的结构化输出(JSON、统计数据)。
  • 威胁检测:集成 IOC(当前为 URLhaus)来标记可疑 IP,增强 LLM 驱动的安全分析。
  • 诊断:提供详细的流量洞察,使 LLM 能够协助排除故障或识别异常。
  • 叙事生成:LLM 可以将复杂的数据包捕获转换为连贯的故事,使非技术用户能够进行网络分析。

安装

先决条件

  • Mac / Windows / Linux
  • Wireshark (已安装tshark并可在 PATH 中访问)
  • Node.js(建议使用 v16+)
  • npm(用于依赖项安装)

设置

  1. 克隆存储库:
    git clone https://github.com/0xkoda/WireMCP.git cd WireMCP
  2. 安装依赖项:
    npm install
  3. 运行 MCP 服务器:
    node index.js

注意:确保tshark位于您的 PATH 中。WireMCP 会自动检测它,或者回退到常用的安装位置(例如,在 macOS 上为/Applications/Wireshark.app/Contents/MacOS/tshark )。

与 MCP 客户端一起使用

WireMCP 可与任何兼容 MCP 的客户端兼容。以下是一些常用客户端的示例:

示例 1:游标

在 Cursor -> Settings -> MCP 中编辑mcp.json

{ "mcpServers": { "wiremcp": { "command": "node", "args": [ "/ABSOLUTE_PATH_TO/WireMCP/index.js" ] } } }

位置(macOS)/Users/YOUR_USER/Library/Application Support/Claude/claude_desktop_config.json

其他客户

此 MCP 可与任何客户端兼容。请在客户端的 MCP 服务器设置中使用命令node /path/to/WireMCP/index.js

示例输出

运行check_threats可能会产生以下结果:

Captured IPs: 174.67.0.227 52.196.136.253 Threat check against URLhaus blacklist: No threats detected in URLhaus blacklist.

在捕获文件上运行analyze_pcap

{ "content": [{ "type": "text", "text": "Analyzed PCAP: ./capture.pcap\n\nUnique IPs:\n192.168.0.2\n192.168.0.1\n\nProtocols:\neth:ethertype:ip:tcp\neth:ethertype:ip:tcp:telnet\n\nPacket Data:\n[{\"layers\":{\"frame.number\":[\"1\"],\"ip.src\":[\"192.168.0.2\"],\"ip.dst\":[\"192.168.0.1\"],\"tcp.srcport\":[\"1550\"],\"tcp.dstport\":[\"23\"]}}]" }] }

LLM 可以利用这些输出来:

  • 提供网络活动的自然语言解释
  • 识别模式和潜在的安全问题
  • 提供情境感知建议
  • 生成人类可读的报告

路线图

  • 扩展 IOC 提供商:目前使用 URLhaus 进行威胁检查。未来更新将整合其他来源(例如 IPsum、新兴威胁),以扩大覆盖范围。

贡献

欢迎贡献代码!欢迎提交 Pull 请求。对于重大变更,请先提交一个 issue 来讨论您想要修改的内容。

执照

麻省理工学院

致谢

  • Wireshark/tshark 团队提供出色的数据包分析工具
  • 框架和规范的模型上下文协议社区
  • URLhaus 提供威胁情报数据
Install Server
A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

local-only server

The server can only run on the client's local machine because it depends on local resources.

模型上下文协议服务器为 LLM 提供实时网络流量分析功能,通过 Wireshark 的 tshark 实现威胁搜寻、网络诊断和异常检测等任务。

  1. 特征
    1. 它如何帮助法学硕士
  2. 安装
    1. 先决条件
    2. 设置
  3. 与 MCP 客户端一起使用
    1. 示例 1:游标
    2. 其他客户
  4. 示例输出
    1. 路线图
      1. 贡献
        1. 执照
          1. 致谢

            Related MCP Servers

            • A
              security
              A
              license
              A
              quality
              A Model Context Protocol server that provides LLM Agents with a comprehensive toolset for IP geolocation, network diagnostics, system monitoring, cryptographic operations, and QR code generation.
              Last updated -
              16
              566
              10
              TypeScript
              Apache 2.0
            • -
              security
              A
              license
              -
              quality
              A Model Context Protocol server that enables LLMs to read, search, and analyze code files with advanced caching and real-time file watching capabilities.
              Last updated -
              20
              20
              JavaScript
              MIT License
              • Linux
              • Apple
            • -
              security
              A
              license
              -
              quality
              A Model Context Protocol server that allows LLMs to interact with web content through standardized tools, currently supporting web scraping functionality.
              Last updated -
              Python
              MIT License
              • Linux
              • Apple
            • -
              security
              A
              license
              -
              quality
              A Model Context Protocol server that provides network analysis tools for security professionals, enabling AI models like Claude to perform tasks such as ASN lookups, DNS analysis, WHOIS retrieval, and IP geolocation for security investigations.
              Last updated -
              1
              Python
              Apache 2.0
              • Linux
              • Apple

            View all related MCP servers

            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/0xKoda/WireMCP'

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