MCP Wireshark logo

MCP Wireshark

Community
khuynh22

An MCP server that integrates Wireshark/tshark with AI tools and IDEs. Capture live traffic, parse .pcap files, apply display filters, follow streams, and export JSON - all via Claude Desktop, VS Code, or CLI. Cross‑platform, typed, tested, and pip‑installable.

Publisherkhuynh22
Repositorymcp-wireshark
LanguagePython
Forks
8
Stars
61
Available tools
0
Transport typestdio
LicenseMIT
Links
  • Connect tools to AI workflows

    MCP Wireshark exposes MCP capabilities that can be used by compatible AI clients and agents.

  • 0 available tools

    Browse the callable actions below, including names and descriptions when provided by the server.

  • Ready-to-copy setup

    Use the installation snippets to configure this server in your preferred MCP client.

  • Open source signals

    61 stars and 8 forks from the linked repository.

mcp-wireshark

Community-maintained MCP server for Wireshark / tshark. Not affiliated with Wireshark or Anthropic. Give your AI assistant direct access to packet captures. Ask Claude to summarize a .pcap, follow a TCP stream, filter for a specific protocol, or capture live traffic — all without leaving the chat.

Claude using mcp-wireshark to analyze a capture

PyPI version CI License: MIT Python 3.10+


Quick start with Claude Code

bash
pip install mcp-wireshark
claude mcp add --transport stdio --scope user mcp-wireshark -- mcp-wireshark

That's it. Open Claude Code and try:

"Summarize ./capture.pcap and tell me which IPs talked the most."

--scope user makes the server available across every Claude Code project. Drop the flag to install it for the current project only. See claude mcp docs for more.

Verify the install

bash
claude mcp list

You should see mcp-wireshark listed. Inside Claude Code, ask:

"Run check_installation."

If tshark is on your PATH, it returns the version. If not, see troubleshooting.


Tools

The server exposes 14 tools, split cleanly between read tools (safe, no side effects) and write tools (capture traffic or write files). Both groups are annotated with the standard MCP readOnlyHint so any compliant client can surface the distinction.

Read tools

Safe to call freely — they only inspect state.

ToolWhat it does
check_installationVerify tshark is installed and show version
list_interfacesList network interfaces available to capture from
read_pcapRead packets from a .pcap / .pcapng file (preview + total count)
display_filterApply a Wireshark display filter to a pcap
summarize_pcapHigh-level summary: I/O stats, protocol hierarchy, top talkers
stats_by_protoProtocol hierarchy statistics
follow_tcpReassemble a TCP stream and return its payload
follow_udpReassemble a UDP stream and return its payload
expert_infotshark expert analysis: warnings, errors, and notes grouped by severity
decode_protocolExtract protocol fields as a TSV table. Curated defaults for HTTP, DNS, TLS, GOOSE, MMS, SV, SIP, ICMP; arbitrary fields for any other protocol
protocol_statsAggregate -z reports (protocol hierarchy, conversations, endpoints, HTTP/DNS/SMB stats)
analyze_iec61850Health triage for GOOSE/SV/MMS captures: per-source OK/WARN/FAIL with sqNum/stNum gaps, TTL violations, smpCnt discontinuities, lost sync, and MMS errors

Write tools

These create files or capture live traffic. Compliant clients may prompt before invoking.

ToolWhat it does
live_captureCapture live traffic from an interface (capped at 5 minutes / 10k packets)
export_jsonExport packets from a pcap to a JSON file at a path you choose

See it in action

These clips run the real tools against demo/demo.pcapng — a short home-network capture. Regenerate them with python demo/render_gif.py <scene>.

summarize_pcap — characterize an unknown capture at a glance

summarize_pcap demo

decode_protocol — filter to a protocol and get a compact table (here: TLS SNI and DNS-over-HTTPS lookups)

decode_protocol demo

expert_info — let tshark surface the warnings and anomalies for you

expert_info demo


Example prompts

Drop these into Claude Code as-is:

List my network interfaces.
Summarize ./traffic.pcap.
From ./traffic.pcap, show me only HTTP requests.
Follow TCP stream 0 in ./traffic.pcap and tell me what protocol is in it.
Capture 30 seconds of traffic on Wi-Fi filtered to tcp.port == 443.
Export every DNS packet from ./traffic.pcap to ./dns.json.
Decode the GOOSE messages in ./substation.pcapng — only stNum >= 1.
Run expert analysis on ./traffic.pcap and group findings by severity.
Show me the IP conversations in ./traffic.pcap.

Useful display filters

FilterMatches
tcp.port == 80HTTP
tcp.port == 443HTTPS
dnsAll DNS
http.requestHTTP requests only
ip.addr == 10.0.0.1Traffic to/from a specific host
tcp.flags.syn == 1 && tcp.flags.ack == 0TCP SYN packets only

For substation engineers analyzing IEC 61850 traffic:

FilterMatches
gooseAll GOOSE messages
goose.stNum > 0GOOSE messages with state changes
mmsAll MMS traffic
svSampled Values

Other clients

Anything that speaks MCP works. The package installs an mcp-wireshark binary on PATH.

Edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):

json
{
    "mcpServers": {
        "wireshark": {
            "command": "mcp-wireshark"
        }
    }
}

Create .vscode/mcp.json in your workspace:

json
{
    "servers": {
        "wireshark": {
            "command": "mcp-wireshark"
        }
    }
}

Use the same stdio invocation: command: mcp-wireshark. No transport flags.


Prerequisites

  • Python 3.10+
  • Wireshark installed; tshark reachable on PATH

