
S1000D BREX (S1000D Stack)
io.github.shuji-bonji由 GitHub 账号 shuji-bonji 发布v0.6.0更新于 Nov 7, 2026
Read S1000D BREX business rules and check data modules against them, layer by layer.
概览
读取 S1000D BREX 业务规则数据模块,并逐层检查数据模块是否符合这些规则,报告每处违规。
- 可以做什么
- 列出并筛选 BREX 中的规则:目标、允许/必需/禁止状态、允许值、严重级别及适用 schema
- 查询 SNS 编码或元素、属性值在项目中的含义与允许取值
- 列出可用的插图和多媒体 notation,含按 schema 的限制
- 检查数据模块、出版模块或注释是否符合 BREX,返回每处违规的 XPath、行号、规则 ID 和严重级别
- 沿 brexDmRef 链逐层检查,并标出无法解析的层
- 适用场景
- 适合在编写或审阅 S1000D 技术文档时使用,让助手解释项目的 BREX 规则,或指出数据模块在何处违反规则,而无需手工阅读 XML。
- 运行要求
- 通过 npx 在本地运行(需要 Node.js)。需要自行从 s1000d.org 获取的 S1000D 发行包,并用 S1000D_SPEC_DIR 指向其解压目录;项目数据模块通过 S1000D_CSDB_DIR 或 csdbDirs 参数指定。无法传环境变量时,可在 ~/.config/s1000d-stack/config.json 配置目录。无需认证。
安装
在 SourceWeft 中
- 打开 控制台中的 S1000D BREX (S1000D Stack),将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
@shuji-bonji/s1000d-brex-mcp
English | 日本語
An MCP server that lets an LLM read S1000D® BREX (Business Rules Exchange) data modules and check data modules against a BREX. It returns, in a form people can read, what a project or organisation has written in its BREX: which elements and attributes may be used, which values are allowed and what they mean, what the standard numbering system (SNS) codes mean, and which illustration formats may be used. It also reports whether a data module follows those rules, with the location of each violation.
[!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. Obtain them from s1000d.org and point the
S1000D_SPEC_DIRenvironment variable at the extracted folder.
What it does
What it does not do
[!WARNING]
- It does not validate against the XML schema (XSD). Schema errors can hide BREX violations or create false ones. Run schema validation with
validate_schema/verify_data_moduleins1000d-verify-mcp.- It does not judge conformance to S1000D.
passed: truefromcheck_against_brexmeans only that no machine-checkable BREX rule was violated in every layer that could be resolved.nonContextRules(rules written as prose) are returned asmanualChecks, and a person makes the judgement.- It does not interpret the meaning of severity level codes (
brsl01tobrsl99). The project defines them, so they are returned as they are.
[!NOTE] The absence of a rule in one BREX does not mean the absence of a restriction. A higher BREX (followed through
brexDmRef, ending at the S1000D default BREX) or a business rules document written for people may restrict it.check_against_brexreports the layers it could not find inunresolvedBrex. Treat a result in which this field is not empty as incomplete.
Configuration
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). The default BREX is still looked up under S1000D_SPEC_DIR. Folders that do not exist are skipped and listed in _notes of the response. A BREX can be given as a file path, as a DMC (the DMC- prefix is optional), or omitted (the default BREX).
A mistake that the caller can fix by changing an argument is returned not as a tool failure (isError) but as error: { code, path, detail }, the same shape as the other S1000D Stack servers. code is one of file-not-found (no such file), not-found (the BREX given by DMC, or the default BREX, was not found) and input-error (an argument is malformed or missing), and path names the argument to fix (/brex, /path and so on).
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.
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.
Example configuration for Claude Desktop / Claude Code
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).
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.
Check rules
The check follows Chap 4.10.2 (BREX data module) and Chap 7.9 (Business rules processing) of S1000D Issue 7. See the README of @shuji-bonji/s1000d-core for details.
Development
License
MIT
来源:README.md,提交 c0c68e4
工具
0版本历史
3- v0.6.0最新Nov 7, 2026
- v0.5.0Oct 29, 2026
- v0.1.1Oct 26, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分