Zeek-MCP

Integrations

  • Provides integration with pandas for parsing and analyzing Zeek log files, returning structured data from network traffic analysis as DataFrame objects.

Zeek-MCP

该存储库提供了一组实用程序来构建 MCP 服务器(模型上下文协议),您可以将其与会话 AI 客户端集成。


目录


先决条件

  • Python 3.7+
  • Zeek已安装并可在您的PATH中使用(用于execzeek工具)
  • pip (用于安装 Python 依赖项)

安装

1. 克隆存储库

git clone https://github.com/Gabbo01/Zeek-MCP cd Zeek-MCP

2.安装依赖项

建议使用虚拟环境:

python -m venv venv source venv/bin/activate # Linux/macOS venv\Scripts\activate # Windows pip install -r requirements.txt

**注意:**如果没有requirements.txt ,请直接安装:

pip install pandas mcp

用法

该存储库公开了两个主要的 MCP 工具和一个命令行入口点:

3. 运行 MCP 服务器

python Bridge_Zeek_MCP.py --mcp-host 127.0.0.1 --mcp-port 8081 --transport sse
  • --mcp-host :MCP 服务器的主机(默认值: 127.0.0.1 )。
  • --mcp-port :MCP 服务器的端口(默认值: 8081 )。
  • --transport :传输协议,可以是sse (服务器发送事件)或stdio

4. 使用 MCP 工具

您需要使用可以通过调用以下工具来支持 MCP 工具使用的 LLM:

  1. execzeek(pcap_path: str) -> str
    • **描述:**删除工作目录中现有的.log文件后,在给定的 PCAP 文件上运行 Zeek。
    • **返回:**列出生成的.log文件名的字符串或错误时的"1"
  2. parselogs(logfile: str) -> DataFrame
    • **描述:**解析单个 Zeek .log文件并返回解析的内容。

您可以通过 HTTP(如果使用 SSE 传输)或嵌入 LLM 客户端(例如:Claude Desktop)与这些端点进行交互:

Claude 桌面集成:

要将 Claude Desktop 设置为 Zeek MCP 客户端,请转到Claude -> Settings -> Developer -> Edit Config -> claude_desktop_config.json并添加以下内容:

{ "mcpServers": { "Zeek-mcp": { "command": "python", "args": [ "/ABSOLUTE_PATH_TO/Bridge_Zeek_MCP.py", ] } } }

或者,直接编辑此文件:

/Users/YOUR_USER/Library/Application Support/Claude/claude_desktop_config.json
5ire 集成:

另一个支持后端多种模型的 MCP 客户端是5ire 。要设置 Zeek-MCP,请打开 5ire,然后前往Tools -> New ,并设置以下配置:

  1. 工具密钥:ZeekMCP
  2. 姓名:Zeek-MCP
  3. 命令: python /ABSOLUTE_PATH_TO/Bridge_Zeek_MCP.py
或者,您可以使用 Chainlit 框架并按照文档集成 MCP 服务器。

示例

来自 chainlit 聊天机器人客户端的 MCP 工具使用示例,它使用了一个示例 pcap 文件(您可以在 pcaps 文件夹中找到一些文件)

In that case the used model was claude-3.7-sonnet-reasoning-gemma3-12b


执照

请参阅LICENSE以了解更多信息。

-
security - not tested
A
license - permissive license
-
quality - not tested

local-only server

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

模型上下文协议服务器将 Zeek 网络分析功能与 LLM 聊天机器人相集成,使它们能够通过自然语言交互分析 PCAP 文件并解析网络日志。

  1. 目录
    1. 先决条件
      1. 安装
        1. 克隆存储库
        2. 2.安装依赖项
      2. 用法
        1. 运行 MCP 服务器
        2. 使用 MCP 工具
      3. 示例
        1. 执照

          Related MCP Servers

          • A
            security
            A
            license
            A
            quality
            A Model Context Protocol server that provides tools for analyzing text documents, including counting words and characters. This server helps LLMs perform text analysis tasks by exposing simple document statistics functionality.
            Last updated -
            1
            8
            7
            JavaScript
            Apache 2.0
          • A
            security
            F
            license
            A
            quality
            A Model Context Protocol server that enables ChatGPT and other AI assistants to directly interact with JIRA issues, currently offering the ability to retrieve issue details.
            Last updated -
            TypeScript
            • Apple
          • -
            security
            A
            license
            -
            quality
            A Model Context Protocol server implementation that provides a standardized interface for applications to interact with OpenRouter's language models through a unified conversation management system.
            Last updated -
            TypeScript
            MIT License
          • A
            security
            F
            license
            A
            quality
            A Model Context Protocol server that integrates essential penetration testing tools (Nmap, Gobuster, Nikto, John the Ripper) into a unified natural language interface, allowing security professionals to execute and chain multiple tools through conversational commands.
            Last updated -
            8
            52
            31
            TypeScript
            • Linux
            • Apple

          View all related MCP servers

          ID: 0zmxump9vd