ByteScope

ByteScope MCP

完全離線。一行 npx,讓寫程式的 agent 拿到真的雜湊值、檔案類型、憑證與 pcap 解析結果、測試檔案,還有各種 ID 查詢。

本機版在你的電腦上跑,完全不碰網路。線上版只處理每一次請求,什麼都不留。

本機版

完全離線。用 npx 執行,需要 Node.js 20 以上。不用金鑰,也不用帳號。

Claude Code
claude mcp add bytescope -- npx -y @bytescope/mcp
.mcp.json
{
  "mcpServers": {
    "bytescope": {
      "command": "npx",
      "args": [
        "-y",
        "@bytescope/mcp"
      ]
    }
  }
}

線上版

給沒辦法跑 npx 的客戶端用,盡力提供。單次內容上限 4 MB,超過就會請你改用本機版。

Claude Code
claude mcp add --transport http bytescope https://bytescope.dev/api/mcp
.mcp.json
{
  "mcpServers": {
    "bytescope": {
      "type": "http",
      "url": "https://bytescope.dev/api/mcp"
    }
  }
}

工具

共 23 個工具,是建置這頁時從伺服器本身的工具清單讀出來的。說明保留 agent 實際看到的英文原文。

工具用途
detect_file_typeIdentify a file's real type from its leading bytes (magic numbers), with a confidence level, MIME type and usual extensions.
hash_bytesHash bytes with MD5, SHA-1, SHA-256, SHA-512 and/or CRC-32 (the zip/PNG/Ethernet CRC-32/ISO-HDLC).
crc_calculateCompute a CRC over bytes, either with a named model from the reveng catalogue (113 models, e.g. "CRC-32/ISO-HDLC", "CRC-16/MODBUS", "CRC-8/SMBUS"; aliases such as "CRC-32" or "MODBUS" work) or with custom Rocksoft parameters.
crc_reverseRecover the CRC model from known message/checksum pairs: first tries every model in the reveng catalogue, then brute-forces 8- and 16-bit polynomials within a time budget.
decode_certificateDecode X.509 certificates and CSRs: subject, issuer, SANs, validity window and status, signature algorithm, public key, key usage, fingerprints.
subnet_calcIPv4/IPv6 subnet calculator: CIDR → network, broadcast (IPv4 only), usable host range, netmask, wildcard, address count and address class/special-range classification.
parse_pcapParse a pcap or pcapng capture: file summary (format, link types, packet count, time span), a Wireshark-style packet list (protocol, source, destination, info), TCP/UDP stream summaries and protocol hierarchy / conversation statistics.
inspect_elfInspect an ELF binary (executable, shared object, object file, core): header (class, endianness, machine, type, entry point), program headers, section headers, symbol tables, dynamic section (NEEDED libraries, SONAME), notes (build id) and parse warnings.
parse_intel_hexMap a firmware image: Intel HEX, Motorola S-record or UF2 → contiguous address segments, gaps, start address, record errors (bad checksums, overlaps) and, for UF2, the family ids.
decode_hid_descriptorDecode a USB HID report descriptor: annotated item listing (like the HID Descriptor Tool), collections, and every input/output/feature report with bit offsets, sizes, usages and logical ranges.
parse_exifRead image metadata from a JPEG, PNG or raw TIFF/EXIF block: camera make/model, lens, exposure, ISO, focal length, orientation, capture time, ICC profile presence, plus the list of metadata carriers (EXIF, XMP, ICC, comments, text chunks, trailers) with byte offsets.
sqlite_schemaRead a SQLite database file's structure: every table with its CREATE statement, columns (declared type, primary-key position, NOT NULL, default, foreign-key target) and row count, plus indexes (unique, origin, columns), views, triggers, page size, page count, text encoding, user_version, journal mode and the SQLite version that last wrote the file.
convert_subtitleConvert subtitles between SRT, WebVTT and ASS/SSA.
generate_fixtureGenerate a real, standards-conformant test file for unit tests instead of hand-assembling bytes: images, archives (including encrypted, split or deliberately corrupted ZIPs), packet captures, self-signed certificates (valid, expiring in N days, expired or not yet valid), audio/video, SQLite, firmware images and PDFs.
lookup_usb_vendorLook up a USB vendor id (VID) in the linux-usb.org usb.ids database — the same data lsusb uses.
lookup_usb_productLook up a USB product by vendor id and product id (VID:PID) in the linux-usb.org usb.ids database.
lookup_ble_uuidLook up a Bluetooth LE GATT UUID in the Bluetooth SIG assigned-numbers tables (services, characteristics, descriptors) and a list of well-known vendor UUIDs.
lookup_hid_usageLook up a USB HID usage in the HID Usage Tables: usage page + usage id → names.
lookup_midi_ccLook up a MIDI 1.0 Control Change number (0-127) in the MMA controller assignment table, e.g. 7 → Channel Volume, 64 → Damper Pedal.
lookup_midi_manufacturerLook up a MIDI System Exclusive manufacturer id (the byte(s) after F0): one byte 01-7F (e.g. 41 → Roland, 43 → Yamaha) or an extended three-byte id 00 xx xx (e.g. 00 20 29 → Focusrite/Novation).
lookup_portLook up a TCP/UDP port number in ByteScope's port reference (the well-known service ports developers actually hit: 22, 443, 3306, 5432, 6379, 27017 …): service, transport, whether IANA assigned it, what it is for and its security exposure.
lookup_http_statusLook up an HTTP status code in ByteScope's status reference: name, class, defining standard, what it means and how it is confused with its neighbours.
lookup_file_signatureLook up which file formats' magic-number signatures match the given leading bytes, using ByteScope's format catalogue.

