TShark2MCP
Provides a suite of tools for network packet analysis based on Wireshark's TShark utility, enabling AI agents to analyze pcap files, extract network sessions, filter traffic by protocol or time, and calculate statistical metrics.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@TShark2MCPSummarize the network sessions and protocol distribution in capture.pcap"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
TShark2MCP
AI-assisted pcap/pcapng analysis over the
Model Context Protocol. Wraps Wireshark's
tshark / capinfos as 5 typed MCP tools so AI clients (Claude Desktop,
Cursor, VS Code) can analyze network captures through a standardized interface.
All processing is local — captures never leave the machine.
Tools
Each tool exposes a full JSON Schema (auto-generated from typed parameters), so the AI client knows exactly what to pass and what comes back.
Tool | Purpose |
| File metadata + protocol hierarchy ( |
| TCP streams / UDP sessions with per-direction packet/byte counts |
| Filter by protocol and/or capture-relative time window |
| Deep-dive one TCP stream / UDP session by 5-tuple (matches both directions) |
| Retransmission rate, throughput, duplicate ACKs, out-of-order, HTTP latency |
Related MCP server: TShark MCP
Requirements
Python ≥ 3.10
Wireshark ≥ 4.0 — optional. A stripped portable build (~118 MB, Windows) is bundled under
vendor/wireshark/and used by default. Install Wireshark only to override the bundled copy or to run outside this source tree.
Install
cd TShark2MCP
python -m venv .venv
.venv\Scripts\activate # Windows; `source .venv/bin/activate` on Unix
pip install -e ".[dev]"tshark is found by cascading lookup:
TSHARK_PATHenv var (executable file or Wireshark install directory)Bundled
vendor/wireshark/shipped with the repo (default — no install needed)Common Windows install dirs (
C:\Program Files\Wireshark, ...)System
PATH
With vendor/wireshark/ present you need neither Wireshark installed nor
TSHARK_PATH set.
Run
python -m tshark_mcp # stdio transport (default)
# or the console script the editable install registered:
tshark-mcpConfigure an MCP client
Claude Desktop / Cursor (claude_desktop_config.json or equivalent). Point
command at your project venv's python:
{
"mcpServers": {
"tshark": {
"command": "D:\\<path>\\TShark2MCP\\.venv\\Scripts\\python.exe",
"args": ["-m", "tshark_mcp"]
}
}
}The bundled vendor/wireshark/ is used automatically — no env is needed.
Set env.TSHARK_PATH only to force a specific tshark:
"env": { "TSHARK_PATH": "C:\\Program Files\\Wireshark\\tshark.exe" }Test
pytest # all tests (integration ones need tshark)
pytest -m "not integration" # pure unit tests only (no tshark)Integration tests use the sample .pcap / .pcapng files in the repository
root.
Architecture
src/tshark_mcp/
server.py MCPServer + register_all
config.py tshark/capinfos path resolution
executor.py async tshark/capinfos subprocess wrapper (non-blocking)
filters.py display-filter construction (typed, injection-safe)
parsers.py capinfos / io,phs / conv text parsing
security.py protocol allowlist
models.py pydantic request/response models (= each tool's inputSchema)
tools/ overview, conversations, extract, statisticsDesign: tool logic is pure async (executor, params) -> result;
register_all wires each onto @mcp.tool() with a shared TSharkExecutor
closure, so tools stay unit-testable with a mock executor and no MCP server.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseBqualityAmaintenanceAn MCP server that enables LLMs to analyze pcap files by providing tools for packet dissection, stream following, and data extraction via tshark. It supports protocol hierarchy analysis, credential scanning, and threat intelligence checks on captured network traffic.51201MIT
- FlicenseNot gradedqualityDmaintenanceAn MCP server for analyzing network traffic and pcap files using tshark. It enables users to list TCP streams, extract application-layer payloads, and perform packet analysis with BPF filters.2
- AlicenseAqualityCmaintenanceAn MCP server that exposes TShark as tools for AI-assisted network packet analysis, supporting PCAP analysis, live capture, TLS decryption, and telecom/SS7 signaling protocols.251MIT
- FlicenseBqualityCmaintenanceMCP server for network-troubleshooting PCAP analysis via tshark, enabling users to analyze PCAP files, detect anomalies, and troubleshoot network issues.22
Related MCP Connectors
MCP server for secureFlows: token-free URL builders and integration-linting tools for AI agents.
MCP server for AI access to Swagger by SmartBear.
MCP server for AI access to SmartBear tools, including BugSnag, Reflect, Swagger, PactFlow, QTM4J.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/niusulong/TShark2MCP'
If you have feedback or need assistance with the MCP directory API, please join our Discord server