Open Ontologies

Obsidian plugin CI MIT Engine

English · 简体中文

The full [Open Ontologies](https://github.com/fabio-rovai/open-ontologies) engine inside Obsidian. Every engine tool, reasoners included: validate, reason over, SHACL-check, diff, lint and SPARQL-query ontology files in your vault, and compile the vault itself (notes, frontmatter, tags, wikilinks) into an RDF graph you can reason over. Desktop only. On first run the plugin downloads the pinned engine release for your platform, verifies it against the published SHA-256 checksums, starts it on a loopback-only port with a generated access token, and manages its lifecycle. Already have the engine installed? Point the plugin at your binary in settings. ## Features - Ontology tree pane, SPARQL console with history, validation panel with per-note deep links - Validate-on-save for `.ttl`, `.owl`, `.rdf` and `.jsonld` files - Vault to RDF mapping: notes become individuals, `type:` frontmatter becomes `rdf:type`, `property:: [[Target]]` inline fields become object properties, tags become SKOS concepts - Inferred connections: see the links your notes entail but never stated - Every engine tool is reachable; reasoning profiles from RDFS to full OWL 2 DL tableaux ## Give your AI agent a reasoned second brain The engine this plugin runs is an MCP server, so Claude Code and Claude Desktop can query your vault as a knowledge graph. That is a different thing from letting an agent read your files. Tools like `mcp-obsidian` already do file read, write and search well, and this plugin does not duplicate them; the two compose, and you can connect both. What this adds is reasoning. Your agent can ask which notes violate a shape, what is transitively part of a project, or which people sit two hops from a topic, and get answers derived from the graph rather than inferred from text. Open the plugin settings, click **Copy MCP client config**, and paste the result into your Claude Code config (`.mcp.json` or `~/.claude.json`) or Claude Desktop's `claude_desktop_config.json`: ```json { "mcpServers": { "open-ontologies": { "type": "http", "url": "http://127.0.0.1:27125/mcp", "headers": { "Authorization": "Bearer YOUR_TOKEN" } } } } ``` The equivalent CLI form is: ```bash claude mcp add --transport http --header "Authorization: Bearer YOUR_TOKEN" \ open-ontologies http://127.0.0.1:27125/mcp ``` The endpoint listens on loopback only and always requires the token. Treat that token like a password: anything holding it can read and modify your vault graph. You can regenerate it from settings at any time, which immediately invalidates any config you copied earlier. Auto-sync is on by default, so the graph your agent queries is recompiled ten seconds after your last note change. ### One honest caveat about how much this buys you Reasoning needs types. A vault of untyped notes and plain wikilinks compiles to a flat graph of "links to" statements, and a reasoner derives nothing interesting from it. The payoff scales with how much structure your vault actually carries. Run the **Install starter vault ontology** command to get a working vocabulary (`Note`, `Person`, `Project`, `Task`, `Source`, `Idea`, `Topic`) with `partOf` declared transitive and `relatesTo` declared symmetric, plus SHACL shapes. Then add frontmatter like `type: "[[Project]]"` to the notes you care about, and use `property:: [[Target]]` for relations that mean something. Once that is in place, marking a task as part of a project that is part of a programme lets the reasoner conclude the task belongs to the programme, without you ever writing that down. ## Install Until the community-store listing lands, install with [BRAT](https://github.com/TfTHacker/obsidian42-brat) using this repo, or copy `main.js`, `manifest.json` and `styles.css` from the latest release into `.obsidian/plugins/open-ontologies/`. ## Sibling channels The same engine ships as a [Rust binary and MCP server](https://github.com/fabio-rovai/open-ontologies), a [Docker image](https://github.com/fabio-rovai/open-ontologies/pkgs/container/open-ontologies) and a [PyPI package](https://pypi.org/project/open-ontologies-lite/). ## Development ```bash npm install npm run build # bundle to main.js npm test # unit tests npx tsc --noEmit # typecheck # End-to-end against a real engine binary OO_E2E=1 OO_ENGINE_BIN=/path/to/open-ontologies npm test ```