MCP and the elegant agentic loop
The elegant agentic loop describes how WCGW Safety Suite moves from graph construction to audit. A human engineer builds a traceability graph of work items, concepts, and their relations. AI agents read that graph, scan for gaps and inconsistencies, and return suggestions with ready-to-apply payloads. You review each suggestion and sign the ones that hold up; they become revisions. Accepted revisions are bundled into baselines that can be compared and audited.
The same loop is open to any compatible AI client through the WCGW MCP server. Every step below has a matching MCP tool, so an agent can run the loop with you from the client you already use.
Suggestions are attributed and revisions are signed, so an auditor can trace any concept back through the audit trail to the revision that introduced it and the requirement that justified it.
flowchart TB
classDef human fill:#4a90d9,stroke:#2c5f8a,color:#fff
classDef agent fill:#9b59b6,stroke:#6c3483,color:#fff
classDef graphStyle fill:#27ae60,stroke:#1e8449,color:#fff
classDef core fill:#16a085,stroke:#0e6655,color:#fff
classDef complete fill:#e67e22,stroke:#d35400,color:#fff
classDef artifact fill:#7f8c8d,stroke:#5d6d7e,color:#fff
subgraph H["Human Layer"]
E[Engineer]:::human
A[Auditor]:::human
end
subgraph GL["Graph Layer"]
W[Work items]:::graphStyle
C[Concepts & relations]:::graphStyle
R[Concept revisions]:::graphStyle
T[Templates]:::graphStyle
G[Traceability graph]:::core
end
subgraph AG["AI Agent layer"]
EA[Evaluation agent]:::agent
QA[Query agent]:::agent
MC[MCP client]:::agent
end
subgraph AL["Artifact Layer"]
SUG[Suggestions]:::artifact
BS[Baseline snapshot]:::artifact
AT[Audit trail]:::artifact
M[Completeness metrics]:::complete
end
E -->|builds| W
W -->|links| C
C -->|versions| R
T -->|seeds| C
W -->|constitutes| G
C -->|constitutes| G
R -->|constitutes| G
G -->|scans| EA
G -->|reads| QA
QA -->|enriches| G
E -->|works with| MC
MC -->|calls tools on| G
EA -->|proposes| SUG
SUG -->|modifies| R
SUG -->|modifies| C
E -->|acts on| SUG
G -->|measures| M
R -->|snapshots| BS
BS -->|records| AT
A -->|verifies| AT
A -->|compares| BS
A -->|reads| M
A -->|queries| G
The layers
- Human Layer โ the engineer builds and owns the graph; the auditor verifies it.
- Graph Layer โ work items, concepts, relations, revisions, and templates. These constitute the traceability graph; templates seed concepts.
- Traceability Graph โ the central graph everything reads and writes; completeness is measured from it.
- Agent Layer โ the evaluation agent proposes suggestions; the query agent reads and enriches the graph. An MCP client, such as your own AI assistant, works alongside you and calls the same capabilities as tools.
- Artifact Layer โ suggestions, baseline snapshots, audit trail, and completeness metrics: the artifacts auditor work relies on.
How the loop runs
- You build work items and link concepts into a traceability graph.
- Templates seed concepts; revisions capture each change and constitute the graph.
- Completeness metrics measure how close a work item is to audit-ready.
- The evaluation agent proposes suggestions; the query agent reads and enriches the graph.
- You review and sign suggestions that hold up; they become revisions.
- Accepted revisions are captured in a baseline snapshot, which records the audit trail.
- The auditor verifies the audit trail, compares baselines, reads completeness metrics, and queries the graph.
You use the system by building a traceability graph, running queries to find gaps, and reviewing the suggestions the agent proposes. Sign the ones that hold up, and bundle approved revisions into baselines. The auditing body verifies the audit trail, compares baseline snapshots, reads completeness metrics, and queries the graph to confirm every change was reviewed and attributed.
Running the loop over MCP
The Model Context Protocol (MCP) lets an AI client call WCGW Safety Suite directly. The client signs in with OAuth as you, so every tool call acts with your permissions and is attributed to your account. The agent never sees projects you are not a member of. Writes need an active license, and AI-assisted tools consume an LLM call.
Each step of the loop maps to MCP tools:
| Loop step | MCP tools |
|---|---|
| Find your project and work | list_my_projects, list_work_items, get_work_item |
| Build the graph | create_work_item, list_work_item_templates, create_concept, create_relation, add_concept_to_work_item |
| Measure completeness | get_graph_completeness, get_refinement_report |
| Query for gaps | get_graph_query_categories, plan_graph_query_sequence, run_graph_query |
| Evaluate and get suggestions | evaluate_work_item, get_evaluation_result, list_evaluation_results |
| Review and sign | act_on_suggestion, apply_evaluation_suggestions, submit_concept_revision, list_concept_revisions |
| Baseline for audit | create_project_baseline, list_project_baselines, get_project_baseline |
The published safety engineering skills, such as Walk the Chain and STPA, are also exposed as MCP tools. They let an agent run a structured analysis over the same graph.
The agent's role in the loop stays the same: it reads, queries, and proposes. Suggestions only become revisions when you act on them, and the audit trail records who signed each one. An agent connected over MCP does not certify compliance. It does the legwork so that you have more time for engineering judgement.
Connecting a client
- Discover the server. The machine-readable agent catalog points to the MCP server card, which describes the endpoint and its authentication.
- Sign in. Configure your client with OAuth and the client ID, then sign in with your WCGW account. A free license from the web app is enough to get started.
- Pay per call, if you prefer. The Explorer plan gives 100 credits for โฌ9, spent at the paid MCP endpoint. Every operation costs the same and is charged only when it succeeds.