OpenFormatDB

org.openformatdb由 openformatdb.org 發布v0.3.0更新於 Oct 28, 2026

Identify a file, find open tools for its format, convert it locally with WebAssembly.

概覽

AI 產生的概覽

辨識未知檔案格式、查詢開放工具與規格,並用 WebAssembly 轉換器在本機轉檔。

可以做什麼
  • 依檔案開頭位元組、結尾位元組、副檔名或 MIME 類型辨識檔案,並依簽章強度排序候選格式
  • 搜尋並檢視格式紀錄:識別碼、可讀寫的軟體、語法、規格、版本與認領資訊
  • 找出兩種格式之間最省事的轉換鏈,列出每一步的工具、指令與損失
  • 用內建的 WebAssembly 引擎(ImageMagick、resvg、FFmpeg、Pandoc、7-Zip、GDAL、Assimp)在本機轉檔
  • 列出彙整的資料來源及其筆數、授權與快照日期
  • 認領某個格式的文件化工作,並把發現寫入資料檔,再開立拉取請求
適用情境
適合在助理遇到陌生或冷門檔案、需要在撰寫解析器或逆向工程前先確認它是什麼時使用;也適合需要以開放、本機方式轉換圖片、音訊、影片、文件、壓縮檔、地理資料或 3D 檔案的場合。
執行需求
透過 npx 以 stdio 在本機執行,需要 Node 22.18 或更新版本。不需帳號或 API 金鑰。沒有倉庫工作目錄時會讀取 openformatdb.org 的唯讀靜態 API,可用 OFDB_API_URL 指向其他位址。寫入認領與發現需要本機工作目錄(OFDB_REPO)。轉換引擎(2 至 59 MB)首次使用時下載到 ~/.cache/openformatdb/engines,可用 OFDB_ENGINES_DIR 變更。
安裝前請注意
convert_file 是唯一會連網(首次下載引擎)並寫入工作目錄之外的檔案的工具,轉檔結果寫在輸入檔旁且不覆寫原檔。claim_format 與 publish_findings 會修改工作目錄中的 data/formats/ .yaml,並印出 git 指令但不會執行 git。檔案位元組在本機讀取、不會上傳;格式查詢會送往遠端 OpenFormatDB API。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 OpenFormatDB,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

@openformatdb/mcp

MCP server for OpenFormatDB: before an agent writes a parser or reverse engineers a file, it asks what the file is, which software already reads, writes and converts it, and how far the format is documented.

toolwhat it does
identify_file(magic_hex?, tail_hex?, extension?, mime?)candidate formats, ranked: full PRONOM signature (with priorities), prefix, MIME type, extension. The agent reads the bytes itself (xxd -p -l 1024 file, tail -c 512 file | xxd -p); the file never leaves the machine
lookup_format(id | puid | wikidata | mime)full record: identifiers, software (open source first, inherited from the family when marked via), grammars, specification, family and versions, live claims, advice
search_formats(query, category?, status?)ranked matches by name, alias, extension, MIME, PUID or QID
find_conversion(from, to?)cheapest chains of open tools from one format to another (lossless first), each step with its command and what is lost; formats as ids or extensions. Steps with an engine run with convert_file
convert_file(path, to?, output?)converts a file of this machine with open-source converters compiled to WebAssembly: ImageMagick, resvg, FFmpeg, Pandoc, 7-Zip, GDAL, Assimp. Nothing is uploaded; each engine (2 to 59 MB) is downloaded once on first use, pinned and SHA-256 checked, into ~/.cache/openformatdb/engines (OFDB_ENGINES_DIR). Without to, lists what the file can become. Writes next to the input and never overwrites
list_sources()aggregated sources with counts, licences and snapshot dates
claim_format(id | name+category, who, contact, scope, days?)says you are documenting a format (up to 90 days), so nobody duplicates the work
publish_findings(id, patch, release_claim_of?)merges structure, grammars, tools, conversions, spec, identifiers, verification; status only moves forward

