S1000D Verify (S1000D Stack)

io.github.shuji-bonji由 GitHub 账号 shuji-bonji 发布v0.7.0更新于 Nov 7, 2026

Validate S1000D data modules: XSD, BREX chain and reference resolution as one verification status.

已验证STDIO仅桌面文件与存储开发者工具

概览

AI 生成的概览

校验 S1000D 数据模块的 XSD、BREX 规则与引用,并汇总为一个带证据的验证状态。

可以做什么
  • 按良构性、XSD、BREX 链、引用解析的顺序校验单个数据模块,给出违规行号与位置
  • 单独执行 XSD 校验,并列出规范目录下可用的 schema
  • 检查 dmRef、pmRef、ICN、internalRef 与 applicRefId 的目标,报告未解析项及原因
  • 一次运行校验文件夹内全部 CSDB 对象,支持分页读取并可写出 JSON 报告
  • 针对每项发现给出修复候选及其来源与确定程度,但不实际修改文档
  • 将数据模块清单或交付通知与 CSDB 核对,并列出未登记的对象
适用场景
适合助手处理 S1000D 技术文档时,在依赖某个数据模块前确认它究竟被检查到什么程度,或排查 CSDB 中的 schema、BREX 与断链引用问题。
运行要求
通过 npx 运行的本地 Node.js 进程。需要自行从 s1000d.org 获取 S1000D 规范,并用 S1000D_SPEC_DIR 指向解压目录(xml_schema_flat 下的 XSD 与默认 BREX);项目数据模块通过 S1000D_CSDB_DIR 或 csdbDirs 参数提供,也可写入 ~/.config/s1000d-stack/config.json 配置文件。
安装前请注意
规范、schema 与默认 BREX 不随包分发,需按其使用条款自行获取。schema 有效或 BREX 通过并不代表符合 S1000D,以文字表述的规则会作为人工检查项返回。schema 无效时 BREX 结果可能误报或被掩盖。修复仅为候选,不会写入文档。可选的 HTTP 模式不含认证与授权,绑定到非本机地址时需自行加反向代理与访问控制。

安装

在 SourceWeft 中

  1. 打开 控制台中的 S1000D Verify (S1000D Stack),将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

@shuji-bonji/s1000d-verify-mcp

English | 日本語

An MCP server that lets an LLM know, with evidence, how far an S1000D® data module has been checked. It performs three steps — validation against the XML schema (XSD), a check against BREX (Business Rules Exchange), and resolution of references (dmRef, pmRef, ICN, internalRef and applicRefId) — and returns the results combined into a single verification status (verification). This verification status has the same shape as the one s1000d-reader-mcp embeds in its content responses.

[!IMPORTANT] This is a personal project and is not affiliated with ASD (Aerospace, Security and Defence Industries Association of Europe). S1000D® is a registered trademark of ASD. The S1000D specification, XML schemas, default BREX and official samples are not included in any package or repository, because their terms of use do not grant redistribution. To run XSD validation and checks against the default BREX, obtain them from s1000d.org yourself and point the S1000D_SPEC_DIR environment variable at the extracted folder.

What it does

