
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 分