WS

weirdmachine64/sharkmcp

API development

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기

78 stars 2 forks 품질 69 트렌드 15MIT

PCAP 파일을 분석하는 swiss-knife MCP 서버

개요

상어를 노출하는 MCP 서버 - Wireshark의 프로그래밍 인터페이스 - LLMs의 도구 세트로. Load PCAP/PCAPNG 파일과 자연 언어를 분석합니다. - 파이썬 3.10 + - Wireshark (상어 제공) 또는 설치하지 않고 repo에서 직접 실행: 각 적재 된 PCAP는 전용 상어 하위 프로세스를 가져옵니다. 비싸지 않은 스캔(통역, 전문가 정보, 수출물)의 결과가 기억에 남을 수 있으므로 재판매가 없는 후속 통화가 제공됩니다. 둘 다를 위한 지원된 층 유형: tcp, udp, IP, ipv6, eth, sctp, dccp, mptcp, 와이파이, bluetooth, zigbee, fc, fddi, usb 및 더 많은 것. 적재된 PCAP 당 1개의 상어한 subprocess. 세션은 격리되어 있습니다 - 다른 별명으로 동시 쿼리는 서로를 차단하지 않습니다.

개요(AI 번역)

상어를 노출하는 MCP 서버 - Wireshark의 프로그래밍 인터페이스 - LLMs의 도구 세트로. Load PCAP/PCAPNG 파일과 자연 언어를 분석합니다.

요구 사항

  • 파이썬 3.10+
  • Wireshark (제공 sharkd)

설치

또는 설치하지 않고 repo에서 직접 실행:

구성

.mcp.json에 추가:

Env var 기본 설명
SHARKMCP_SHARKD_BIN sharkd 상어 이진 길
[T4] [T5] [T5] 몇 초 만에 퀘스트 타임 아웃

도구

각 적재 된 PCAP는 전용 상어 하위 프로세스를 가져옵니다. 비싸지 않은 스캔(통역, 전문가 정보, 수출물)의 결과가 기억에 남을 수 있으므로 재판매가 없는 후속 통화가 제공됩니다.

세션

도구 설명
[T6] PCAP/PCAPNG 파일로드
[T7] 모든 적재된 PCAP
[T8] 세션 및 무료 메모리 종료

개요

도구 설명
pcap_summary(alias) 프레임 수, 기간, 파일 크기, 프로토콜 보기
server_info(alias) 모든 사용 가능한 탭 타입, 프로토콜, 필드 타입

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요.

README

원문 README의 일부입니다. 원문 보기.

SharkMCP

An MCP server that exposes sharkd — Wireshark’s programmatic interface — as a set of tools for LLMs. Load PCAP/PCAPNG files and analyse them with natural language.

Requirements

  • Python 3.10+
  • Wireshark (provides sharkd)

Installation

git clone https://github.com/weirdmachine64/sharkmcp.git
cd sharkmcp
pip install -e .

Or run directly from the repo without installing:

uvx --from git+https://github.com/weirdmachine64/sharkmcp sharkmcp

Configuration

Add to your .mcp.json:

{
  "mcpServers": {
    "sharkmcp": {
      "command": "uvx",
      "args": ["--from", "git+https://github.com/weirdmachine64/sharkmcp", "sharkmcp"],
      "env": {
        "SHARKMCP_TIMEOUT": "300"
      }
    }
  }
}
Env var Default Description
SHARKMCP_SHARKD_BIN sharkd Path to sharkd binary
SHARKMCP_TIMEOUT 300 Per-request timeout in seconds

Tools

Each loaded PCAP gets a dedicated sharkd subprocess. Results from expensive scans (conversations, expert info, export objects) are cached in memory so paginated follow-up calls are served without re-scanning.

Session

Tool Description
load_pcap(path, alias?) Load a PCAP/PCAPNG file
list_pcaps() List all loaded PCAPs
unload_pcap(alias) Terminate session and free memory

Overview

Tool Description
pcap_summary(alias) Frame count, duration, file size, protocols seen
server_info(alias) All available tap types, follow protocols, field types

Packet Inspection

Tool Description
list_packets(alias, filter?, columns?, refs?) Paginated frame list with display filter
packet_detail(alias, frame, include_bytes?, include_hidden?) Full protocol tree for one frame
extract_fields(alias, fields, filter?) Extract arbitrary fields per packet as a table

Utilities

Tool Description
validate(alias, filter?, field?) Validate a display filter and/or field name
complete(alias, field?, pref?) Autocomplete field or preference names by prefix
get_preference(alias, preference?) Read dissector preferences
set_preference(alias, name, value) Set a dissector preference for this session
set_frame_comment(alias, frame, comment) Annotate a frame (session-scoped)

Traffic Structure

Tool Description
protocol_hierarchy(alias, filter?) Nested protocol tree with frame/byte counts
io_stats(alias, interval_ms?, filter?) Per-interval frame and byte counts
iograph(alias, graphs, interval_ms?, filters?) Multi-line traffic graph; supports packets, bytes, bits, sum:, avg:, min:, max:, load:, frames:
GitHub에서 전체 README 보기

설치

uvx --from git+https://github.com/weirdmachine64/sharkmcp sharkmcp
MCP 초보자라면? mcpskill.org 가이드부터 시작하세요 →

설정

{ "mcpServers": { "sharkmcp": { "command": "uvx", "args": ["--from", "git+https://github.com/weirdmachine64/sharkmcp", "sharkmcp"], "env": { "SHARKMCP_TIMEOUT": "300" } } } }