ToolDescription
verify_data_moduleValidates one data module in the order well-formedness → XSD → BREX chain → references, and returns verification (the verification status) together with the details of each step (line numbers of XSD violations, locations of BREX violations, unresolved references and their reasons)
validate_schemaRuns XSD validation only. The XSD to use is chosen from the file name in xsi:noNamespaceSchemaLocation and looked up under xml_schema_flat/ below S1000D_SPEC_DIR. The issue is read from the Issue number: line at the top of brex.xsd
check_referencesCollects references of 5 kinds (dmRef / pmRef / ICN / internalRef / applicRefId) and returns whether each target exists, with a reason. A dmRef to a chapter of the specification (model identification code S1000D) is not a broken reference, so it is reported separately
verify_csdbValidates the CSDB objects in a folder (DMC and PMC by default) in one run, and returns the verification status of each object and a count summary. Read the results in parts with offset / limit, and write the details to JSON with reportPath
suggest_fixesRuns the same verification as verify_data_module and returns fix candidates for each finding. The server decides the candidates and adds their origin (BREX rule ID, XSD definition, CSDB, ids in the document, ACT/CCT/PCT) and their certainty (exact / several / none). If product is given, applicability that cannot be decided because the product lacks a value also gets candidate values. It does not apply fixes
reconcile_dmlReconciles a data module list (DML) or a data dispatch note (DDN) with the CSDB. For each DML entry (dmRef / pmRef / infoEntityRef / dmlRef) and each DDN delivery item (dispatchFileName) it returns found / issue-mismatch (the object exists but not the listed issue; the latest issue in the CSDB is given) / not-found / not-checked (commentRef), plus the DMs and PMs that are in the CSDB but not listed in the DML (notListed). Omit both path and xml to reconcile every DML and DDN in the CSDB. dmlType / dmlEntryType / issueType are not interpreted
list_schemasReturns the list of xml_schema_flat/ folders found under S1000D_SPEC_DIR (issue, number of XSDs, schema names). Use it to investigate the cause of schema-not-found

Verification status (verification)

FieldValueMeaning
schema.statevalid / invalid / schema-not-found / not-runXSD found and validated with 0 violations / violations found / XSD not found (reason in reason) / skipped with skip
brex.statepassed / violations / incomplete / not-run0 violations in every layer / violations found / an unresolved BREX or a rule that cannot be evaluated / skipped
references.stateresolved / unresolved / not-run0 unresolved / unresolved references found / skipped

schema-not-found is not valid. It means that XSD validation did not run.

What it does not do

[!WARNING]

  • It does not decide conformance to S1000D. schema: valid and brex: passed mean only that no errors were found against the XSD and the BREX rules that a machine can check. nonContextRules (agreements written as prose) are returned as manualChecks, and a person makes the judgement. A project's business rules document is outside the scope of every tool.
  • It does not return explanations of BREX rules or the meaning of values. That is the job of explain_brex / lookup_value in s1000d-brex-mcp. Severity level codes (brsl01 to brsl99) are returned as they are.
  • It does not evaluate applicability (which product the content applies to). check_references only looks at whether the target of applicRefId exists. The evaluation is done by s1000d-reader-mcp. The exception is suggest_fixes with product, which reports only applicability that cannot be decided because the product lacks a value.
  • It does not apply fixes to the document. suggest_fixes only returns candidates. Have the LLM choose among the candidates, and ask the user when confidence is none (the instructions say the same).
  • It does not interpret DML values (dmlType / dmlEntryType / issueType). reconcile_dml compares identifiers and issues only; it does not verify the content of the listed objects (use verify_csdb for that).

[!NOTE] In a document that violates the XSD, elements may be in positions that differ from the specification, so BREX violations can be reported falsely or hidden. When schema.state is invalid, read the BREX results as a rough indication only (the response also says so in _notes).

Configuration

Environment variableDescription
S1000D_SPEC_DIRThe folder where you extracted the S1000D distribution you obtained. The XSDs (xml_schema_flat/; extract the inner "XML Schema Package" zip beforehand) and the default BREX (DMC-S1000D-*-04-10-0301-00A-022A-D_*.XML) are looked up below this folder. The copies of the XSDs inside the data dictionary are not used (their imports are absolute URLs and cannot be resolved offline)
S1000D_CSDB_DIRThe folder that holds the project's data modules. Several folders can be given, separated by : (; on Windows). The referenced DM, PM and ICN files and the BREX in the middle of the chain are looked up here

Folders can also be given with the tool argument csdbDirs. When the argument is given, only those folders are used; S1000D_CSDB_DIR and csdbDirs in the config file are not used (they are not added together). Folders that do not exist are skipped and listed in _notes of the response. When none is left, the tool returns no-csdb (below).

