s1000d-brex-mcp
Summary: This MCP server lets an LLM inspect S1000D BREX rules and check S1000D data modules against them.
explain_brex: list BREX rules with XPath target, forbidden/required/optional status, allowed values and meanings, severity, and schema context; supports filtering, search, and paging.lookup_sns: explain what an SNS code means from a DMC or directly supplied system/subsystem/sub-subsystem/assembly codes.lookup_value: explain what an element or attribute value means and list/check allowed values.list_notations: list allowed illustration/multimedia formats, including base set, exclusions, per-schema restrictions, and effective rules for a context.check_against_brex: check a data module against BREX rules, optionally following thebrexDmRefchain, and report violations with XPath, line, actual value, rule ID, description, and severity.Return non-context prose rules as manual checks, and run over stdio or HTTP with configurable S1000D spec/CSDB directories.
Note: it does not perform XML schema validation or make the final S1000D conformance judgement.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@s1000d-brex-mcp Check DMC-A320-A-00-00-00-00A-001A-D against the project BREX and list violations."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
@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.
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 froms1000d.org and point the S1000D_SPEC_DIR environment variable at the extracted folder.
What it does
Tool | Description |
| Lists the rules of a BREX. Returns the target (XPath), whether it may be used (forbidden, required or optional), the allowed values and their meaning, the severity level and the schemas the rule applies to. Narrow the list with |
| Returns what a standard numbering system (SNS) code refers to, from a DMC or a code |
| Returns what an element or attribute value means in the project, and which values are allowed |
| Returns the illustration and multimedia formats that may be used, split into the base set ( |
| Checks a data module against a BREX and returns each violation with its location (XPath and line number), actual value, rule ID, description and severity level. By default it follows the |
Related MCP server: solibri
What it does not do
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.
The absence of a rule in one BREX does not mean the absence of a restriction. A higher BREX (followed throughbrexDmRef, ending at the S1000D default BREX) or a business rules document written for people may restrict it. check_against_brex reports the layers it could not find in unresolvedBrex. Treat a result in which this field is not empty as incomplete.
Configuration
Environment variable | Description |
| The folder where the S1000D distribution you obtained is extracted. The default BREX ( |
| The folder that holds the project's data modules. Several folders can be given, separated by |
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.
{
"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.
Example configuration for Claude Desktop / Claude Code
{
"mcpServers": {
"s1000d-brex": {
"command": "npx",
"args": ["-y", "@shuji-bonji/s1000d-brex-mcp"],
"env": {
"S1000D_SPEC_DIR": "/path/to/s1000d/issue-7",
"S1000D_CSDB_DIR": "/path/to/project/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).
npx -y @shuji-bonji/s1000d-brex-mcp --http # http://127.0.0.1:3000/mcp
npx -y @shuji-bonji/s1000d-brex-mcp --http --port 3100 --path /brexArgument | Default | Meaning |
|
| Address to bind to |
|
| Port; |
|
| Path of the MCP endpoint. |
| (see below) | Host names allowed in the |
| (see below) | Host names allowed in the |
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.
Item | Handling |
|
|
| The blocks whose schema matches the target data module, and the common blocks, are applied |
| A violation if a NOTATION declared in the DOCTYPE is not in the allowed set |
Layers | Each layer is checked separately; the layers are not merged. |
Development
npm install
npm run build
npm test # runs on self-made test data only
npm run test:spec # uses the S1000D distribution (set its location with S1000D_SPEC_DIR)License
MIT
Available Tools
5 toolscheck_against_brexA
Check a data module against BREX rules and report violations with location (XPath + line), actual value, rule id, objectUse text and severity. By default follows the data module's brexDmRef chain (project BREX → … → S1000D default BREX found under S1000D_SPEC_DIR) and checks each layer separately; pass "brex" to check against one specific BREX instead or in addition. Does NOT validate against the XML schema (XSD): run schema validation separately. nonContextRules cannot be checked automatically and are returned as manualChecks.
Inputs: xml, brex, path, csdbDirs, +3 more.
explain_brexA
List the rules of a BREX data module in readable form: for each rule, the target (XPath), whether it is forbidden / required / optional, the allowed values with their meanings, severity, and the schema context it applies to. Also returns the BREX header (DMC, parent BREX, counts). Use "kind" and "context" to narrow, "offset"/"limit" to page.
Inputs: brex, kind, limit, offset, +3 more.
list_notationsA
List the illustration / multimedia notations (file formats) a BREX allows: the base set (common to all schemas) and the per-schema additions and exclusions. Pass "context" to get the effective set for one schema. Returns an empty base set when the BREX has no notation rules (then the BREX does not restrict notations).
Inputs: brex, context, csdbDirs.
lookup_snsA
Explain what a Standard Numbering System (SNS) code means in a BREX: pass a DMC (the system / subsystem / sub-subsystem / assembly codes are taken from it) or the codes directly. Returns the matched hierarchy with titles; "exact: false" means only a prefix matched.
Inputs: dmc, brex, assyCode, csdbDirs, +3 more.
lookup_valueA
Explain what a value of an element or attribute means in a BREX, or list the allowed values. Pass "target" as an attribute name (e.g. "securityClassification"), an element name, or an XPath fragment; optionally "value" to check one value. Returns the matching rules with allowed values and their meanings, and whether the value is allowed.
Inputs: target (required), brex, value, context, +1 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
The five tools have largely distinct purposes: notation listing, rule explanation, SNS lookup, value lookup, and data module checking. There is some overlap because explain_brex can also surface notation/value rules that list_notations and lookup_value return, but the descriptions make the intended scopes reasonably clear.
All tool names use consistent snake_case and begin with a verb (list_, explain_, lookup_, check_). The pattern is predictable across the set, even though the verbs vary appropriately by action.
Five tools is well-scoped for a BREX-focused MCP server. Each tool has a clear, non-redundant role: notation listing, rule explanation, SNS decoding, value interpretation, and validation.
The surface covers the main BREX workflows: inspecting rules, decoding SNS codes, interpreting values, listing notations, and checking data modules. Minor gaps exist, such as no dedicated way to enumerate all SNS codes or search rules by free text, but these are workable through existing tools.
Maintenance
Related MCP Connectors
Checks AI-written code against your rules as it is written, and keeps a record of what it found.
Check ISO 20022 messages (pacs.008, pain.001, camt.053, seev.031) against schema and rules.
Official rules, version per result. SAF-T, SEPA, ISO 20022, DAC7 checks; CBAM and XBRL web tools.
Governance copilot for AI-assisted coding. 72 packs, 532 rules, proof bundles.
Related MCP Servers
- FlicenseNot gradedqualityCmaintenanceProvides reference and pre-flight linting for XBRL Query and Rules Language (XULE), helping LLMs write syntactically sound rules with tools for object model lookup, function catalog, filter syntax, and boilerplate snippets.-
- AlicenseAqualityDmaintenanceEnables an LLM to control Solibri through 25 MCP tools, covering model inspection, rule checking, BCF issue handling, presentations, and Autorun batch verification, all restricted to a local workspace.25MIT
- AlicenseAqualityBmaintenanceProvides LLM agents with a toolset for reviewing S1000D technical publications, including XML schema validation, cross-reference and applicability checks, skeleton generation, and AI-suggested fixes.1MIT
- AlicenseNot gradedqualityBmaintenanceEnables language models to query, inspect, check, and validate XML documents through XPath 1.0 expressions and XSD schemas without loading the full document into a context window. Documents stay on disk while models retrieve exact counts, values, and structural summaries via tool calls.1Apache 2.0