MCP Server
The reqstool MCP server exposes requirements, SVCs, MVRs, and traceability status as Model Context Protocol tools. AI agents such as Claude or GitHub Copilot can call these tools directly to query and reason over a requirements dataset.
See also: reqstool-ai — a marketplace of AI agents, prompts, and plugins built on reqstool and reqstool+OpenSpec integrations.
Starting the Server
Local project
reqstool mcp local -p /path/to/reqstool
The server starts and blocks, serving MCP requests over stdio. The project at the given path is loaded at startup and reloaded whenever its files change — see Snapshot Freshness.
Tools
Listing Tools
list_requirements
Returns a lightweight list of all requirements.
Parameters:
-
urn(string, optional) — scope to a single project node -
lifecycle_state(string, optional) — filter by state:draft,effective,deprecated,obsolete
Returns: array of { id, title, lifecycle_state }
list_svcs
Returns a lightweight list of all software verification cases.
Parameters:
-
urn(string, optional) -
lifecycle_state(string, optional) —draft,effective,deprecated,obsolete
Returns: array of { id, title, lifecycle_state, verification }
where verification is one of automated-test, manual-test, review.
list_mvrs
Returns a lightweight list of all manual verification results.
Parameters:
-
urn(string, optional) -
passed(boolean, optional) —truefor passing,falsefor failing
Returns: array of { id, passed }
Detail Tools
get_requirement
Full details for a single requirement.
Parameters:
-
id(string, required) — bare requirement ID, e.g.REQ_010
Returns: { type, id, urn, title, significance, description, rationale, revision, lifecycle, categories, implementation, references, implementations, svcs, location, source_paths }
get_svc
Full details for a single SVC.
Parameters:
-
id(string, required)
Returns: { type, id, urn, title, description, verification, instructions, revision, lifecycle, requirement_ids, test_annotations, test_results, test_summary, mvrs, location, source_paths }
Each entry in mvrs is { id, urn, passed, date, comment, superseded }.
date is an RFC 3339 date-time string or empty string; superseded: true means an older entry that was superseded by a later one.
Status Tools
get_status
Overall traceability status across all requirements — completion counts, test totals.
Parameters: none
Returns: status summary dict, plus a snapshot field describing the data it was computed
from: { built_at, reload, tracked_files, warnings }. See Snapshot Freshness.
refresh
Forces an immediate reload of the project from disk. Reloading is automatic when input files change, so this is only needed to reload unconditionally or to confirm what is being served.
Parameters: none
Returns: { built_at, reload, tracked_files, warnings }
get_requirement_status
Status for a single requirement, derived from the same verdict computation as the status CLI
command — get_status, get_requirement_status, and get_requirements_status always agree.
Parameters:
-
id(string, required) -
include_post_build(boolean, optional, defaultfalse) — also scope to post-build-phase SVCs, for parity withstatus --with-post-tests
Returns: { id, lifecycle_state, completed, implementations, implementation_type, automated_tests: {total, passed, failed, skipped, missing, not_applicable}, manual_tests: {total, passed, failed, skipped, missing, not_applicable} }
get_requirements_status
Batch status for all requirements. Returns the same fields as get_requirement_status for every
requirement in the dataset. Use this to find incomplete, partially tested, or unimplemented
requirements without N+1 individual calls.
Parameters:
-
urn(string, optional) — scope to a single project node -
include_post_build(boolean, optional, defaultfalse) — same asget_requirement_status
Returns: array of { id, urn, lifecycle_state, completed, implementations, implementation_type, automated_tests, manual_tests }
Example: Finding Incomplete Requirements
The following client-side filter finds requirements that have started but are not yet done — they
have an implementation and at least one passing automated test, but are still not completed
(e.g. due to missing or failing tests for other SVCs):
statuses = get_requirements_status()
in_progress = [
r for r in statuses
if not r["completed"]
and r["implementation_type"] != "N/A"
and r["automated_tests"]["passed"] > 0
]
Snapshot Freshness
An MCP server is typically spawned by an AI harness and left running for days, while builds
regenerate annotations.yml and JUnit XML underneath it. The server therefore records which
local files it parsed — including files it looked for and did not find, and the concrete files
each test_results pattern matched — and re-checks them before answering each request. If
anything changed, the project is reloaded first.
Consequences worth knowing:
-
Files that appear later count as changes. A server started before the first build picks up the
annotations.ymlthat build produces; it does not keep reporting zero implementations. -
A project that no longer parses is an error, not a stale answer. If the sources changed but the new state cannot be loaded — a half-written YAML file, say — tools fail with the parse error rather than answering from the superseded snapshot. Fixing the file restores service on the next call.
-
Absent build artifacts are reported, not counted as zero. When a configured
test_resultspattern matches no files,get_statussays so undersnapshot.warningsinstead of silently reporting a project with no tests. -
Only local sources are watched. Remote sources (git, maven, npm, pypi) are version-pinned downloads, so they are never treated as stale. Use
refreshto reload those.
reqstool-ai
reqstool-ai provides a marketplace of AI agents, prompts, and plugins built on the reqstool MCP server. This includes integrations with OpenSpec for requirement-driven API design and code generation workflows.