McpcapSAFE
Network analysis for the AI age
Overview
From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.
A modular Python MCP (Model Context Protocol) server for analyzing PCAP files. mcpcap exposes protocol-specific analysis tools that accept a local file path or remote HTTP URL at call time, so the server stays stateless and works cleanly with MCP clients.
Overview
mcpcap uses a modular architecture to analyze different network protocols found in PCAP files. Each module provides specialized analysis tools that can be called independently with any PCAP file, making it perfect for integration with Claude Desktop and other MCP clients.
Key Features
- Stateless MCP Tools: Each analysis call supplies its own PCAP path or URL
- Modular Architecture: DNS, DHCP, ICMP, TCP, SIP, and CapInfos modules with easy extensibility for new protocols
- Advanced TCP Analysis: Connection lifecycle, traffic patterns, retransmissions, and flow inspection
- Local & Remote PCAP Support: Analyze files from local storage or HTTP URLs
- Scapy Integration: Leverages scapy's comprehensive packet parsing capabilities
- Specialized Analysis Prompts: Security, networking, and forensic analysis guidance
- JSON Responses: Structured data format optimized for LLM consumption
Installation
mcpcap requires Python 3.10 or greater.
Using pip
pip install mcpcap
Using uv
uv add mcpcap
Using uvx (for one-time usage)
uvx mcpcap
Using Docker
Build the image from the repository root:
docker build -t mcpcap .
Run it over HTTP for MCP clients that connect to a network endpoint:
docker run --rm \ -p 127.0.0.1:8080:8080 \ -v "$(pwd)/examples:/pcaps:ro" \ mcpcap --transport http --host 0.0.0.0 --port 8080 --allow-unauthenticated-http
Run it over stdio for clients that can spawn `docker
1ef0f9b8c52dOBSERVED · 2026-10-08Connect
Built from this server's own package name, version and transport as found in its source — not copied from anyone's documentation, so it cannot drift against a page we do not control. Replace the environment placeholders with a token scoped to the least it needs.
claude mcp add mcpcap -- None mcpcap==0.6.1
Trust audit
SAFEgrade B · trust 89/100 Nothing in the source contradicts what it says it does. Grade A is reserved for packages that have also passed the behavioural sandbox.
| Layer | What it checks | Result |
|---|---|---|
| L0 | Provenance & inventory | PASS |
| L1 | Static analysis of the code | PASS |
| L2 | Instruction surface (what it tells the agent) | PASS |
| L3 | Class-specific surface | PASS |
| L4 | Behavioural (sandbox) | SKIPPED |
What the source does
- Filesystem
- none-observed
- Network
- declared (1 observation(s))
- Shell
- none-observed
- Dependencies
- pinned
- Secrets in source
- none-found
Findings (15)
dhcp.pcap
dns.pcap
.pre-commit-config.yaml
.readthedocs.yaml
sys.path.insert(0, os.path.abspath("../../src"))with open("../../pyproject.toml", "rb") as f:if curl --silent --show-error --output /dev/null http://127.0.0.1:8080/mcp; then
This pulls `ghcr.io/mcpcap/mcpcap:latest`, publishes `http://127.0.0.1:8080/mcp` only on host loopback, and mounts `./examples` into the container as `/pcaps`.
http://127.0.0.1:8080/mcp
This pulls ``ghcr.io/mcpcap/mcpcap:latest`` and exposes ``http://127.0.0.1:8080/mcp`` with ``./examples`` mounted as ``/pcaps``.
This pulls `ghcr.io/mcpcap/mcpcap:latest`, starts mcpcap on host loopback at `http://127.0.0.1:8080/mcp`, and mounts `./examples` as `/pcaps` inside the container.
Clients must send `Authorization: Bearer <secret>` on every request. Use a TLS reverse proxy and an HTTPS URL for remote clients. A configured token also protects loopback endpoints; stdio is unaffect
Configure the client to send `Authorization: Bearer <secret>` on every request. Use HTTPS through a TLS reverse proxy for remote clients; plain HTTP exposes bearer credentials and capture data on the
readme-assets/mcpcap-logo.png
Gates applied: no_behavioural_pass.
1ef0f9b8c52dfull audit observations/trust-audit/mcp-server/mcpcap__mcpcap-1.json · Report an issue / request a re-scanAudit history
Every audit this server has had. A grade with a past is a grade somebody is still checking.
| Date | Source | Verdict | Grade | Score | Change |
|---|---|---|---|---|---|
| 2026-10-08 | 1ef0f9b8c52d | SAFE | B | 89 | first audit |
Questions
What is the Mcpcap MCP server?
Network analysis for the AI age
Is Mcpcap safe to connect to an agent?
The audit found nothing in the source that contradicts what it says it does, and graded it B (89/100). Grade A is held back for packages that have also passed a sandboxed behavioural run, which is why a clean server reads B.
What credentials does Mcpcap need?
It reads MCPCAP_AUTH_TOKEN from the environment. Give it a token scoped to the least it needs — an agent that can be talked into calling a tool can be talked into calling it with your credentials.
How does Mcpcap run?
It speaks stdio, so it runs as a local process your client starts. It is published on PyPI as mcpcap.
How current is this page?
The grade is for one exact copy of the source (1ef0f9b8c52d), read on 2026-10-08. The repository is watched and re-audited when it changes.