Errors

An error that the caller can fix by changing an argument is not returned as a tool failure (isError) but in the same shape as s1000d-writer-mcp.

json
{ "error": { "code": "file-not-found", "path": "/path", "detail": "File not found: /path/to/DMC-….XML" } }
codeMeaning
file-not-foundThere is no file at the path given in the argument
no-csdbNo CSDB folder exists (pass csdbDirs or set S1000D_CSDB_DIR)
input-errorAn argument is malformed, or a required argument is missing

path names the argument to fix (/path, /csdbDirs and so on), not a file path.

Config file (when environment variables are not passed, as with plugins in Claude Desktop)

If S1000D_SPEC_DIR / S1000D_CSDB_DIR are not set, the server reads the config file ~/.config/s1000d-stack/config.json (under XDG_CONFIG_HOME if it is set; S1000D_CONFIG changes the location). Claude Desktop does not pass environment variables to servers installed as plugins, and does not substitute ${VAR} written in the plugin's env. When you install the server as a plugin, write the folders here.

json
{  "specDir": "/path/to/s1000d/issue-7",  "csdbDirs": ["/path/to/your/csdb"]}

Environment variables take precedence when they are set. Paths that start with ~/ are accepted. The config file is read again on every call, so the server does not need to be restarted after you edit it.

Configuration example for Claude Desktop / Claude Code

json
{  "mcpServers": {    "s1000d-verify": {      "command": "npx",      "args": ["-y", "@shuji-bonji/s1000d-verify-mcp"],      "env": {        "S1000D_SPEC_DIR": "/path/to/s1000d/issue-7",        "S1000D_CSDB_DIR": "/path/to/your/csdb"      }    }  }}

Running over HTTP (embedding in a product)

The default is stdio. With --http the server starts over Streamable HTTP, so a CSDB product's server or a web application can call it over HTTP (the embedding foundation of stage 2.5).

sh
npx -y @shuji-bonji/s1000d-verify-mcp --http                      # http://127.0.0.1:3000/mcpnpx -y @shuji-bonji/s1000d-verify-mcp --http --port 3102 --path /verify
ArgumentDefaultMeaning
--host127.0.0.1Address to bind to
--port3000Port; 0 picks a free port
--path/mcpPath of the MCP endpoint. GET /healthz returns the name and version
--allowed-host(see below)Host names allowed in the Host header; comma-separated or repeated
--allowed-origin(see below)Host names allowed in the Origin header

When --host is a loopback address (127.0.0.1 / ::1 / localhost), Host and Origin are limited to localhost names (DNS rebinding protection). When bound to any other address they are not checked, so put the server behind the product's reverse proxy or authentication. Authentication, authorization and multi-tenancy are not part of this server. Environment variables and the config file work the same as with stdio.

How it works

All validation logic lives in the shared library @shuji-bonji/s1000d-core; this server holds only the interpretation of arguments and the shape of the responses. XSD validation uses libxml2-wasm (the WebAssembly build of libxml2), and each XSD is compiled once and reused, so the 106 official samples of Issue 7 are validated in under 0.5 seconds. The BREX check calls the same functions as s1000d-brex-mcp, so the results of the two servers match.

Development

sh
npm installnpm test            # runs with self-made test data onlynpm run test:spec   # uses the distribution you obtained (set the location with S1000D_SPEC_DIR; default ../../specs/s1000d/issue-7)npm run build && S1000D_SPEC_DIR=/path/to/issue-7 npm start   # starts over stdio

License

MIT. S1000D® is a registered trademark of ASD. This software is not affiliated with ASD and does not include the specification, schemas or official samples.

来源:README.md,提交 818402b

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

3
  1. v0.7.0最新Nov 7, 2026
  2. v0.6.1Oct 29, 2026
  3. v0.1.1Oct 26, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分