# Mcpcap

> Mcpcap is an open-source MCP server for security. MCP server that lets AI clients analyze PCAP network captures with protocol-specific tools. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, API, self-hosted, Linux, macOS, Windows
- **Repository:** https://github.com/mcpcap/mcpcap
- **MCP Registry name:** ai.mcpcap/mcpcap
- **Categories:** [security](https://ai-powered.com/categories/security)
- **Listing updated:** 2026-11-18

## About

The README describes mcpcap as a Python server that gives MCP clients a set of protocol analysis tools for packet capture files. Each tool takes a local file path or an HTTP(S) URL at call time, so the server itself keeps no state between requests.

Analysis is split into modules covering DNS, DHCP, ICMP, TCP, SIP and capinfos-style file metadata, and modules can be loaded selectively with a command-line flag. Results are returned as JSON, which the project positions as suitable for language model consumption. Packet parsing is handled by scapy, and a --max-packets option caps how much of a large file is processed.

The project suits network engineers, VoIP troubleshooters and security analysts who want an assistant to help interpret captures from tools such as Claude Desktop. The README notes that capture files may contain sensitive data and that HTTP transport requires a bearer token when bound to non-loopback interfaces.

## Features

- **Protocol-specific analysis modules:** Separate modules cover DNS, DHCP, ICMP, TCP, SIP and capinfos, and can be enabled individually.
- **Stateless file-based tools:** Each tool call supplies its own local path or remote URL, so no capture is held by the server.
- **Remote capture download:** HTTP and HTTPS PCAP URLs are fetched to a temporary file and cleaned up after analysis.
- **TCP troubleshooting views:** TCP tools cover connection lifecycle, retransmission rates, anomalies and bidirectional traffic flow.
- **Analysis prompts:** Built-in prompts guide security, troubleshooting and forensic review for several protocols.
- **Stdio and HTTP transports:** Runs locally over stdio for desktop clients or as an HTTP endpoint with optional bearer token auth.

## Good for

- Troubleshooting TCP resets and retransmissions in a packet capture
- Reviewing DNS queries in a capture for suspicious domains
- Reconstructing SIP call flows from VoIP signaling traces
- Summarizing capture metadata such as duration and packet rates

## Install

### Claude Code (Terminal)

```sh
claude mcp add mcpcap -- uvx mcpcap
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "mcpcap": {
      "command": "uvx",
      "args": [
        "mcpcap"
      ]
    }
  }
}
```

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "mcpcap": {
      "command": "uvx",
      "args": [
        "mcpcap"
      ]
    }
  }
}
```

### VS Code (.vscode/mcp.json)

```json
{
  "servers": {
    "mcpcap": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "mcpcap"
      ]
    }
  }
}
```

### Windsurf (~/.codeium/windsurf/mcp_config.json)

```json
{
  "mcpServers": {
    "mcpcap": {
      "command": "uvx",
      "args": [
        "mcpcap"
      ]
    }
  }
}
```

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "mcpcap": {
      "command": "uvx",
      "args": [
        "mcpcap"
      ]
    }
  }
}
```

## Tools

- `analyze_dns_packets`: Complete DNS traffic analysis of a PCAP file.
- `analyze_dhcp_packets`: DHCP transaction and lease analysis of a PCAP file.
- `analyze_icmp_packets`: ICMP ping, TTL and error message analysis of a PCAP file.
- `analyze_tcp_connections`: TCP connection state and lifecycle analysis.
- `analyze_tcp_anomalies`: Observational TCP traffic pattern analysis.
- `analyze_tcp_retransmissions`: TCP retransmission rate analysis against thresholds.
- `analyze_traffic_flow`: Bidirectional traffic flow analysis for a server IP.
- `analyze_sip_packets`: SIP signaling analysis across UDP and TCP.
- `analyze_capinfos`: PCAP file metadata and packet statistics.

## FAQ

### Which protocols does mcpcap analyze?

The README lists DNS, DHCP, ICMP, TCP, SIP and a capinfos-style metadata module, with more protocols listed as future work.

### Can it analyze files stored remotely?

Yes. Tools accept HTTP and HTTPS PCAP URLs, which the server downloads temporarily at call time.

### What license does it use?

The README states the project is released under the MIT license.

### What are the Python requirements?

The README says Python 3.10 or greater is required, along with scapy, requests and fastmcp.

### Is Mcpcap free?

Yes. Mcpcap is open source, so you can use and self-host it for free.

### How do I add Mcpcap to Claude Code?

Run this command in your terminal: claude mcp add mcpcap -- uvx mcpcap

### What are the best alternatives to Mcpcap?

The closest alternatives to Mcpcap are MCPSense, Wass MCP, mcpcut, mcp-audit and Ntobjmanager MCP.

## Where this comes from

- Description: written from the project's README and its MCP Registry entry.
- Install steps: from the official MCP Registry entry.

## Alternatives

- [MCPSense](https://ai-powered.com/mcp/mcpsense): MCPSense is an open-source MCP server for security.
- [Wass MCP](https://ai-powered.com/mcp/wass-mcp): Wass MCP is an open-source MCP server for security.
- [mcpcut](https://ai-powered.com/mcp/mcpcut): mcpcut is an open-source MCP server for security.
- [mcp-audit](https://ai-powered.com/mcp/mcp-audit-2): mcp-audit is an open-source MCP server for security.
- [Ntobjmanager MCP](https://ai-powered.com/mcp/ntobjmanager-mcp): Ntobjmanager MCP is an open-source MCP server for security.
- [NetsCLI](https://ai-powered.com/mcp/netscli): NetsCLI is an open-source MCP server for security.
- [Password Ai MCP](https://ai-powered.com/mcp/password-ai-mcp): Password Ai MCP is an open-source MCP server for security.
- [mcp-agent-template](https://ai-powered.com/mcp/mcp-agent-template): mcp-agent-template is an open-source MCP server for security.

---
Source: https://ai-powered.com/mcp/mcpcap
