reqif-mcp
An MCP server for requirements engineering that allows loading ReqIF baselines and querying requirements, tracing links, detecting orphans, and diffing baselines using natural language.
README
reqif-mcp
An MCP server for requirements engineering. Load ReqIF / .reqifz baselines (the OMG open standard exported by IBM DOORS, Polarion, Codebeamer, Jama…) and let any MCP client — Claude Desktop, Claude Code, Cursor — query requirements, follow trace links, detect orphans, and diff baselines in natural language.
Requirements management is where automotive, aerospace, rail and defense engineering actually lives, yet the MCP ecosystem has servers for Slack and GitHub and almost nothing for it. This fills that gap.
What it does
Ask your MCP client things like:
- "Which ASIL-D requirements have no verifying test case?"
- "Trace REQ-AEB-001 downstream — what tests cover it, directly or transitively?"
- "Diff baseline v3 against v4: what changed, was added, was removed?"
- "Show me the outline of the AEB specification."
Tools exposed
| Tool | Purpose |
|---|---|
load_reqif |
Parse and index a .reqif / .reqifz file |
search_requirements |
Paginated search over ids, titles, text, attribute values, with optional attribute filter |
attribute_values |
Distinct values of an attribute with counts — the fastest way to discover how a baseline is structured |
get_requirement |
One requirement: all attributes + incoming/outgoing links |
trace_requirement |
Transitive trace links, up/down/both, bounded depth |
find_orphans |
Requirements with no trace links — paginated, filterable (e.g. exclude headings via Object Classification = Requirement) |
diff_baselines |
Added / removed / modified requirements between two baselines, with changed attribute names |
document_outline |
The specification tree (chapters, ordering) |
document_stats / list_documents |
Counts by type, loaded documents |
Install & run
pip install reqif-mcp # or: pip install -e . from a clone
reqif-mcp path/to/baseline.reqifz
Register in Claude Desktop / Claude Code (.mcp.json) — no arguments needed;
load files at runtime with the load_reqif tool:
{
"mcpServers": {
"reqif": { "command": "reqif-mcp" }
}
}
Then, in your MCP client: "Load /path/to/baseline.reqifz and show me the document stats."
CLI arguments are an optional shortcut for small files
(reqif-mcp fixtures/small.reqif); large baselines are better loaded at
runtime so the stdio connection comes up instantly. Unloadable startup paths
log a warning instead of killing the server.
Architecture
.reqif / .reqifz ──▶ parser.py (lxml, namespace-agnostic) ──▶ model.py (dataclasses)
│
MCP client ◀── server.py (FastMCP, stdio) ◀── store.py (in-memory DuckDB: SQL over
requirements / attributes / relations)
Design choices:
- Namespace-agnostic parsing. Real-world ReqIF exports disagree on namespace prefixes and even URI revisions; matching on
local-name()makes the parser tool-vendor tolerant. - Enum values resolved to labels.
ATTRIBUTE-VALUE-ENUMERATIONrefs are resolved throughDATATYPE-DEFINITION-ENUMERATION, so a status readsApproved, notev-4f2a…. - Type-level default values applied. An
ATTRIBUTE-DEFINITIONwith aDEFAULT-VALUEis materialized on every spec-object of that type that doesn't override it — otherwise baseline diffs silently miss defaulted attributes. - DuckDB as the query engine. Orphan detection, transitive tracing and baseline diffs are set operations — SQL expresses them cleanly, and it scales to large baselines without an external service.
- Hardened XML parsing. Entity resolution and network access disabled (XXE-safe).
- XHTML flattened to text. MCP tools serve search and trace; formatting is noise for that job.
Development
pip install -e ".[dev]"
pytest
Tests run against a synthetic ADAS emergency-braking fixture (tests/fixtures/) — no proprietary data anywhere in this repo.
Known limitations
Deliberate scope cuts for v0.1 — the parser extracts all spec-object attributes dynamically (no fixed schema), but:
- Attributes carried by
SPEC-RELATIONs andSPECIFICATIONs themselves are not extracted (only id, type, source/target). RELATION-GROUPs,ALTERNATIVE-IDs and vendorTOOL-EXTENSIONSblocks are ignored.- Datatype constraints (min/max, string length) are not enforced; every value is a string.
- XHTML values are flattened to plain text; embedded objects and formatting are dropped.
Roadmap
- [ ] Semantic search over requirement text (embeddings)
- [ ] MCP resources (expose specifications as browsable resources)
- [ ] Coverage report tool: requirement type A → verifying type B matrix
- [ ] Write-back: export a filtered subset as valid ReqIF
License
MIT
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。