Install with pip or uv:

bash
pip install mcp-wireshark
# or
uvx mcp-wireshark

Troubleshooting

Add Wireshark to your system PATH:

  1. Press Win+R → run sysdm.cpl → Advanced → Environment Variables
  2. Edit Path → add C:\Program Files\Wireshark
  3. Restart your terminal and Claude Code, then re-run check_installation

(Avoid passing PATH through claude mcp add --env — values are taken literally, no %PATH% expansion.)

Add yourself to the wireshark group, then log out and back in:

bash
sudo usermod -aG wireshark $USER
  • Confirm the interface name from list_interfaces (Wireshark uses different names than ifconfig/ip)
  • On macOS, you may need to install ChmodBPF (ships with the Wireshark .dmg)
  • Check that no display filter is excluding everything

Development

bash
git clone https://github.com/khuynh22/mcp-wireshark.git
cd mcp-wireshark
python -m venv venv && source venv/bin/activate  # Windows: venv\Scripts\activate
pip install -e ".[dev]"

pytest                   # tests
black src tests          # format
ruff check src tests     # lint
mypy src                 # type check

The codebase is organized so new tools land in one of two clearly-scoped files:

  • src/mcp_wireshark/read_tools.py — anything that just inspects state
  • src/mcp_wireshark/write_tools.py — anything that captures traffic or writes files

server.py only contains routing. See CLAUDE.md and CONTRIBUTING.md.

Security

Every file path is validated (.. rejected, extension allow-listed). Every display filter is checked for shell metacharacters. tshark is always invoked via asyncio.create_subprocess_exec, never shell=True. Hard caps: 10k packets per call, 5 min per live capture. See SECURITY.md.

License

MIT — see LICENSE.

Use MCP Wireshark MCP with multiple AI models

TypingMind connects MCP tools at the workspace level, so once MCP Wireshark is connected, you can use it with different AI models in TypingMind instead of setting it up separately for each model. This MCP runs locally through the TypingMind MCP connector on your device.

Setup guide to use the local connector

Use this when the MCP server needs access to local files, apps, or private resources on your computer.

1

Open the MCP settings

In TypingMind, go to Settings, Advanced Settings, then Model Context Protocol and choose Setup Connector.

  1. Open TypingMind in your browser.
  2. Click the Settings icon.
  3. Go to Advanced Settings.
  4. Open the Model Context Protocol section.
  5. Click Setup Connector and choose This Device.
TypingMind MCP connector setup screen with This Device selected
2

Run the connector command

Choose This Device, copy the command from TypingMind, and run it in Terminal. Keep the process running while you use MCP.

  1. Copy the setup command shown by TypingMind.
  2. Open Terminal on macOS or Windows Terminal on Windows.
  3. Paste and run the command.
  4. Approve the package install if Terminal asks you to proceed.
  5. Keep the Terminal window running while using MCP tools.
3

Add MCP Wireshark as a server

When the connector status is Ready, click Edit Servers and paste the MCP server configuration.

  1. Wait until the connector status shows Ready.
  2. Click Edit Servers.
  3. Paste the MCP Wireshark MCP server configuration.
  4. Save the server list.
  5. Refresh if you want to confirm the connector is still ready.
TypingMind MCP settings showing active server and Edit Servers button
{
  "mcpServers": {
    "mcp-wireshark": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

Use it across models

Save the server list, open Plugins, enable the MCP Wireshark MCP tools, then select any supported AI model in TypingMind and use the tools in chat or assign them to an AI agent.

  1. Open the Plugins page in TypingMind.
  2. Enable the MCP Wireshark MCP tools.
  3. Start a chat and choose the AI model you want to use.
  4. Use the MCP tools in chat or assign them to an AI agent.
  5. Switch to another AI model whenever needed without reconnecting MCP.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use MCP Wireshark to help me with this task?
MCP Wireshark
Sure. I read it.
Here is what I found using MCP Wireshark.

Frequently asked questions

What is the MCP Wireshark MCP server used for?

MCP Wireshark is an MCP server that lets compatible AI clients connect to external tools and context. In TypingMind, you can add this MCP server once and make its tools available in your AI workspace.

Can I use MCP Wireshark MCP with multiple AI models in TypingMind?

Yes. TypingMind connects MCP tools at the workspace level, so you can use MCP Wireshark with different AI models such as Claude, ChatGPT, Gemini, or other models you have configured in TypingMind without setting up the MCP server separately for each model.

Why use MCP Wireshark MCP with TypingMind?

TypingMind is one of the best frontends for LLM chat because it brings multiple AI models, prompts, plugins, AI agents, API keys, and MCP tools into one workspace. With MCP Wireshark connected, you can use its MCP tools across your preferred models while keeping your chat workflow organized in TypingMind.

How do I connect MCP Wireshark MCP to TypingMind?

MCP Wireshark runs through the TypingMind local MCP connector. This is best when the MCP server needs access to local files, desktop apps, command-line tools, or private resources on your computer.

What tools does MCP Wireshark MCP provide in TypingMind?

MCP Wireshark exposes MCP capabilities that can be enabled from the TypingMind Plugins page and used in chat or assigned to AI agents.

Do I need to share my API keys with TypingMind to use MCP Wireshark MCP?

No. TypingMind is local-first and lets you keep your model providers, API keys, prompts, and MCP configuration under your control. If MCP Wireshark requires authentication, add the required headers, OAuth settings, or local configuration for that MCP server when you create the connection.

Related MCP Servers

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