by fabio-rovai
AI-native ontology engine: a Rust MCP server with tools for building, validating, querying, and reasoning over RDF/OWL ontologies. In-memory Oxigraph triple store, native OWL2-DL tableaux reasoner, SHACL validation, SPARQL, versioning. Single binary, no JVM.
# Add to your Claude Code skills
git clone https://github.com/fabio-rovai/open-ontologiesGuides for using mcp servers skills like open-ontologies.
name: open-ontologies version: "0.5.1" description: > AI-native ontology engineering using 50+ MCP tools backed by an in-memory Oxigraph triple store. Build, validate, query, and govern RDF/OWL ontologies with a generate-validate-iterate loop. Use when building ontologies, knowledge graphs, RDF data, SPARQL queries, BORO/4D modeling, SHACL validation, clinical terminology mapping, ingesting from CSV/JSON/Parquet/XLSX or SQL backbones (PostgreSQL, DuckDB), or Terraform-style ontology lifecycle management. tags:
AI-native ontology engineering. Generate OWL/RDF directly, validate with MCP tools, iterate until clean, govern with a Terraform-style lifecycle.
This skill requires the Open Ontologies MCP server to provide the onto_* tools.
Install: cargo install open-ontologies or download from GitHub releases
MCP config (add to .mcp.json or Claude settings):
{
"mcpServers": {
"open-ontologies": {
"command": "open-ontologies",
"args": ["serve"]
}
}
}
No credentials needed. All processing runs locally in an in-memory Oxigraph triple store. Network access is only used when you explicitly call onto_pull (fetch remote ontology) or onto_push (send to SPARQL endpoint) with a URL you provide. Monitor alerts (onto_monitor) are logged to stdout only.
When building or modifying ontologies, follow this workflow. Decide which tools to call and in what order based on results -- this is not a fixed pipeline.
onto_validate on the generated Turtle -- if it fails, fix syntax errors and re-validateonto_load to load into the Oxigraph triple storeonto_stats to verify class count, property count, triple count match expectationsonto_lint to check for missing labels, comments, domains, ranges -- fix any issues foundonto_query with SPARQL to verify structure (expected classes, subclass hierarchies, competency questions)onto_diff to compareonto_save to write the final ontology to a .ttl fileonto_version to save a named snapshot for rollbackFor evolving ontologies in production:
onto_plan shows added/removed classes, blast radius, risk score. Check onto_lock for protected IRIs.onto_enforce with a rule pack (generic, boro, value_partition) checks design pattern compliance.onto_apply with mode safe (clear + reload) or migrate (add owl:equivalentClass bridges).onto_monitor runs SPARQL watchers with threshold alerts. Use onto_monitor_clear if blocked.onto_drift compares versions with rename detection and self-calibrating confidence.When applying an ontology to external data:
onto_map -- generate mapping config from data schema + loaded ontologyonto_ingest -- parse structured data (CSV, JSON, NDJSON, XML, YAML, XLSX, Parquet) into RDFonto_shacl -- validate against SHACL shapes (cardinality, datatypes, classes)onto_reason -- run RDFS or OWL-RL inference, materializing inferred triplesonto_extend to run the full pipeline: ingest, SHACL validate, reason in one callFor healthcare ontologies:
onto_crosswalk -- look up mappings between ICD-10, SNOMED CT, and MeSHonto_enrich -- add skos:exactMatch triples linking classes to clinical codesonto_validate_clinical -- check class labels against clinical crosswalk terminologyFor aligning two ontologies:
onto_align -- detect alignment candidates (equivalentClass, exactMatch, subClassOf) using 6 weighted signalsonto_align_feedback -- accept/reject candidates to self-calibrate confidence weights| Tool | When to use |
|---|---|
onto_validate |
After generating or modifying Turtle -- always validate first |
onto_load |
After validation passes -- loads into triple store |
onto_stats |
After loading -- sanity check on counts |
onto_lint |
After loading -- catches missing labels, domains, ranges |
onto_query |
Verify structure, answer competency questions |
onto_diff |
Compare against a reference or previous version |
onto_save |
Persist ontology to a file |
onto_convert |
Convert between formats (Turtle, N-Triples, RDF/XML, N-Quads, TriG) |
onto_clear |
Reset the store before loading a different ontology |
onto_pull |
Fetch ontology from a remote URL or SPARQL endpoint |
onto_push |
Push ontology to a SPARQL endpoint |
onto_import |
Resolve and load owl:imports chains |
onto_version |
Save a named snapshot before making changes |
onto_history |
List saved version snapshots |
onto_rollback |
Restore a previous version |
onto_ingest |
Parse structured data into RDF and load into store |
onto_map |
Generate mapping config from data schema + ontology |
onto_shacl |
Validate data against SHACL shapes |
onto_reason |
Run RDFS or OWL-RL inference |
onto_extend |
Full pipeline: ingest, SHACL validate, reason |
onto_plan |
Show added/removed classes, blast radius, risk score |
onto_apply |
Apply changes in safe or migrate mode |
onto_lock |
Protect production IRIs from removal |
onto_drift |
Compare versions with rename detection |
onto_enforce |
Design pattern checks: generic, boro, value_partition, or custom |
onto_monitor |
Run SPARQL watchers with threshold alerts |
onto_monitor_clear |
Clear blocked state after resolving alerts |
onto_crosswalk |
Look up clinical terminology mappings (ICD-10, SNOMED, MeSH) |
onto_enrich |
Add skos:exactMatch triples linking to clinical codes |
onto_validate_clinical |
Check class labels against clinical terminology |
onto_align |
Detect alignment candidates between two ontologies |
onto_align_feedback |
Accept/reject alignment candidates for self-calibrating weights |
onto_lineage |
View session lineage trail (plan, enforce, apply, monitor, drift) |
onto_lint_feedback |
Accept/dismiss lint issues to teach suppression |
onto_enforce_feedback |
Accept/dismiss enforce violations to teach suppression |
onto_unload |
Unload from memory. With name targets a specific cached entry; delete_cache=true also removes the on-disk file |
onto_recompile |
Re-parse the source. With name rebuilds a non-active cached entry without disturbing the active in-memory store |
onto_cache_status |
Inspect compile cache: active slot, all entries, effective [cache] config |
onto_cache_list |
List cached ontologies with metadata (is_active, in_memory, mtime, size) |
onto_cache_remove |
Remove a cached ontology by name (pass delete_file=false to keep the on-disk N-Triples) |
onto_repo_list |
List RDF/OWL files in configured [general] ontology_dirs directories |
onto_repo_load |
Load an ontology from a configured repo by bare name, relative path, or absolute path |
onto_status |
Server health / loaded triple count |
onto_marketplace |
Browse / install standard ontologies from the curated catalogue |
onto_dl_check |
Check subClass ⊑ superClass via DL tableaux |
onto_dl_explain |
Explain why a class is unsatisfiable (DL clash trace) |
onto_embed |
Generate text + Poincaré structural embeddings for all classes |
onto_search |
Natural-language query → most-similar classes |
onto_similarity |
Cosine + Poincaré distance between two IRIs |
onto_import_schema |
Introspect PostgreSQL or DuckDB schema → generate OWL classes/properties/cardinality |
onto_sql_ingest |
Run SQL SELECT against PostgreSQL or DuckDB → RDF (DuckDB enables federation over CSV/Parquet/JSON/HTTPFS/postgres-scanner via its extensions) |
Build me a pizza ontology with classes for Pizza, PizzaBase (ThinAndCrispy, DeepPan),
PizzaTopping (Mozzarella, Tomato, Pepperoni, Mushroom), and properties hasBase, hasTopping.
Include rdfs:labels and rdfs:comments on everything. Validate and run competency queries
to check I can ask "what toppings does a Margherita have?"
Load the ontology from https://www.w3.org/TR/owl-guide/wine.rdf, show me stats,
lint it, and run a SPARQL query to find all subclasses of Wine.
I need to add a new class "GlutenFreePizza" as a subclass of Pizza with a restriction
that hasBase only GlutenFreeBase. Plan the change, enforce against generic rules,
and apply in safe mode.
I have a CSV of employees with columns: name, department, role, start_date.
Map it to the loaded HR ontology and ingest it. Then validate with SHACL shapes
and run inference to materialize department hierarchies.
Load schema.org and my company ontology. Run onto_align to find equivalentClass
and exactMatch candidates. I'll review and give feedback to calibrate the weights.
Dynamically decide the next tool call based on what the previous tool returned. If onto_validate fails, fix and retry. If onto_stats shows wrong counts, regenerate. If onto_lint finds missing labels, add them. The MCP tools are individual operations -- Claude is the orchestrator.
Last scanned: 5/30/2026
{
"issues": [],
"status": "PASSED",
"scannedAt": "2026-05-30T16:23:27.539Z",
"npmAuditRan": true,
"pipAuditRan": true
}Open Ontologies is a Rust MCP server and desktop Studio for AI-native ontology engineering. It exposes 70+ tools that let Claude build, validate, query, diff, lint, version, reason over, align, plan, certify, and govern RDF/OWL ontologies using an in-memory Oxigraph triple store — with a full three-layer Dynamics → Causal → Planner architecture, a marketplace of 32 standard ontologies, clinical crosswalks, semantic embeddings, and a full lineage audit trail.
The Studio wraps the engine in a visual desktop environment: virtualized ontology tree with hierarchy lines, breadcrumb navigation, and connection explorer; AI chat panel with /build (IES-level deep) and /sketch (quick prototype) commands; Protégé-style property inspector; and lineage viewer.
No JVM. No Protégé.
The full Dynamics → Causal → Planner stack plus 13 new primitives. Every piece holds the MCP-native convention: the server provides validation and scaffolding, the connected LLM (Claude over MCP) does the intelligence. No internal LLM clients, no API keys, no provider abstractions.
| Layer | What it ships |
|---|---|
| Dynamics | ActionSchema + 4 MCP tools: onto_action_register / _applicable / _apply / _list. Concurrent atomic ticks, static causal laws (invariants), default-value laws, ramification via OWL-RL closure, non-deterministic outcomes with reproducible seed. |
| Causal | onto_certify_action with optional PyWhy backdoor identification (opt-in via causal-pywhy feature). Structural-proxy default + do-calculus opt-in + graceful fallback. |
| Planner | onto_plan_compile_pddl + onto_plan_classical (Fast Downward subprocess) + onto_plan_validate (sandbox-simulate). Solver stays client-side; server compiles + validates. |
onto_owl_shacl_coevolve_check + onto_owl_shacl_coevolve_incremental — SHACL validation against the OWL-RL closure, with dependency-graph routing so only shapes touching changed IRIs revalidate.onto_segment_retrieve — TBox-slice retrieval for ontology-grounded RAG.onto_extract_scaffold + onto_extract_validate — schema-guided structured extraction with typed datatype validation + conformance scoring.onto_cq_run + onto_verify_cq + onto_cq_verdicts_list — competency-question runner with pitfall hints + LLM-judgement loop.onto_classify_el — OWL-EL classification (transitive subsumption table, trivial pairs excluded).onto_eval_alignment — P/R/F1 over reference + computed alignment sets.onto_shape_combinatorics + onto_shape_induce — property-combination lattice + data-driven SHACL shape induction with support × confidence ranking.borderline_partition + borderline_record_verdict — generalised two-threshold review loop for any candidate set.onto_align_fuzzy — embedding-free fuzzy-logic adjudication with 10-rule Mamdani inference; HNSW is demoted to a candidate generator.onto_align_flora — end-to-end alignment pipeline pairing the signal extractor to the fuzzy adjudicator.onto_policy_register + onto_policy_list + onto_policy_check — authorisation gate that composes with onto_certify_action (Causal = risk; policy = authorisation).eval_rag + eval_rag_mmrag — Hit@k / MRR / faithfulness / token-Jaccard / ROUGE-1 scoring for retriever pipelines, with a dataset adapter.graph_projection_lossy_check — the auditor that pairs with onto_segment_retrieve.cargo run --example three_layer_pipeline
Walks Dynamics register → PDDL compile → Fast-Downward-shaped sas_plan parse → orchestrator-side IRI bind → sandbox validate → CIVeX certify → apply with OWL-RL ramification → final state inspection. Every layer through its public API, no external dependencies (Python, DoWhy, Fast Downward) required.
Zero new external Rust dependencies; everything optional gates behind Cargo features. Full test suite (160+ tests) green on default build; cargo clippy --lib --tests --examples -- -D warnings clean across both default and causal-pywhy configurations.
Pre-built binaries:
# macOS (Apple Silicon)
curl -LO https://github.com/fabio-rovai/open-ontologies/releases/latest/download/open-ontologies-aarch64-apple-darwin
chmod +x open-ontologies-aarch64-apple-darwin && mv open-ontologies-aarch64-apple-darwin /usr/local/bin/open-ontologies
# macOS (Intel)
curl -LO https://github.com/fabio-rovai/open-ontologies/releases/latest/download/open-ontologies-x86_64-apple-darwin
chmod +x open-ontologies-x86_64-apple-darwin && mv open-ontologies-x86_64-apple-darwin /usr/local/bin/open-ontologies
# Linux (x86_64)
curl -LO https://github.com/fabio-rovai/open-ontologies/releases/latest/download/open-ontologies-x86_64-unknown-linux-gnu
chmod +x open-ontologies-x86_64-unknown-linux-gnu && mv open-ontologies-x86_64-unknown-linux-gnu /usr/local/bin/open-ontologies
Docker:
docker pull ghcr.io/fabio-rovai/open-ontologies:latest
docker run -i ghcr.io/fabio-rovai/open-ontologies serve
From source (Rust 1.85+):
git clone https://github.com/fabio-rovai/open-ontologies.git
cd open-ontologies && cargo build --release
./target/release/open-ontologies init
For native Windows builds, see docs/windows.md.
Add to ~/.claude/settings.json:
{
"mcpServers": {
"open-ontologies": {
"command": "/path/to/open-ontologies/target/release/open-ontologies",
"args": ["serve"]
}
}
}
Restart Claude Code. The onto_* tools are now available.
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"open-ontologies": {
"command": "/path/to/open-ontologies/target/release/open-ontologies",
"args": ["serve"]
}
}
}
Add to .cursor/mcp.json or equivalent:
{
"mcpServers": {
"open-ontologies": {
"command": "/path/to/open-ontologies/target/release/open-ontologies",
"args": ["serve"]
}
}
}
{
"mcpServers": {
"open-ontologies": {
"command": "docker",
"args": ["run", "-i", "--rm", "ghcr.io/fabio-rovai/open-ontologies", "serve"]
}
}
}
Build me a Pizza ontology following the Manchester University tutorial.
Include all 49 toppings, 24 named pizzas, spiciness value partition,
and defined classes (VegetarianPizza, MeatyPizza, SpicyPizza).
Validate it, load it, and show me the stats.
Claude generates Turtle, then runs the full pipeline automatically:
onto_validate → onto_load → onto_stats → onto_reason → onto_stats → onto_lint → onto_enforce → onto_query → onto_save → onto_version
Every build includes OWL reasoning (materializes inferred triples), design pattern enforcement, and automatic versioning.
The Studio is a native desktop application that wraps the same engine in a visual environment — no browser, no server to manage. It runs entirely on your machine: the engine sidecar handles RDF/OWL operations while the UI renders the graph in real time.
Think of it as Protege meets an AI copilot. Type "build ontology about cats" and watch a 1,400-class ontology appear in the tree — classes, properties, individuals, and axioms built automatically across 13 pipeline steps. Click any node to inspect its triples, trace connections via clickable pills, and follow every change through the lineage panel.
Prior to v0.1.12, the Studio used a D3.js horizontal tree and a 3D force-directed graph (Three.js / WebGL). Both worked for small ontologies (~100 classes) but became unusable at IES-level depth: the D3 tree couldn't handle 500+ nodes without layout thrashing, and the 3D graph froze the WebKit webview above 1,000 n
open-ontologies is an open-source mcp servers skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by fabio-rovai. AI-native ontology engine: a Rust MCP server with tools for building, validating, querying, and reasoning over RDF/OWL ontologies. In-memory Oxigraph triple store, native OWL2-DL tableaux reasoner, SHACL validation, SPARQL, versioning. Single binary, no JVM. It has 163 GitHub stars.
Yes. open-ontologies passed SkillsLLM's automated security scan — a dependency vulnerability audit plus prompt-injection heuristics — with no high-severity issues. You can read the full report in the Security Report section on this page.
Clone the repository with "git clone https://github.com/fabio-rovai/open-ontologies" and add it to your Claude Code skills directory (see the Installation section above). open-ontologies ships a SKILL.md manifest, so compatible agents can discover and load it automatically.
open-ontologies is primarily written in Rust. It is open-source under fabio-rovai on GitHub, so you can review or fork the full source.
Yes. SkillsLLM lists many other MCP Servers skills you can browse and compare side by side. Open the MCP Servers category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh open-ontologies against similar tools.
No comments yet. Be the first to share your thoughts!
Top skills in this category by stars