convert_file is the only tool that reaches the network (an engine's first download) and writes outside the checkout (the converted file). The two write tools change data/formats/<id>.yaml in the checkout and print the git commands to open a pull request; they never run git. Text is screened against POLICY.md (no DRM removal, no keys, no copies of paywalled standards).

Install

sh
npx -y @openformatdb/mcpclaude mcp add openformatdb -- npx -y @openformatdb/mcp     # Claude Code

Release

Bump the version in package.json, server.json and src/server.ts, then run the Release MCP server workflow: it tests, publishes to npm (trusted publishing) and to the MCP Registry as org.openformatdb/openformatdb (secret MCP_REGISTRY_PRIVATE_KEY, whose public half is served at https://openformatdb.org/.well-known/mcp-registry-auth).

Run it

Without a checkout it reads the static API of openformatdb.org (read-only; OFDB_API_URL points elsewhere). From a checkout of the repository it reads the data files and can write:

sh
npm installnpm run mcp                      # stdio; data from this checkoutOFDB_REPO=/path/to/checkout npm run mcp

Claude Code: claude mcp add openformatdb -- node /path/to/openformatdb/packages/mcp/src/server.ts

Needs Node 22.18 or later (TypeScript sources run directly).

來源:packages/mcp/README.md,提交 f30b502

工具

8

identify_file

Identify a file

Candidate formats for a file, ranked: a signature match beats a MIME type, which beats an extension. Read the bytes yourself and pass them as hex; the file never leaves the machine: magic_hex = the first bytes (`xxd -p -l 1024 file`), tail_hex = the last bytes (`tail -c 512 file | xxd -p`) so end-of-file signatures can be checked, whole_file when magic_hex is the entire file. Full PRONOM signatures and their priorities decide between close formats (PNG 1.0 / 1.2 / APNG). Then call lookup_format on the best candidate.

輸入參數mimelimittail_hexextensionmagic_hexwhole_file

lookup_format

Look up a format

Full record of a format: identifiers, which software reads or writes it (open source first), grammars, specification, family and versions, live claims, and advice on what to do next. Find it by id, PRONOM PUID, Wikidata QID, or MIME type.

輸入參數idmimepuidwikidata

search_formats

Search formats

Ranked formats matching a name, alias, extension, MIME type, PUID or QID, optionally by category or status.

輸入參數limitquery必填statuscategory

find_conversion

Find a conversion

How to convert a file from one format to another with open tools: the cheapest chains (lossless first), each step with its tool, command and what is lost. Formats as ids or extensions ("docx", "report.wpd"). Without `to`, lists the direct conversions.

輸入參數tofrom必填max_steps

convert_file

Convert a file locally

Convert a file on this machine to another format with open-source converters compiled to WebAssembly: ImageMagick (images, raw photos), resvg (SVG), FFmpeg (audio, video), Pandoc (documents, markup), 7-Zip (archives), GDAL (geodata), Assimp (3D). Nothing is uploaded. Each engine is downloaded once on first use (2 to 59 MB, pinned versions, SHA-256 checked) into ~/.cache/openformatdb/engines. Call with only `path` to list what the file can become; chains of two engines are planned automatically (svg → png → webp). Writes next to the input unless `output` is given, and never overwrites a file.

輸入參數topath必填output

list_sources

List sources

Sources aggregated in OpenFormatDB, with record counts, licences and snapshot dates.

無需輸入參數。

claim_format

Claim a format

Say you are reverse engineering or documenting a format, so nobody duplicates the work: adds a claim (who, contact, scope, up to 90 days) to data/formats/<id>.yaml, creating the record if the format is new. Call lookup_format first.

輸入參數idwho必填daysnameagentscope必填contact必填versioncategoryforce_newextensions

publish_findings

Publish findings

Merge what you found into data/formats/<id>.yaml: structure, grammars, tools, conversions, specification, identifiers, verification. Status only moves forward. Optionally release your claim. Then open a pull request.

輸入參數id必填patch必填allow_downgraderelease_claim_of

版本歷史

3
  1. v0.3.0最新Oct 25, 2026
  2. v0.2.0Oct 25, 2026
  3. v0.1.0Oct 21, 2026

評分

已滿足適用檢查項的 90%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分
  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具必需15 分
  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分