mcpField
W
Wireshark MCP Server

Wireshark MCP Server

Local
github.com/A-G-U-P-T-ASecurity24Updated 13w ago

About Wireshark MCP Server

Wireshark MCP Server is an MCP server built on TShark that lets AI agents capture live packets and analyze pcap and pcapng files. It runs with any stdio MCP host and exits at startup if TShark is missing, so hosts show it as offline rather than exposing a broken tool list.

Key features

  1. 01Live capture and pcap/pcapng analysis tools
  2. 02Guided workflows through MCP prompts
  3. 03Startup preflight check for TShark
  4. 04setup and doctor command line helpers
  5. 05Allowlisted interfaces and argv-based subprocess calls

Use cases

  1. 01Troubleshooting network connectivity or performance issues
  2. 02Analyzing DNS or HTTP traffic in saved pcap files
  3. 03Reviewing network traffic for security concerns

MCP support

This project is an MCP server that exposes capture, traffic analysis and diagnostic tools, prompts and resources to MCP clients.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

No install method listed yet

We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.

Repository

Tools

No tool list yet

Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.

Details

From the project README

Wireshark MCP Server

Packet capture and analysis for AI agents via the Model Context Protocol (MCP).

Works with any stdio MCP host: Cursor, Claude Desktop, Claude Code, VS Code / Copilot, Windsurf, custom agents, and similar tools. No vendor lock-in — the host only needs to launch:

python -m wireshark_mcp

Version 0.2.2

Docs (wiki)
Setup for novicesInstall TShark + this package
MCP clientsCursor, Claude, VS Code, generic
TroubleshootingOffline server, PATH issues
SecuritySafe capture rules

GitHub Pages (optional): set Settings → Pages → Source = GitHub Actions, then the Pages workflow publishes docs/ as HTML.

What you get

  • Live capture and pcap/pcapng analysis through MCP tools
  • Guided workflows via MCP prompts
  • Startup preflight: if TShark is missing, the process exits so your host shows the server offline/error instead of a broken tool list
  • setup / doctor CLIs so a new user can configure paths without guessing

Requirements

  • Python 3.10+
  • TShark (PATH or TSHARK_PATH)
  • Npcap (Windows) or libpcap (Unix) for live capture
  • Authorization to capture on the target network

Quick start (5 minutes)

git clone https://github.com/A-G-U-P-T-A/wireshark-mcp
cd wireshark-mcp
python -m venv .venv

# Windows:  .venv\Scripts\activate
# Unix:     source .venv/bin/activate

python -m pip install -e .
python -m wireshark_mcp doctor
python -m wireshark_mcp setup

setup detects TShark (or asks for its path) and writes or prints a standard mcpServers JSON block. Point your host at that config, then reload / restart the host.

Windows Wireshark install:

winget install --id WiresharkFoundation.Wireshark -e

MCP config (any host)

{
  "mcpServers": {
    "wireshark": {
      "command": "/absolute/path/to/.venv/bin/python",
      "args": ["-m", "wireshark_mcp"],
      "env": {
        "TSHARK_PATH": "/absolute/path/to/tshark"
      }
    }
  }
}

Windows example paths:

  • Python: C:\\Users\\YOU\\...\\wireshark-mcp\\.venv\\Scripts\\python.exe
  • TShark: C:\\Program Files\\Wireshark\\tshark.exe

Ready-made template: examples/mcpServers.wireshark.json
Client-specific file locations: docs/Clients.md

CLI
CommandPurpose
python -m wireshark_mcpRun the MCP server (stdio)
python -m wireshark_mcp doctorJSON dependency report (exit 0/1)
python -m wireshark_mcp setupInteractive TShark + host config
python -m wireshark_mcp setup --client printPrint JSON only

Project layout

src/wireshark_mcp/     # MCP server package (tools, prompts, preflight)
examples/              # Sample mcpServers JSON
docs/                  # Setup wiki for novices
tests/                 # pytest (no live capture by default)
.cursor/skills/        # Optional Cursor agent skill
pyshark_mcp.py         # Thin legacy shim

Tools (selected)

AreaTools
Setupcheck_environment, configure_tshark
Capturelist_interfaces, quick_capture, capture_live_packets, save_capture_to_file
Analysisread_pcap_file, analyze_traffic, deep_packet_analysis, quick_traffic_analysis
App protocolsanalyze_dns_traffic, analyze_http_traffic, analyze_http_traffic_tabular
Diagnosticsprotocol_hierarchy_statistics, expert_information, filtered_packet_display

Prompts & resources

Prompts: packet_capture_help, investigate_live_traffic, analyze_pcap_file, security_traffic_review, safe_capture_rules

Resources: pyshark://version, pyshark://config (allow_simulation is always false)

Security

  • Interfaces allowlisted from tshark -D; shell metacharacters rejected
  • Subprocesses use argv + shell=False
  • Failures return errors — no simulated packets

Details: docs/Security.md

Tests & CI

python -m pip install -e ".[dev]"
pytest -q -m "not live"

GitHub Actions installs TShark on Ubuntu and runs the non-live suite.

License

MIT

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.