關於這個工具

ByteScope MCP 是完全離線的 MCP 伺服器。npx -y @bytescope/mcp 會在你自己的電腦上用 stdio 啟動,完全不碰網路:沒有遙測、不呼叫任何 API、不用金鑰也不用帳號。裡面跑的就是這個網站各個工具背後的 core-* 套件,打包成一個檔案給寫程式的 agent 用。

拿來分析檔案的 MCP 伺服器

agent 很會推理位元組,卻很不會憑記憶把位元組拼對。這個伺服器直接給它真的東西:從 magic bytes 判斷檔案類型並附上信心度、算 CRC 或從已知的輸入輸出反推 CRC 參數、X.509 憑證與 CSR、子網路、pcap/pcapng 封包、ELF 的 header 與符號、Intel HEX 和 UF2 的位址區段、HID report descriptor,還有沒指定就不給 GPS 的 EXIF。generate_fixture 會做出結構正確的 PNG、ZIP、pcap、PDF、MP4、X.509 測試檔案,跟測試檔案產生器那頁用的是同一套產生器。

雜湊 MCP 伺服器,查不到就回 found: false

hash_bytes 會回傳你給的位元組的 MD5、SHA-1、SHA-256、SHA-512 與 CRC-32。lookup_* 這組工具從真實的對照表回答:USB 廠商與產品 ID、BLE UUID、HID usage、MIDI 控制器編號與廠商 ID、連接埠、HTTP 狀態碼、檔案簽章。表裡沒有的 ID 一律回 found: false,不會編一個看起來很合理的答案。

只收位元組,不收路徑

二進位輸入一律是 base64 或 hex 字串。工具不收檔案路徑,所以 agent 沒辦法把你沒打算分享的硬碟檔案交出去,本機版和線上版也能吃同一份 schema。本機版每次呼叫最多 8 MB。https://bytescope.dev/api/mcp 的線上版是盡力提供、什麼都不存,上限 4 MB;超過就會請 agent 改用本機版。這頁的工具表,是在建置網站時直接從伺服器本身的工具清單讀出來的。

常見問題

ByteScope MCP 會把我的檔案傳出去嗎?

本機版不會。它在你電腦上的 Node 裡跑、走 stdio,程式裡根本沒有連網路的路徑。線上版本質上不一樣:你傳的位元組會送到 Cloudflare Worker,在那次請求裡處理完就結束,不會儲存。不想貼進網頁表單的東西,就用本機版處理。

怎麼加到 Claude Code 或 Cursor?

Claude Code 用 claude mcp add bytescope -- npx -y @bytescope/mcp 一行就好。會讀 .mcp.json 的客戶端可以直接用這頁的片段;Cursor 則是把同一段 mcpServers 放進 .cursor/mcp.json(要所有專案都能用就放 ~/.cursor/mcp.json):command 是 npx,args 是 -y @bytescope/mcp。需要 Node.js 20 以上。

為什麼工具不收檔案路徑?

讓 agent 傳本機路徑,等於開了一條路讓它讀到你沒打算給的檔案。只收位元組,伺服器處理的就只有你交出去的東西。而且同一份 schema 拿到線上版也能用,你硬碟上的路徑在那邊本來就沒有意義。

線上版超過 4 MB 會怎樣?

那次呼叫會失敗,並回一段訊息請你改用本機版 npx @bytescope/mcp,本機版最多收 8 MB。不會偷偷截斷。

要付費或 API 金鑰嗎?

不用。沒有金鑰、沒有帳號、沒有額度。本機版在你的電腦上跑,線上版跑在 Cloudflare Workers,濫用靠平台的速率限制擋掉。