MCP Server

Reqvire can run as a Model Context Protocol server so MCP-capable coding assistants can inspect and operate on the engineering knowledge graph through structured tools instead of shell commands.

Startup

Start the server from the repository that contains the Reqvire model, or pass a workspace from another directory. Reqvire validates the model before the MCP server starts.

reqvire mcp
reqvire --workspace /path/to/repository mcp
reqvire mcp --host 127.0.0.1 --port 8081

Convenience no-install form:

npx -y @reqvire-org/reqvire@latest --workspace /path/to/repository mcp

HTTP Transport

The server uses MCP Streamable HTTP. The endpoint is fixed at /mcp, and Reqvire reports MCP protocol version 2025-11-25.

{
  "mcpServers": {
    "reqvire": {
      "type": "http",
      "url": "http://127.0.0.1:8081/mcp"
    }
  }
}
curl -sS \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json, text/event-stream' \
  -H 'Mcp-Protocol-Version: 2025-11-25' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}' \
  http://127.0.0.1:8081/mcp

Browser-originated requests are local-safe by default: missing Origin headers and loopback origins are accepted, while non-loopback origins are rejected.

Default Tools

Default mode advertises read and report tools only. Tool results include text content for chat clients and structuredContent for clients that consume machine-readable data.

reqvire.workspace_statusreqvire.tool_contractreqvire.model_revisionreqvire.read_elementreqvire.searchreqvire.modelreqvire.containmentreqvire.collectreqvire.submodelsreqvire.ontologiesreqvire.lintreqvire.coveragereqvire.tracesreqvire.resourcesreqvire.change_impactreqvire.format

Semantic Model Evidence

Ontology search

reqvire.search can filter ontology and semantic-contract elements and return parsed semantic content in full results.

Read element

reqvire.read_element returns element details, relations, attachments, concept references, and optional size estimates.

Collect

reqvire.collect includes authored concept references for capability and requirement elements, and semantic-contract use context where the underlying operation returns it.

Ontologies

reqvire.ontologies returns authored ontology and SHACL content as Turtle or JSON-LD, with full mode for generated Reqvire model context triples.

Size Estimates

Start with --with-size-estimates when clients need approximate context sizing for model evidence. The flag is a server startup option, not a per-tool argument.

reqvire mcp --with-size-estimates

Mutation Mode

Mutation tools are disabled by default. Enable them explicitly when an assistant should be allowed to modify the model.

reqvire mcp --enable-mutations
  • Mutation mode adds add, remove, move, rename, merge, link, unlink, relink, move-asset, and remove-asset tools.
  • Mutation tools use Reqvire core operations and return structured diffs.
  • Most mutation tools support dry_run.
  • HTTP mutation requests are serialized so concurrent clients cannot interleave filesystem writes.

Error Handling

Tool execution errors are returned as MCP tool results with isError: true. Structured payloads include a stable Reqvire error code, message, tool name, recoverability hint, and related validation errors when available.

  • validation_failed
  • duplicate_element
  • element_not_found
  • invalid_relation_type
  • attachment_contract_violation
  • single_root_ownership_violation
  • filesystem_error
Reqvire

Build verifiable and traceable software.

GitHub|Copyright © 2026 Ilija Ljubicic.