Zeek MCP server

Provides a bridge between Zeek network security monitor and language models for executing PCAP file analysis, log parsing, and converting tabular output into structured data formats without requiring direct command-line interaction.
Back to servers
Setup instructions
Provider
Gabbo01
Release date
May 15, 2025
Stats
4 stars

The Zeek-MCP server implements the Model Context Protocol, allowing conversational AI clients to perform network traffic analysis using Zeek's powerful packet inspection capabilities directly from within chat interfaces.

Prerequisites

  • Python 3.7 or higher
  • Zeek installed and available in your PATH
  • pip for package installation

Installation

Clone the Repository

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

Install Dependencies

It's recommended to use a virtual environment:

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

If you don't have a requirements.txt file, install the required packages directly:

pip install pandas mcp

Running the MCP Server

Start the server with the following command:

python Bridge_Zeek_MCP.py --mcp-host 127.0.0.1 --mcp-port 8081 --transport sse

Available options:

  • --mcp-host: Host address (default: 127.0.0.1)
  • --mcp-port: Port number (default: 8081)
  • --transport: Protocol, either sse (Server-Sent Events) or stdio

Integrating with LLM Clients

Available MCP Tools

The Zeek-MCP server exposes two main tools:

  1. execzeek(pcap_path: str) -> str

    • Runs Zeek on the specified PCAP file
    • Returns a list of generated log filenames or "1" on error
  2. parselogs(logfile: str) -> DataFrame

    • Parses a Zeek log file
    • Returns the parsed content

Claude Desktop Integration

To set up Claude Desktop as a client:

  1. Go to ClaudeSettingsDeveloperEdit Configclaude_desktop_config.json
  2. Add the following configuration:
{
  "mcpServers": {
    "Zeek-mcp": {
      "command": "python",
      "args": [
        "/ABSOLUTE_PATH_TO/Bridge_Zeek_MCP.py",
      ]
    }
  }
}

Alternatively, edit this file directly:

/Users/YOUR_USER/Library/Application Support/Claude/claude_desktop_config.json

5ire Integration

To set up with 5ire:

  1. Open 5ire and go to ToolsNew
  2. Configure as follows:
    • Tool Key: ZeekMCP
    • Name: Zeek-MCP
    • Command: python /ABSOLUTE_PATH_TO/Bridge_Zeek_MCP.py

You can also integrate with Chainlit by following their MCP documentation.

Usage Examples

The server can be used to analyze network packet captures (PCAP files). The workflow typically involves:

  1. Running execzeek with a path to a PCAP file
  2. Using parselogs to parse and analyze the generated log files
  3. Getting AI-powered insights on the network traffic

Example PCAP files for testing can be found in the pcaps folder of the repository.

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

claude mcp add-json "zeek-mcp" '{"command":"python","args":["Bridge_Zeek_MCP.py"]}'

See the official Claude Code MCP documentation for more details.

For Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

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

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

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

3. Restart Claude Desktop for the changes to take effect

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later