network-forensics-mcp-server
Provides tools for analyzing PCAP files using Wireshark's tshark, enabling deep packet inspection, protocol analysis, filtering, and statistics extraction.
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., "@network-forensics-mcp-serverAnalyze traffic.pcap and show protocol distribution"
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.
MCP Network Forensics
A case-oriented MCP Server for Network Forensics that turns PCAP evidence into a reproducible local investigation: capture manifests, normalized flows/events, IOC pivots, timelines, deterministic findings, stream reconstruction, and quarantined artifacts. TShark remains the dissector backend, not the user-facing workflow.
Features
Case-centric workflow: Register and hash evidence once, then reuse a local SQLite index
Evidence provenance: Findings contain capture, frame, stream, and reproduction references
Deterministic triage: Scan, beacon, DNS tunneling, outbound volume, and lateral-movement heuristics
Bounded execution: Streaming TShark runner, timeout/cancellation, output budgets, and isolated artifacts
MCP-native output: Typed tools, pagination, background jobs, and reusable resources
Optional engine adapters: Offline Zeek JSON logs, Suricata EVE alerts, and YARA artifact matches
Deep Packet Inspection: Access to all Wireshark dissectors (1000+ protocols)
Advanced Filtering: Support for all Wireshark display filters
Protocol Analysis: Automatic statistics and distribution analysis
Security First: Path validation, size limits, input sanitization
Memory Efficient: Streaming extraction and indexed warm queries for large files
Auto-Detection: Automatically finds tshark installation
Related MCP server: SharkMCP
Performance Model
The first index_capture pass reads the PCAP through a bounded streaming
TShark process and writes normalized facts to SQLite. Repeated flow, event,
IOC, timeline, and finding queries use that local index and do not launch a
new TShark process. Runtime depends on dissectors, storage, and capture shape;
benchmark your own evidence corpus rather than relying on fixed timings.
Reproducible Benchmark
Run the executable benchmark against a real PCAP/PCAPNG. It reports registration time, cold indexing time, p50/p95 warm-query latency, peak RSS, and whether the configured file/output/response budgets held. Use a fresh case root for a cold measurement:
python benchmarks/benchmark_case.py /absolute/path/to/large.pcapng \
--case-root /tmp/mcp-network-forensics-benchmark \
--queries 10 \
--max-rss-bytes 2147483648 \
--json-out /tmp/mcp-network-forensics-benchmark.jsonThe harness does not fabricate a target size or timing claim. For PCAPs near
the 10 GB default file limit, allow sufficient disk space for the SQLite case
index and use --force only when intentionally repeating a cold index.
Requirements
Python 3.9+
Wireshark/tshark (4.0+) and capinfos installed
MCP-compatible client (Claude Desktop, VSCode, Cline, etc.)
Optional: Zeek, Suricata, and YARA installed locally for their adapters
Installation
1. Install Wireshark
Ubuntu/Debian:
sudo apt-get update
sudo apt-get install tshark wireshark-commonmacOS:
brew install wiresharkWindows: Download from wireshark.org
Verify installation:
tshark --version
capinfos --version # Optional, for faster packet counting2. Install MCP Server
# Clone repository
git clone https://github.com/yourusername/mcp-network-forensics.git
cd mcp-network-forensics
# Create virtual environment
python -m venv venv
source venv/bin/activate # Linux/Mac
# or: venv\Scripts\activate # Windows
# Install package
pip install -e .Configuration
Claude Desktop
Edit claude_desktop_config.json:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%/Claude/claude_desktop_config.json
{
"mcpServers": {
"network-forensics": {
"command": "python",
"args": ["-m", "mcp_network_forensics"],
"env": {
"MCP_MAX_FILE_SIZE": "10737418240",
"MCP_MAX_PACKETS": "10000",
"TSHARK_PATH": "/usr/bin/tshark"
}
}
}
}VSCode (with Cline extension)
Add to your settings:
{
"mcpServers": {
"network-forensics": {
"command": "python",
"args": ["-m", "mcp_network_forensics"],
"disabled": false,
"autoApprove": []
}
}
}Available Tools
DFIR workflow
open_capture(file_path)creates a SHA-256-backed capture manifest.index_capture(capture_id)builds the normalized frame/flow/event index. Setbackground=truefor a job.triage_capture(capture_id)returns ranked findings and top entities.query_flows,query_events,pivot_iocs, andget_entity_timelineperform warm indexed pivots.reconstruct_stream,export_objects, andpreview_artifacthandle bounded content safely.get_capture_healthandinspect_capture_healthexpose integrity and expert diagnostics.run_zeek_adapter,run_suricata_adapter, andrun_yara_adapterinvoke optional local engines with fixed offline commands and bounded output. Useparse_zeek_adapter,parse_suricata_adapter, andparse_yara_adapterto normalize existing tool output without executing an engine.
Optional Engine Adapters
Adapters never install tools, open sockets, or accept arbitrary child-process
arguments. list_plugins() reports capability state without claiming an engine
is installed. Missing binaries return status: "unavailable" with a warning.
Zeek:
zeek -r <pcap> LogAscii::use_json=T Log::default_logdir=<managed-dir>. Normalizesconn,dns,http,ssl, andnotice-style JSON records and preserves original fields underfields.Suricata:
suricata -c <yaml> -r <pcap> -l <managed-dir>. Requires an operator-supplied YAML configuration so EVE output policy is explicit. Normalizes EVE events and exposes alert records withpcap_cntwhen present.YARA:
yara -a <timeout> <rules> --scan-list <managed-list>. Skips symlinks, bounds file count and file size, and normalizes standardRULE PATHmatches.
Each adapter returns mcp-network-forensics.plugin-result.v1 with status,
records, warnings, truncation state, duration, and network_access: false.
Versioned command policies are stored in src/mcp_network_forensics/plugins/manifests/.
Compatibility packet tools remain available below, but they are bounded adapters. Prefer the case workflow for investigation.
Compatibility packet tools
analyze_pcap_file
Analyze a PCAP file and return summary statistics.
Parameters:
file_path: Absolute path to PCAP file (required)packet_limit: Maximum packets to analyze (default: 1000)display_filter: Optional Wireshark display filter
Example:
{
"file_path": "/home/user/captures/traffic.pcap",
"packet_limit": 100,
"display_filter": "ip.addr == 192.168.1.1"
}get_packet_details
Get detailed information about a specific packet.
Parameters:
file_path: Absolute path to PCAP filepacket_index: Index of packet (0-based)include_layers: Include layer information (default: true)
Example:
{
"file_path": "/home/user/captures/traffic.pcap",
"packet_index": 0,
"include_layers": true
}filter_packets
Filter packets using Wireshark display filter syntax.
Parameters:
file_path: Absolute path to PCAP filedisplay_filter: Wireshark filter (e.g., "tcp.port == 80", "http", "dns.qry.name contains 'google'")max_results: Maximum results to return (default: 100)
Example:
{
"file_path": "/home/user/captures/traffic.pcap",
"display_filter": "tcp.flags.syn == 1 and tcp.flags.ack == 0",
"max_results": 50
}get_protocol_statistics
Get protocol distribution statistics.
Parameters:
file_path: Absolute path to PCAP filepacket_limit: Maximum packets to analyze (default: 1000)
Example:
{
"file_path": "/home/user/captures/traffic.pcap",
"packet_limit": 1000
}extract_unique_ips
Extract unique IP addresses from the capture.
Parameters:
file_path: Absolute path to PCAP file
Example:
{
"file_path": "/home/user/captures/traffic.pcap"
}Usage Examples
Basic Analysis
Please analyze this PCAP file and show me the protocol distribution.
File: /home/user/captures/traffic.pcapThreat Hunting
Find all HTTP requests to external IPs in this capture.
File: /home/user/captures/web.pcapNetwork Troubleshooting
Show me all TCP SYN packets without ACK (possible port scan).
File: /home/user/captures/suspicious.pcapDeep Inspection
Get detailed information about packet 100, including all layers.
File: /home/user/captures/malware.pcapSecurity Features
Path Validation: Only absolute paths allowed, no directory traversal
File Size Limits: Configurable max file size (default: 10GB)
Packet Limits: Configurable max packets per request (default: 10,000)
Filter Validation: Syntax is checked by TShark; valid operators such as
>,<,&, and|remain availableTimeout Protection: Request timeout configuration (default: 300s)
Response Budgets: Bounded MCP responses, extraction output, stderr, and artifact bytes
Evidence Roots: Optional
MCP_ALLOWED_ROOTSallowlist for input capturesPlugin Boundary: Plugins must be pre-installed, hash-validated, offline, and manifest-bounded
Environment Variables
Variable | Description | Default |
| Server name | mcp-network-forensics |
| Max file size in bytes | 10737418240 (10GB) |
| Max packets per request | 10000 |
| Request timeout in seconds | 300 |
| Maximum inline response bytes | 1048576 |
| Maximum streamed TShark output bytes | 21474836480 |
| Maximum bytes exported per object operation | 52428800 |
| Maximum disk-heavy background jobs | 2 |
| Address-space limit for optional engine adapters | 2147483648 (2GB) |
| SQLite/artifact/plugin workspace |
|
| OS path-separator-delimited evidence allowlist | unset |
| Explicit Wireshark profile | unset |
| Enable name resolution | false |
| Path to tshark binary | auto-detect |
| Path to Zeek binary | auto-detect |
| Path to Suricata binary | auto-detect |
| Default Suricata YAML configuration | unset; required by adapter |
| Path to YARA binary | auto-detect |
Architecture
MCP client
|
v
FastMCP tools/resources
|
Case registry + bounded jobs
|
Streaming TShark runner
|
SQLite normalized index + quarantined artifacts
|
Deterministic triage/detections + optional pluginsProject Structure
mcp-network-forensics/
├── src/mcp_network_forensics/
│ ├── server.py # Typed MCP tools/resources
│ ├── core/tshark_runner.py # Bounded subprocess execution
│ ├── core/jobs.py # Background jobs/cancellation
│ ├── storage/case_store.py # SQLite case registry/index
│ ├── storage/artifact_store.py # Quarantined content-addressed objects
│ ├── analysis/triage.py # Explainable DFIR detections
│ ├── plugins/adapters.py # Zeek, Suricata, and YARA offline adapters
│ ├── plugins/manifests/ # Versioned command/output policies
│ ├── plugins/runner.py # Generic manifest-driven plugins
│ ├── capture/ # Compatibility adapters
│ ├── models/ # Versioned Pydantic contracts
│ └── utils/ # Validation and formatting
├── pyproject.toml
├── requirements.txt
├── requirements-dev.txt
└── README.mdDevelopment
Setup Development Environment
pip install -e ".[dev]"Code Quality
black src
isort src
flake8 src
mypy src
pytestCoverage is optional when pytest-cov is installed:
pytest --cov=mcp_network_forensics --cov-report=term-missingTroubleshooting
tshark not found
# Check installation
which tshark # Linux/Mac
where tshark # Windows
# Set path manually
export TSHARK_PATH=/usr/bin/tshark # Linux/Mac
set TSHARK_PATH=C:\Program Files\Wireshark\tshark.exe # WindowsTimeout errors on large files
Increase timeout or reduce requested scope. Indexing can run in the background
and be monitored with get_job_status:
export MCP_TIMEOUT=600
export MCP_MAX_PACKETS=5000License
MIT License - see LICENSE file for details.
Acknowledgments
Wireshark - Network protocol analyzer
Model Context Protocol - MCP specification
FastMCP - Python MCP SDK
Support
For issues and feature requests, please use the GitHub issue tracker.
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
- AlicenseBqualityFmaintenanceA Model Context Protocol server that provides LLMs with real-time network traffic analysis capabilities, enabling tasks like threat hunting, network diagnostics, and anomaly detection through Wireshark's tshark.Last updated7558MIT
- AlicenseAqualityDmaintenanceA Model Context Protocol server that provides network packet capture and analysis capabilities through Wireshark/tshark integration, enabling AI assistants to perform network security analysis and troubleshooting.Last updated435MIT
- Alicense-qualityDmaintenanceProvides AI assistants with direct access to Wireshark network analysis capabilities, enabling live packet capture, PCAP file analysis, protocol statistics, and network monitoring through a secure MCP interface.Last updated1MIT
- Alicense-qualityDmaintenanceEnables AI assistants to analyze network traffic using Wireshark/tshark, providing packet statistics, protocol analysis, and anomaly detection through natural language interaction.Last updated64MIT
Related MCP Connectors
OCR, transcription, file extraction, and image generation for AI agents via MCP.
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Real-time Amazon, WIPO & PACER data for AI agents — 19 tools via the MCP protocol.
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/jus1-c/network-forensics-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server