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 辅助报文分析的 MCP 协议工具
基于 Wireshark 的 TShark 命令行工具,构建一个支持 Model Context Protocol (MCP) 的 AI 辅助报文分析服务器,让 AI 助手能够通过标准化的 MCP 协议调用报文提取工具,辅助用户快速定位和分析网络通信异常。
功能概述
提供6个核心报文分析工具,支持:
pcap 文件概览分析
网络会话提取
时间范围过滤
协议类型过滤
特定网络流分析
统计指标计算
环境要求
Python 3.8+
Wireshark/TShark 4.0+
安装步骤
1. 安装 Wireshark
Windows:
下载并安装 Wireshark
确保 TShark 被添加到系统 PATH,或记录安装路径
2. 安装 Python 依赖
MCP 服务器配置
将以下配置添加到支持 MCP 协议的 AI 助手(如 Cursor、VS Code、Claude Desktop)中:
配置说明
command: 启动服务器的命令(python)
args: 服务器入口文件的绝对路径
env: 环境变量配置
PYTHONPATH: 确保 Python 能找到项目模块TSHARK_PATH: TShark 可执行文件路径
重要: 请根据实际安装路径修改 args 和 TSHARK_PATH 的值。
TShark 路径配置
项目支持多种 TShark 路径配置方式,按优先级排序:
环境变量 TSHARK_PATH (推荐)
export TSHARK_PATH="C:\Program Files\Wireshark\tshark.exe"系统 PATH 中的 tshark
确保 Wireshark 安装时添加到系统 PATH
自动检测 (备用)
项目会尝试在常见位置查找 TShark
启动服务器
贡献
欢迎提交 Issue 和 Pull Request 来改进项目。
许可证
[项目许可证]