Wireshark Mcp

io.github.bx33661由 GitHub 帳號 bx33661 發布v0.6.5更新於 Oct 24, 2026

Professional network analysis with tshark. Security audits, deep-dives, and threat detection.

已驗證STDIO僅桌面開發者工具安全與監控

概覽

AI 產生的概覽

封裝 tshark,讓助理能開啟封包擷取、擷取欄位、執行統計並掃描安全異常。

可以做什麼
提供 52 個由真實 tshark 輸出支撐的工具:開啟 pcap、快速分析、封包清單與詳情、跟隨串流、欄位擷取(HTTP、DNS、任意欄位)、聚合與統計、約 20 種協定的協定分析、TLS/WPA 解密,以及憑證掃描、連接埠掃描、DNS 通道、DoS、信標、資料外洩和 YARA 等安全檢查。可選的 Wireshark 套件工具(capinfos、mergecap、editcap、dumpcap、text2pcap)會被自動偵測並增加擷取、合併、裁剪和匯出功能。full、analysis、core 三種設定可縮減對外揭露的工具數量。
適用情境
當你希望助理用自然語言檢查 .pcap 檔案或即時流量時使用:事件排查、威脅狩獵、協定故障診斷,或從擷取中擷取特定欄位而不必自己撰寫 tshark 指令。
執行需求
本機程序:需要 Python 3.10+ 以及已安裝 Wireshark 且 tshark 在 PATH 中;透過 pip 或 uvx(wireshark-mcp)安裝。可選的套件工具可啟用額外功能。未宣告帳戶、API 金鑰或環境變數,但文件提到 WIRESHARK_MCP_MAX_RESULT_CHARS 和 WIRESHARK_MCP_ALLOWED_DIRS 用於調校和檔案寫入權限。
安裝前請注意
有 11 個工具會寫入檔案(即時擷取、合併、篩選儲存、editcap、text2pcap、框架擷取、物件匯出),在 WIRESHARK_MCP_ALLOWED_DIRS 指定已存在目錄之前會拒絕執行。遠端 HTTP/SSE 綁定預設僅限回送位址,除非在受信任的已驗證 TLS 代理後明確提供 --allow-insecure-http。擷取檔可能包含憑證或個人資料;結果預設在 8000 字元處截斷。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Wireshark Mcp,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

[Wireshark MCP]

Wireshark MCP

Give your AI assistant a packet analyzer.

Drop a .pcap file, ask questions in plain English — get answers backed by real tshark data.

[CI] [GitHub Release] [PyPI] [Python] [MIT License] [Featured by Awesome REA]

English • 中文 • Docs • Changelog • Roadmap • Contributing


What is this?

An MCP server that wraps tshark (and optional Wireshark suite tools) into a structured analysis interface. Works with Claude Desktop, Claude Code, Cursor, VS Code, and 18+ other MCP clients.

You:    "Find all DNS queries going to suspicious domains in this capture."Claude: [calls wireshark_extract_dns_queries → wireshark_detect_dns_tunnel]        "Found repeated high-entropy DNS queries consistent with tunneling: ..."

New in 4.0

  • Capture index. With the optional [index] extra, wireshark_index dissects a capture once into a local DuckDB file. Later wireshark_aggregate and wireshark_extract_fields calls read it with answers identical to tshark: 408× faster at 1 GB, and at 10 GB it answers questions the tshark path stops on. It also adds read-only SQL, capture sets, first-seen timelines, capture or window diffs and Parquet export. See Capture index.
  • One finding shape. Every detector returns data.findings with a stable id, evidence anchors, a native tshark command to re-check it and candidate ATT&CK techniques.
  • Case files. wireshark_case keeps captures, recorded results, findings and analyst verdicts in a JSON case file, so a long investigation survives a context reset. See Findings and cases.

Upgrading from 3.x needs no configuration change. Scripts that parsed the plain-text output of wireshark_detect_beaconing, wireshark_detect_exfiltration, wireshark_detect_protocol_anomalies, wireshark_detect_arp_spoofing, wireshark_yara_scan or wireshark_quick_analysis should read the JSON envelope instead. Full notes: 4.0.0 changelog.


Install

Claude Code / Codex plugin route

Prerequisites: uv and Wireshark CLI (tshark). The plugin includes this project and both skills; the client runs the locked Python project through uv over stdio. It does not install Wireshark or capture drivers.

From a checkout containing these plugin manifests, choose your client:

sh
# Codexcodex plugin marketplace add .codex plugin add wireshark-mcp@wireshark-mcp
# Claude Codeclaude plugin marketplace add .claude plugin install wireshark-mcp@wireshark-mcp

See plugin distribution for local installation, old-version refresh, environment settings and the GitHub entrypoint after publication. Choose this route or the traditional registration route below, not both.

Traditional Python package route

Prerequisites: Python 3.10+ and Wireshark with tshark on PATH.

Wireshark MCP runs on the stable MCP Python SDK 2.x line (mcp>=2.1.1,<3).

sh
pip install wireshark-mcpwireshark-mcp install   # choose from detected MCP clients

For scripts/non-interactive terminals, select clients explicitly. Preview before installing into the current project:

sh
wireshark-mcp install --client codex --scope project --dry-runwireshark-mcp install --client codex --scope project

The default scope is global. Repeat --client or explicitly use --client all. Restart the client to load configuration. See the installation guide for updates, removal, backups and exit codes.

Optional extras add features on top of the base install: index (DuckDB capture index for large captures), geoip (GeoIP enrichment) and yara (YARA scanning), or all:

sh
pip install 'wireshark-mcp[index]'

