Reference implementation of an "operational ontology": MCP tools are generated from a typed business domain model (objects, links, actions) β one tool per query shape and per action, deliberately no raw SQL tool. Writes pass business-rule preconditions, are audited, and write back to the systems of record; refusals are machine-readable. Demo scenario included (pnpm demo / pnpm mcp).
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
One-click editor setup isnβt available for this listing yet β we donβt have a confirmed install command, and weβd rather show nothing than point your editor at the wrong package or host. Follow the projectβs own setup instructions, linked above.
English | ζ₯ζ¬θͺ
An operational ontology is a shared domain model built on top of the data of systems you don't own β objects, links, and actions β where reads traverse the model and writes are gated by actions that carry business rules, are audited, and propagate back to the systems of record that own the state they change.
A semantic layer lets you read your business. An operational ontology lets you run it.
Palantir Foundry's Ontology is one implementation of this pattern. This repository is another: a minimal reference implementation, small enough to read in one sitting. It exists to make the definition precise and runnable; it is not a framework. Fork it and reuse the ideas.
The demo uses the scenario from the article this repository accompanies. A company acquires a competitor and inherits two legacy order systems with different schemas and status encodings. A few dozen lines of SQL and a small TypeScript mapping integrate them, and the ontology models Customer, Order, and Product on top β plus Note, a type that exists in no source system. The demo then shows:
assignOrder writing state that exists in no legacy system β edits can live in a layer above the sourcescancelOrder on a shipped order refused with SHIPPED_ORDER_CANNOT_BE_CANCELLEDcancelOrder on an open order succeeding, with the row in the legacy ERP actually changinghttps://github.com/user-attachments/assets/02bb8ca0-a476-4e33-b0ea-25c46c6e9dda
A system implements the pattern when all four properties hold. They constrain what must be true, not how to build it: outbox or webhook, SQL or search index, one store or many are all implementation choices. Treat them as shared vocabulary for discussing systems, not as a certification to pass.
Semantic objects and links. Business entities and their relationships are modeled explicitly, on top of physical data that existed first and that other systems own.
Action-gated writes. A business decision changes state only through a named action. There is no generic update path β not for a user, not for an application, not for an agent. State in this layer also changes for two other reasons, and neither is a loophole: re-indexing only replays what the sources already say, and schema evolution (under review) changes what can be said, not what is true. Any write that picks a business outcome is a decision, whatever the endpoint is named, and decisions go through actions.
Business rules at the action. Preconditions check domain invariants ("a shipped order cannot be cancelled") and refuse violations with machine-readable errors. They are not access control, and not UI validation. Every attempt, applied or refused, is recorded in the audit log.
Write-back to systems of record. The model declares, for every piece of state, which system owns it. There are three kinds:
What the property forbids is state with no declared owner: a local copy of source-owned data that is modified but never written back, or a write nobody can place. An implementation with no source-backed writes at all does not implement a smaller version of this pattern; it is an ordinary application with its own database.
A quick test: "Can you cancel an order from your semantic layer?"
The pattern needs a name of its own because "ontology" already means too many things:
| called an "ontology" | what it is | governed writes? |
|---|---|---|
| philosophical ontology | the study of what exists | β |
| formal ontology (OWL / RDF) | machine-reasonable semantics | no |
| knowledge graph | entities and relationships β writable as data, not as operations | no |
| AI context layer (the 2026 wave of "ontology"-branded platform features) | semantic grounding for AI answers | no |
| operational ontology (Foundry-style) | business domain schema + rule-carrying actions | yes |
Each row is a legitimate tool, and the table is not a ranking. But the one property that changes what a layer can do β whether it accepts writes governed by business rules β cuts across the whole table and had no name of its own. This repository gives it one.
The four properties leave the mechanisms open, but some choices differ between implementations in ways users can observe. Those choices must be declared, not left silent. There are four:
This repository's answers, in the same order. Ownership is declared in the model β owned marks ontology-owned properties, link types, or whole object types, and writeback: true marks an action's changes source-backed β and the runtime checks every edit plan against those declarations instead of trusting them (details). Write-back runs before the local commit, so if the source refuses, nothing changes here (see Failure semantics). Ontology-owned state survives re-indexing: edits live in an overlay that load() reapplies over the fresh base, and a re-index that would orphan an edit is refused whole. Visibility defaults to fail-open: no policy means visible to everyone (see the FAQ).
All four answers are also collected in one enumerable value, Runtime.declarations, so they can be read at runtime rather than trusted as prose. An implementation may answer all four differently and still be inside the pattern. If a product calls itself an operational ontology, ask for its four answers, not for a certificate.
The MCP tool surface is generated from the model: search_order, traverse_customer_orders, cancel_order, read_audit_log, β¦ β one tool per query shape and one per action. The tool surface is derived from the schema side; the calls act on the instance side. Two consequences:
{ "error": { "code": "SHIPPED_ORDER_CANNOT_BE_CANCELLED", β¦ } } β a machine-readable refusal it can read, recover from, and explain to its user.Reads are scoped the same way. Every query runs as an actor β the identity on whose behalf the call is made β and visibility policies attached to the model decide which objects that actor can see. Agent sessions are no exception; the audit log is the one declared exception, an unscoped administrative view. Over stdio all callers collapse into one actor. OO_AGENT=<name> pnpm mcp names that actor, which is labeling, not authentication.
https://github.com/user-attachments/assets/28327062-e09f-4103-943e-434a0e55b327
Business rules live in the ontology, not in the prompt.
Factual signals from GitHub, npm, and our automated checks β not a rating.
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/gura105-operational-ontology)<a href="https://allmcps.com/mcp/gura105-operational-ontology"><img src="https://allmcps.com/api/badge/gura105-operational-ontology?style=directory" alt="Operational Ontology on AllMCPs" /></a>