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 分