The container image and the plugin route ship without extras. Every setting, extra and limit is listed in the configuration reference.

The project also ships MCP and full TShark CLI analysis skills; see skill discovery and usage.

Run wireshark-mcp doctor if anything looks off. See docs/manual-configuration.md for manual setup or platform-specific notes.


Quick Start

Point your AI client at a .pcap file and try:

Analyze capture.pcap using the Wireshark MCP tools.Start with wireshark_open_file, then run wireshark_quick_analysis.Use wireshark_aggregate for any capture-wide count or distribution.Write findings to report.md.

For a large capture, or several related ones, build the index first and keep the investigation in a case file:

Index big.pcapng with wireshark_index, then use wireshark_aggregate andwireshark_index action="timeline" to find when 10.0.0.5 first appeared.Open a case with wireshark_case, record every detector result you rely on,and verify each conclusion with wireshark_get_packet_details.

Tools

54 tools, each backed by real tshark output — organized into categories:

CategoryHighlightsCount
Entry & Workflowwireshark_open_file, wireshark_quick_analysis, wireshark_case (persistent investigation case files)3
Packet AnalysisPacket list, details, bytes, context, stream follow, search, file info8
Data ExtractionHTTP requests, DNS queries, arbitrary fields, object export4
StatisticsAggregate/group/distinct/top-k/time buckets, protocol hierarchy, endpoints, conversations, I/O graph, expert info, service response time, flow graph8
Security & AnomalyCredential scan, port scan, DNS tunnel, DoS, beaconing, exfiltration, protocol anomalies, YARA8
Protocol Analysiswireshark_analyze_protocol (25 protocols incl. BLE pairing, scanner detection, GATT timeline with handle labels, connection lifecycle), TCP health, ARP spoofing3
Decrypt & DissectionTLS/WPA decrypt, decryption check, decode-as, protocol preferences5
Forensics & EnrichmentTLS fingerprints, file signature scan, GeoIP3
File Ops, Capture & SuiteLive capture, interfaces, merge, filter-save, editcap trim/split/dedup/time-shift, frame extract, text2pcap, capabilities11
Capture Index (optional [index] extra)wireshark_index: one tshark pass into a local DuckDB file; wireshark_aggregate and wireshark_extract_fields reuse it. Read-only SQL, multi-capture sets, first-seen timelines, capture/window diffs and Parquet export1

One tool covers 25 protocols rather than 25 tools covering one each: wireshark_analyze_protocol takes a protocol argument (tls_handshakes, mqtt, modbus, s7comm, zigbee, wifi, rtp, kerberos, …) and applies the right fields and display filter for it. The field names are the point — s7comm.param.item.dbnum is not something a caller should have to guess, and a wrong guess returns an empty result that reads like a clean capture.

The server starts with only tshark required. Optional tools (capinfos, mergecap, editcap, dumpcap, text2pcap) are auto-detected and enable extra features when present.

Context cost

The tool list travels in the prompt prefix of every request your client sends, so its size is a fixed per-request cost. The default surface is ~23 KB — about 9 KB of parameter schema, 5 KB of descriptions, and 3 KB of read/write annotations — and it is byte-identical across restarts so clients can cache the prefix rather than re-reading it each session.

If your client never captures live traffic or writes pcaps, --profile advertises less:

ProfileToolsPayloadDrops
full (default)54~23 KBnothing
analysis42~18 KBlive capture, interface listing, all caller-directed file-writing tools
core34~15 KBthe above, plus decryption, dissection overrides, and low-level views
bash
wireshark-mcp serve --profile core

Runtime prompts and protocol recommendations respect the selected profile. Static guides may describe full-only workflows, but the server never recommends an excluded tool during capture discovery.

Tool results are bounded too, since a result stays in the conversation for the rest of the session. Output over 8000 characters is truncated head-and-tail with a marker, and the tool's offset / limit / display_filter parameters are the way to page through the rest. Raise or lower the ceiling with:

bash
export WIRESHARK_MCP_MAX_RESULT_CHARS=16000

Every tool also declares whether it reads or writes, so clients can auto-approve the 41 read-only analysis tools and still prompt for the 12 that create files (live capture, merge, filter-save, editcap, text2pcap, frame extract, object export, case files). wireshark_index is marked non-destructive: it writes only the server's own index cache.

Since 3.0, those tools fail closed until WIRESHARK_MCP_ALLOWED_DIRS names existing directories. Remote HTTP/SSE binding also stays loopback-only unless --allow-insecure-http is explicitly supplied behind a trusted authenticated TLS proxy. See the 3.0 security migration guide.


Documentation

TopicLink
Documentation indexdocs/README.md
Configuration reference (extras, environment variables, limits)docs/configuration.md
Capture-wide aggregationdocs/aggregation.md
Capture index (DuckDB)docs/capture-index.md
Findings and case filesdocs/findings-and-cases.md
Install, update and uninstalldocs/installation.md
Platform setup (macOS/Linux/Windows)docs/platform-validation.md
Manual client configurationdocs/manual-configuration.md
Deployment scenariosdocs/deployment-scenarios.md
3.0 security migrationdocs/security-hardening-v3.md
Prompt templatesdocs/prompt-engineering.md
Architecturedocs/architecture.md
Release checklistdocs/release-checklist.md
ContributingCONTRIBUTING.md
ChangelogCHANGELOG.md
Feature roadmapROADMAP.md
Security policySECURITY.md

Development

sh
uv sync --group dev --extra indexuv run python -m pytestuv run python -m ruff check src/ tests/

See CONTRIBUTING.md for the full guide.


來源:README.md,提交 23afd00

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.6.5最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分