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.semantic.exportreqvire.semantic.ontologiesreqvire.semantic.shapesreqvire.semantic.conceptsreqvire.semantic.modelreqvire.semantic.graphreqvire.semantic.prefixesreqvire.semantic.vocabularyreqvire.semantic.sparqlreqvire.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, Contract Bindings entries, 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.semantic.ontologies returns authored OWL/RDF ontology vocabulary as Turtle or JSON-LD. Used external subset materialization is requested through reqvire.semantic.export with the external-used layer.

Semantic layers

reqvire.semantic.shapes returns SHACL shapes, reqvire.semantic.concepts returns SKOS concept scheme/thesaurus triples, reqvire.semantic.model returns generated model facts, and reqvire.semantic.export composes layers: ontologies, shapes, concepts, model, external-used, and prefixes.

Concept tools

reqvire.concept_schemes.list, reqvire.concepts.list, reqvire.concepts.get, and reqvire.concept_mappings.list expose standalone Thesaurus schemes, generated SKOS concepts, and mapsToConcept bridge inventory.

Semantic prefixes

reqvire.semantic.prefixes returns ontology-defined prefixes, namespaces, source element prose content, and a SPARQL prefix block; include_external adds imported external prefixes with used-subset source metadata only.

Semantic vocabulary

reqvire.semantic.vocabulary returns paged classes, properties, relation families, controlled vocabularies, semantic contracts, query patterns, source maps, diagnostics, and prefixes; ontology_document or ontology_base filters terms to one OWL document or used external source, and include_external adds used external vocabulary entries marked as external.

SPARQL

reqvire.semantic.sparql runs read-only SPARQL queries against the model-owned Oxigraph semantic store; full mode is default, and include_external queries the store with the used external subset.

Prompts

MCP prompts provide build-time guidance for regular Reqvire exploration, change planning, coverage review, semantic query construction, semantic verification search, and contract-context search.

Prompts

The server advertises MCP prompts in addition to tools and resources. Prompt templates are compiled into the Reqvire binary and retrieved through standard prompts/list and prompts/get requests.

  • reqvire.workflow.explore_model
  • reqvire.workflow.plan_change
  • reqvire.workflow.verify_coverage
  • reqvire.semantic.query
  • reqvire.semantic.verification_search
  • reqvire.semantic.contract_context_search

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
  • contract_bindings_contract_violation
  • single_root_ownership_violation
  • filesystem_error
Reqvire

Build verifiable and traceable software.

GitHub|Copyright © 2026 Ilija Ljubicic.