Auto Ontology

DatabasesAgent frameworks and SDKs

NVIDIA Auto Ontology's semantic layer and a personal knowledge base as an MCP server for Claude, ChatGPT and other MCP clients. No LLM API key needed.

Your AI app calls the Auto Ontology MCP server, which does the databases and agent frameworks and SDKs work and sends the result back to the chat.

About Auto Ontology

Auto Ontology is a community MCP server from gogoymh, filed in our directory under databases and agent frameworks and sdks. NVIDIA Auto Ontology's semantic layer and a personal knowledge base as an MCP server for Claude, ChatGPT and other MCP clients. No LLM API key needed.

At a glance

Publisher
gogoymh (community)
Runs
See the README for setup
Written in
Python
License
Apache-2.0
GitHub stars
575

How to set up Auto Ontology

  1. Follow the install steps in the Auto Ontology README; it is written in Python, so have that toolchain ready.
  2. Check the Auto Ontology README for keys or settings; the registry lists none that Auto Ontology requires.
  3. Add Auto Ontology to Claude Code, Claude Desktop, VS Code or Cursor with the config in the setup box on this page.
  4. Restart the app or reload its MCP servers, then ask it to list the Auto Ontology tools to confirm the connection.
  5. Run one read-only task with Auto Ontology first, and keep your app asking before each tool call until the results look right.

Auto Ontology compared with similar servers

  • Enferno by level09 has fewer GitHub stars than Auto Ontology (571 against 575); both are community servers, and both run locally.
  • Apple Health by neiltron has more GitHub stars than Auto Ontology (580 against 575); both are community servers, and both run locally.
  • Deft by Maneek21 has fewer GitHub stars than Auto Ontology (553 against 575); both are community servers, and both run locally.

Before you connect Auto Ontology

  • Give Auto Ontology its own API key or account with the smallest permissions the job needs, never an admin key.
  • Keep your AI app asking before each Auto Ontology tool call until you trust what it does with them.
  • Treat text that Auto Ontology fetches as data. Pages, files and messages can hold instructions written to steer an AI.
  • Read the open issues for Auto Ontology on GitHub to see what breaks and how fast the maintainers reply.

Marketing use cases for Auto Ontology

How marketing and sales teams put Auto Ontology to work, by company size. Pick the size closest to yours and start Auto Ontology on one use case.

Small business

  • A small business with its own app can ask Auto Ontology plain questions about customers and orders, without writing SQL.
  • Owners can use Auto Ontology to pull a list of customers who haven't bought in 90 days and plan a win-back email.
  • A small business with a developer can use Auto Ontology to build one focused agent, such as lead follow-up, without a big platform.
  • Auto Ontology runs on your own computer, which keeps data local; it needs a little setup, so a small team should plan an hour for it.

Mid-market

  • Marketing analysts can connect Auto Ontology to answer campaign questions from the warehouse directly, instead of waiting on the data team's queue.
  • Lifecycle teams can use Auto Ontology to build audience lists from product data and check counts before a send.
  • Growth engineering teams can use Auto Ontology to build agents that combine CRM, analytics and content tools behind one workflow.
  • Start Auto Ontology on one workflow with one owner, measure the time it saves, then roll it out to the wider team.

Enterprise

  • Enterprises should point Auto Ontology at a read replica with a read-only role, so agents query freely without risk to production data.
  • Data teams can expose curated views through Auto Ontology, so marketing gets self-serve answers without access to raw customer tables.
  • Enterprises can build on Auto Ontology with their own identity, policy and evaluation layers, so agents meet the same bar as other software.
  • Auto Ontology is a community server, so have security review the code and pin a version before Auto Ontology touches company data.

Need help becoming an AI-forward company?

We connect MCP servers and AI agents to your CRM, content and data, with the guardrails your team needs.

Contact us

Auto Ontology README

From gogoymh/auto-ontology-mcp on GitHub, shared under its Apache-2.0 license. Images are left out; the original has them.

README.md

Quick start · Demo · Knowledge base · Tools · How it works · Safety

Auto Ontology MCP (auto-ontology-mcp) brings NVIDIA Auto Ontology's semantic layer to any MCP client, for two jobs:

  • Ask your databases. Point it at a database, and the model you already use (Claude Code, Codex, OpenClaw, Hermes Agent, Cursor, VS Code, or the Claude and ChatGPT apps) builds business Terms, reviews joins and answers questions with SQL that the server checks against the ontology and the data.
  • Keep a personal knowledge base. Share receipts, statements, papers, book notes or screenshots with your assistant; it reads them and stores the facts as records, the ideas as linked concepts, the passages worth finding again in a full-text index, and where each came from. The full originals stay in your Obsidian vault. Later questions get exact numbers, searchable quotes and links back to the original.

[!TIP] Use it in place of an LLM Wiki. In Karpathy's LLM Wiki pattern the model compiles your sources into markdown pages that you read in Obsidian. Auto Ontology MCP runs the same loop (ingest, query, lint, with an index and a log) on an ontology instead of loose pages: facts go into typed tables you can sum, filter and compare with SQL, ideas become concept pages with typed links, every record, page and link keeps its source and the quote behind it, and export_wiki writes it all out as an Obsidian vault with aliases, [[links]] and the graph view. How the two map

Auto Ontology runs its own LLMs (NVIDIA NIM) behind a Next.js, FastAPI and Postgres stack. This project hands every language step (reading, extracting, naming, judging, writing SQL) to the model in your MCP client, so there is no model endpoint to host and no API key to configure. The server keeps the deterministic work: schema extraction, profiling, key inference, validation, storage and read-only execution, in local SQLite files.

Why

Text-to-SQL fails quietly. The query runs, a number comes back, and nothing says it is wrong.

❌ A model reading a raw schema ✅ The same model with auto-ontology-mcp
Guesses which of billing_city_id and delivery_city_id "the customer's state" means Gets the join path from reviewed relationships, with the default role and the alternatives spelled out
Joins customers.customer_id = orders.order_id because the integers happen to overlap validate_sql rejects the join and names the one the ontology knows
Filters state_name = 'pennsylvania' and reports zero revenue Is told the stored value is 'Pennsylvania' before running the query
Writes discount_pct > 20 against a column that holds 0 to 0.3 Is asked whether it meant 0.2
Sums a product price after joining to order lines and inflates the total Gets a fan-out warning for the one-to-many join
Sums a product's order lines and counts its tags in one SELECT, so each line is counted once per tag Is told that order lines and tags meet only at the product, and to aggregate each in its own subquery
Links two tables because both point to the same parent (an order line and a product tag of the same product) Hears from find_join_path and check_answerable that the path only meets at the product and does not say which row belongs to which
Answers "return on ad spend" with whatever revenue column it finds Hears from check_answerable that nothing covers ad spend, and says so

See it in action

auto-ontology-mcp demo sets up three demos about one fictional store: a synthetic retail database (11 tables, 3,200 orders), three of the store's documents in the knowledge store (a meeting note, a tag guide and a quality digest, with their originals in the Obsidian vault), and questions that need both. Tool output below is abridged from real runs of the test fixtures (tests/test_demo.py); the model's replies are illustrative.

1. Structured data: the retail database

A question asked after the model modeled the tables and reviewed the joins. In that review it made customers.delivery_city_id the default city role, so states below are delivery states. A fresh scan makes billing_city_id the default instead: neither column name is the unqualified city_id, and Auto Ontology's fallback then picks the alphabetically first role. set_relationship(..., is_default=true) changes it, and get_query_context names the other role in its role notes either way.

You     What was revenue for the sushi roll flash drive in Pennsylvania in June 2024?

Model   → check_answerable(entities=["revenue", "sushi roll flash drive", "Pennsylvania"])
          verdict: answerable
          revenue                  covered           Order Line › Revenue (order_lines.line_total)
          sushi roll flash drive   covered_by_value  products.product_name = 'USB Food Flash Drive - Sushi Roll'
          Pennsylvania             covered_by_value  states.state_name = 'Pennsylvania'

        → get_query_context(terms=["Order Line", "Product", "State", "Order"])
          join path: order_lines → products
                     order_lines → orders → customers → cities → states
          role note: customers.delivery_city_id = cities.city_id is the default;
                     other roles: customers.billing_city_id (billing)

        → validate_sql(first draft)
          ✗ Join customers.customer_id = orders.order_id is not how the ontology joins these
            tables (orders.customer_id = customers.customer_id).
          ! No row has states.state_name = 'pennsylvania'. Close real values: 'Pennsylvania'.

        → run_sql(fixed query)
          revenue 316.8, order_lines 4
          draft Terms used: City, Customer, Order, Order Line, Product, State

Model   Revenue was 316.80 from 4 order lines (delivery state Pennsylvania, June 2024).
        The Terms behind this answer are still drafts, so treat the definition as unreviewed.
        [SQL shown]

And a question the data cannot answer:

You     What was return on ad spend for the sushi roll flash drive?

Model   → check_answerable(...)
          verdict: partially_answerable   coverage: 0.33
          not covered: "return on ad spend", "ad spend"

Model   This database has sales but no advertising spend, so I can't compute ROAS.
        I can give you revenue for that product instead.

2. Unstructured data: the store's documents

The demo stores the three documents the way a model would after reading them: each full text as an original note in the vault, the passages worth finding again, the concepts and causal links they describe, and the action items they decide.

You     [Merchandising tag guide] Remember this.

Model   → save_passages(source={title: "Merchandising tag guide", kind: "wiki", original_text: "# Merchandising tag guide …"},
              passages=[{heading: "bestseller", text: "A product the buyers want to feature …", terms: ["Bestseller Tag"]}, …])
          original kept in the vault: originals/Merchandising tag guide.md
        → save_concept("Bestseller Tag", relations=[is_a Merchandising Tag], source=2, locator="bestseller")

You     What does the bestseller tag mean?

Model   → search_text("bestseller")
          term     Bestseller Tag                          [Bestseller] Tag
          passage  Merchandising tag guide › bestseller    "A product the buyers want to feature on the home page.
                                                            It is a placement decision and does not mean the
                                                            product sells the most units."
                   link: [[originals/Merchandising tag guide#bestseller]]

Model   Buyers pick it for home-page placement; it is not a sales ranking
        ([[originals/Merchandising tag guide#bestseller]]).

You     What led to the Midwest sales decline?

Model   → run_sql(datasource="knowledge", sql="WITH RECURSIVE chain AS (… FROM term_relations r JOIN chain
              ON r.to_term_id = chain.id WHERE r.relation IN ('causes', 'part_of')) …")
          Fewer Repeat Orders   part_of   1
          Delivery Delay        causes    2
          September Stockout    causes    2
          Fulfilment Cutover    causes    3

You     Which product problems sent products back?

Model   → run_sql(datasource="knowledge", sql="SELECT t.name, p.heading, snippet(passages_fts, …)
              FROM passages_fts JOIN passages p … JOIN passage_terms … JOIN terms t … JOIN term_relations r …
              WHERE passages_fts MATCH '"returns"* OR "back"' AND r.relation = 'instance_of'
              AND r.to_term = 'Product Quality Issue' ORDER BY bm25(passages_fts)")
          Wobbling Chair Base    Office Chair                  …Several chairs came [back] before support …
          Ear Cushion Cracking   Noise Cancelling Headphones   …the product customers sent [back] most often.

The last query is a full-text search, a walk over typed relations and a join to the passages, in one SQL statement that validate_sql checks like any other.

3. Structured and unstructured together

The database says what happened; the documents say why. The model queries both datasources and keeps the numbers and the explanations apart.

You     Why did Midwest revenue fall in 2024?

Model   → run_sql(datasource="demo", sql="SELECT substr(o.order_date, 6, 2) AS month, … WHERE r.region_name = 'Midwest' …")
          month   orders_2023   orders_2024
          01      32            17
          02      30            19
          09      34            16
        → search_text("Midwest January September", kinds=["passage"])
          Midwest sales review, Q3 2024 › Summary   "Midwest orders fell behind last year twice in 2024:
                                                     in [January] and February, and again in [September]. …"
        → run_sql(datasource="knowledge", sql="WITH RECURSIVE … term_relations …")
          Fulfilment Cutover → Delivery Delay → Fewer Repeat Orders ← September Stockout

Model   Midwest orders dropped to 17 and 19 in January and February 2024 (32 and 30 a year earlier) and to 16 in
        September (34). The Q3 sales review gives the reasons: fulfilment moved to Lakeshore Logistics on January 8
        and deliveries took eight days instead of three, then Lakeshore ran out of desks and chairs in early September
        ([[originals/Midwest sales review, Q3 2024#January cutover]], [[…#September stockout]]).

You     Which open action items deal with that, and who owns them?

Model   → run_sql(datasource="knowledge", sql="SELECT a.title, a.owner, a.due_on, group_concat(DISTINCT p.heading)
              FROM action_items a JOIN sources s ON s.id = a._source_id JOIN passages p ON p.source_id = s.id
              JOIN passages_fts ON passages_fts.passage_id = p.id
              WHERE a.status = 'open' AND passages_fts MATCH '"stockout"* OR "delivery"*' GROUP BY …")
          Move Ohio and Michigan fulfilment back to Columbus   Min Lee         2025-01-31   January cutover, September stockout
          Send a win-back offer to Midwest customers           Dana Whitfield  (none)       January cutover, September stockout

You     Do bestseller products sell more?

Model   → run_sql(datasource="demo", …)    bestseller: 7 products, 1,309 units each on average; other: 11 products, 1,365
        → search_text("bestseller")         "It is a placement decision and does not mean the product sells the most units."

Model   No: bestseller products sold slightly fewer units on average (1,309 against 1,365). That fits the tag guide,
        which says buyers assign the tag for home-page placement rather than from sales.

Remove everything the demo added to the knowledge store and the vault with auto-ontology-mcp demo --remove; --no-knowledge sets up only the database.

What it does

Catalog and profiling Reads tables, columns, declared keys and comments through SQLAlchemy, then samples rows to record top values, uniqueness, null rates, ranges, date formats, the complete value set of small text enums, and text columns that store lists ('SLE, RA')
Key inference Finds undeclared primary and foreign keys by name and confirms them by value containment. Detects roles (billing_ vs delivery_), self references and bridge tables, and lists identifier columns it could not place
Modeling with your model Hands the model one table at a time with samples, keys and the modeling rules from Auto Ontology, then validates and stores the Terms and column mappings it proposes
SQL attributes Mines reusable filters, measures and join patterns from executed and verified queries and bridge tables, runs each candidate against the database before saving it
Answerability Matches the question's entities to Terms, attributes and SQL attributes, and to names stored in the data (products, places, statuses). As in Auto Ontology, the glossary interprets a phrase rather than covering it: a phrase that matches a glossary entry is covered when the entry's definition names or matches part of the model. It then checks how the matched tables link: row to row, only at a table the question also names (counted per that table), only at a shared parent it does not name, or not at all. Join paths prefer a route that ties rows to rows over a shorter one that only meets at a shared parent
Validation Unknown columns (with the ontology's name for them), joins the ontology does not know (a join saved as a join SQL attribute counts as known), near-miss literals (in WHERE, HAVING and comparisons in the select list such as SUM(status = 'shipped')), = against a column that stores lists, percent-vs-fraction thresholds (run_sql checks these too; given the question, a percentage it states is checked even when the number fits the column, so rate < 0.18 for "below 0.18%" against a 0 to 1 column is flagged), one-to-many fan-out, and a dry run. Fan-out is judged on what is aggregated: SUM(products.unit_price) over order lines is flagged, while SUM(order_lines.quantity * products.unit_cost) or a CASE WHEN orders.… THEN order_lines.line_total END is not, because the value is computed per order line. Two branches that hang one-to-many from the same table (order lines and product tags of a product) are flagged when aggregated together, unless the query groups by the other branch (revenue by tag). Five checks need only the parsed query: integer division where it truncates (SQLite, PostgreSQL), a constant-false WHERE or an all-NULL select list, a GROUP BY on the primary key of the only table read, a many-side column selected bare next to a GROUP BY on the one side, and tables read side by side with no predicate linking them (a CROSS JOIN or a comma in FROM that multiplies the rows). On PostgreSQL an unquoted mixed-case name is reported with the query rewritten in quotes
Governance Draft, certified and deprecated status on Terms and SQL attributes; editing a certified definition returns it to draft. Verified question and SQL pairs feed later answers
Knowledge store A writable store for what your assistant reads: entities with typed columns and references, concepts with a markdown body and typed relations, passages (excerpts and section summaries), and a source with locator and quote behind every record. An index, a change log and an Obsidian export make it usable as an LLM Wiki
Full-text search FTS5 indexes over passages, Term bodies and sources, ranked with bm25. Prefix matching finds words with Korean particles attached (기억 → 기억을), and a substring pass finds them inside compounds. search_text returns snippets, headings and [[links]] to the originals
Concept graph in SQL Terms, typed relations, Term sources and passages are tables next to the records, and the FTS indexes are queryable too, so one validated query can combine a text search, a WITH RECURSIVE walk over relations and the records
Originals in Obsidian The full text of each source stays in your Obsidian vault: a note already there, transcribed text saved as a new note, or a copied PDF or image. The store keeps the summary and excerpts and links back to the heading they came from
Updates in place Nothing is rebuilt when a source changes. A re-scan keeps Terms, certification and reviewed joins, and sends new tables and columns added to modeled tables back to the model. A changed document replaces its own passages and gets its new original as a new note next to the old one
Portable Export and import the whole semantic layer as one YAML or JSON document

Results of the scan on the demo database, as reported by auto-ontology-mcp demo:

Undeclared foreign keys in the demo Found and auto-accepted Proposed for review Reported as unlinked
9 7 1 (employees.manager_id, a self reference) 1 (orders.sales_rep_id, no name match)

Quick start

You need uv.

1. Set up the demos (or skip to your own database). This creates the retail database and stores three demo documents in the knowledge store, with their originals in ~/.auto-ontology-mcp/wiki/knowledge/originals:

uvx --from git+https://github.com/gogoymh/auto-ontology-mcp auto-ontology-mcp demo

uvx caches what it installs from GitHub. To move to a newer version, run any command once with --refresh, for example uvx --refresh --from git+https://github.com/gogoymh/auto-ontology-mcp auto-ontology-mcp --version, then restart your client. A store created by an earlier version is upgraded the first time the new version opens it.

2. Connect your client. One click for Cursor or VS Code (both need uv installed):

For the other clients, copy the snippet below. auto-ontology-mcp config prints them with absolute paths filled in, which desktop apps need when uvx is not on their PATH.

Claude Code
claude mcp add auto-ontology -- uvx --from git+https://github.com/gogoymh/auto-ontology-mcp auto-ontology-mcp
Codex CLI

Add to ~/.codex/config.toml:

[mcp_servers.auto-ontology]
command = "uvx"
args = ["--from", "git+https://github.com/gogoymh/auto-ontology-mcp", "auto-ontology-mcp"]
OpenClaw

Save the server in OpenClaw's MCP registry (docs (docs.openclaw.ai/cli/mcp/registry)). OpenClaw asks for the local Gateway to be stopped while saved servers change, so start it again afterwards:

openclaw mcp set auto-ontology '{"command":"uvx","args":["--from","git+https://github.com/gogoymh/auto-ontology-mcp","auto-ontology-mcp"]}'
openclaw mcp list

The tools show up in OpenClaw's normal coding and messaging tool profiles.

Hermes Agent

Add to ~/.hermes/config.yaml (docs (hermes-agent.nousresearch.com/docs/user-guide/features/mcp)), then run /reload-mcp in a session:

mcp_servers:
  auto_ontology:
    command: "uvx"
    args: ["--from", "git+https://github.com/gogoymh/auto-ontology-mcp", "auto-ontology-mcp"]

Tools are registered as mcp_auto_ontology_<tool>, for example mcp_auto_ontology_run_sql. Hermes passes stdio servers only a baseline environment, so if you keep the store somewhere other than ~/.auto-ontology-mcp, set it under env: (AUTO_ONTOLOGY_HOME: /path).

Cursor

Add to ~/.cursor/mcp.json:

{
  "mcpServers": {
    "auto-ontology": {
      "command": "uvx",
      "args": ["--from", "git+https://github.com/gogoymh/auto-ontology-mcp", "auto-ontology-mcp"]
    }
  }
}
VS Code

Add to .vscode/mcp.json:

{
  "servers": {
    "auto-ontology": {
      "type": "stdio",
      "command": "uvx",
      "args": ["--from", "git+https://github.com/gogoymh/auto-ontology-mcp", "auto-ontology-mcp"]
    }
  }
}
Claude Desktop

Add to claude_desktop_config.json and restart Claude Desktop:

{
  "mcpServers": {
    "auto-ontology": {
      "command": "uvx",
      "args": ["--from", "git+https://github.com/gogoymh/auto-ontology-mcp", "auto-ontology-mcp"]
    }
  }
}
ChatGPT and claude.ai (remote)

Web clients only reach MCP servers on a public HTTPS URL. Run the HTTP transport with a token and expose it through a tunnel:

uvx --from git+https://github.com/gogoymh/auto-ontology-mcp auto-ontology-mcp \
  serve --transport http --port 8765 --token "$(openssl rand -hex 24)"
cloudflared tunnel --url http://127.0.0.1:8765      # or: ngrok http 8765

Add https://<tunnel-host>/<token>/mcp as a custom connector with no authentication. Connector settings in these apps take a URL but no custom headers, so the token can sit in the path. Clients that do send headers can use Authorization: Bearer <token> or ?key=<token>. In ChatGPT, write tools need a connector added in developer mode; menu names change between releases.

The search and fetch tools follow the shape ChatGPT expects from connectors used for search and deep research.

3. Ask. Try these in order:

  1. "Use auto-ontology to build the ontology for the demo datasource: review the proposed joins, model every table, then save useful SQL attributes." (or pick the build_ontology prompt)
  2. "Which states brought in the most delivered revenue in 2024?"
  3. "What was return on ad spend last quarter?" The answer should be that the data cannot say.
  4. "Why did Midwest revenue fall in 2024?" The numbers come from the database, the reasons from the demo documents.
  5. Attach a receipt, a statement, an article or your notes on a book and say "Remember this." (or pick the remember prompt). See Personal knowledge base.
  6. "Export my knowledge base for Obsidian." export_wiki writes pages next to the originals in ~/.auto-ontology-mcp/wiki/knowledge; open that folder in Obsidian as a vault.

Connect your database

uvx --from git+https://github.com/gogoymh/auto-ontology-mcp --with "psycopg[binary]" auto-ontology-mcp \
  add shop "postgresql+psycopg://readonly_user:pass@host:5432/db" --schemas sales,geo

Add the same --with to the client configuration's args so the server can load the driver.

You can also give the model a URL and let it call add_datasource. Any SQLAlchemy URL works:

Database URL Driver (uvx --with)
SQLite sqlite:////absolute/path/file.db built in
PostgreSQL postgresql+psycopg://user:pass@host:5432/db psycopg[binary]
MySQL / MariaDB mysql+pymysql://user:pass@host:3306/db pymysql
DuckDB duckdb:////absolute/path/file.duckdb duckdb-engine
Oracle oracle+oracledb://user:pass@host:1521/?service_name=ORCLPDB1 oracledb

From a clone, uv sync --extra postgres (or mysql, duckdb, oracle, all) installs the same drivers. For optional local hybrid semantic search (fastembed + sqlite-vec, no API key needed), install --extra semantic (or uvx --with fastembed --with sqlite-vec ...).

The test suite runs against SQLite and PostgreSQL 17, and against Oracle when AO_TEST_ORACLE_URL is set. MySQL and DuckDB go through the same SQLAlchemy and sqlglot code paths but have not been tested against a live server yet.

Large schemas

By default a scan reads every table and view. A schema with thousands of tables takes hours to scan and profile, so give the scan a table filter:

export AUTO_ONTOLOGY_SCAN_TABLES="STJ_KTP_*,ACB_*,!*_H"      # default filter for every scan
auto-ontology-mcp add vit "oracle+oracledb://..." --tables "STJ_KTP_*"   # saved with the datasource
auto-ontology-mcp scan vit --tables "ADR_*"                      # this scan only

The same patterns work as tables=[...] on the add_datasource and scan_datasource tools.

  • Syntax. Patterns are case-insensitive globs: * and ?, with % working like *. _ is literal. A pattern with a dot matches schema.table (HR.EMP*). !pattern excludes, and exclusions alone mean "everything except".
  • Precedence. The tables argument of the call wins, then the datasource's saved filter, then AUTO_ONTOLOGY_SCAN_TABLES, then all tables. * reads everything.
  • Growing the catalog. Tables scanned earlier that fall outside the filter are kept, with their Terms and relationships, so you can grow the catalog area by area. A scan removes a table only when the filter covers it and the database no longer has it.
  • What each scan touches. Only the tables a scan reads are profiled. Join inference runs across the whole catalog.
  • Knowledge store. The built-in knowledge store is never filtered.

Oracle notes.

  • Oracle Database 12.1 or later is required. Row limits are written as FETCH FIRST n ROWS ONLY, which 11g does not understand, so 11g is not supported in either driver mode.
  • python-oracledb runs in thin mode by default, which needs no Oracle client.
  • For servers that enforce native network encryption, install Oracle Instant Client and set AUTO_ONTOLOGY_ORACLE_CLIENT_LIB to its directory (or to 1 if it is on the library path). This switches the driver to thick mode.
  • A scan covers the login user's schema. Pass --schemas HR,SALES (or schemas=[...]) to scan other owners'.
  • Application schemas often hold thousands of tables. Scan only the areas you model with a table filter (see Large schemas).
  • The catalog keeps Oracle's own spelling (CUSTOMERS, CUSTOMER_ID), so unquoted lowercase SQL works as it does in SQL*Plus.

Personal knowledge base

Your assistant can already read PDFs, photos, web pages and notes. What it lacks is a place to keep what it read, in a form it can count, compare and cite later. The knowledge store is that place, built from the same parts as Auto Ontology's semantic layer:

Part What it holds Example
Entity Facts you will count, sum, filter or compare: a Term with its own table, typed columns and references to other entities Receipt: paid_on, merchant → Merchant, category, total_krw
Concept Meaning: a one-line definition, a markdown body and typed relations (is_a, part_of, related_to, causes, ...) Spaced Repetition is_a Learning Technique, related_to Forgetting Curve
Passage An excerpt or a section summary worth finding again, with its heading or locator in the original and the Terms it is about; full-text indexed Make It Stick, ch. 2: "Retrieval practice beats rereading." about Retrieval Practice
Source Where each record, concept, relation and passage came from, with a locator and the quote behind it, and the path of the full original in the Obsidian vault IMG_2041.jpg, line 3; originals/Make It Stick ch2.md

The store is created the first time the model saves something (datasource knowledge, file ~/.auto-ontology-mcp/knowledge.sqlite). Everything else in this README applies to it as well: synonyms in your own language, the glossary, SQL attributes for definitions like "eating out", validation, certification and verified example queries.

Originals in Obsidian, summaries and excerpts in the store

A long document does not belong in a database row, and an excerpt is no use without the page around it. So the full original stays in your Obsidian vault, where you read and annotate it, and the store keeps what you search and count: a summary on the source, passages for the parts worth finding again, records for the facts and concepts for the ideas. A source points at its original in one of three ways:

Source field When What happens
original The note is already in your vault (a web clipping, your own notes) The path is checked and stored, relative to the vault
original_text The text exists only in the conversation (a web page the model read, a transcript) Written as a new note in originals/, with the source's title, URI, date and a hash of the text as frontmatter
original_file A local PDF, image or document Copied into originals/. Hidden files and other file types are refused

Existing files are never overwritten; a different original with the same name gets a numbered name (see When a source changes). Passages carry the heading they came from, so search results and exported pages link to [[originals/Note#Heading]] and Obsidian opens the original at that section. Set AUTO_ONTOLOGY_VAULT to your own vault and the generated pages and originals go to its auto-ontology/ folder; otherwise ~/.auto-ontology-mcp/wiki/knowledge is the vault.

When a source changes

Nothing is rebuilt. Each change touches the rows it concerns, and the search indexes follow row by row.

What changed What the model does What happens
A document Saves the source again with the same uri (or its id) and the new original_text or original_file, then calls save_passages(..., replace=true) with every passage of the new version The source keeps its id. Passages whose text is unchanged keep their ids and Term links; the others are deleted and listed in deleted. The new original becomes a new note (Team handbook (2).md) and the source points at it, so passage [[links]] open the new version. The old note stays with your annotations, and recent_changes records the switch. get_source lists the records and concepts that cite the source, to correct with edit_records and save_concept
A database schema Calls scan_datasource (or you run auto-ontology-mcp scan NAME) Tables and columns are added to and dropped from the catalog. Terms, certified status, reviewed joins and SQL attributes stay, and inferred joins are tested again. get_modeling_worklist returns new tables and modeled tables that gained columns; the latter come with new_columns and the current_terms to send back with the new columns placed
Rows in a database Nothing Queries run against the live database. A re-scan refreshes samples and profiles

The server does not watch files or compare document versions on its own: the model reads the new version and tells the store what changed. Saving the same document again changes nothing. Notes written by 0.5.0 and later carry a sha256 of the text in their frontmatter, so a note you have annotated in Obsidian still counts as the same original; older notes are compared by their text. A note you linked yourself with original is yours to update and is never replaced.

Searching and combining

search_text searches passages, Term definitions and bodies, and sources with SQLite FTS5 (bm25 ranking), and returns snippets, headings, the Terms each passage is about and a link to the original. Words match with their Korean particles (기억 finds 기억을) and inside compounds (곡선 finds 망각곡선을).

The same data is in tables next to your records, so SQL can combine them: terms, term_relations (walk chains with WITH RECURSIVE), term_sources, passages, passage_terms, and the indexes passages_fts, terms_fts and sources_fts:

-- Passages that mention 간격 and are about a concept that is_a Learning Technique
SELECT s.title, p.heading, snippet(passages_fts, 3, '[', ']', '…', 12) AS hit
FROM passages_fts
JOIN passages p ON p.id = passages_fts.passage_id
JOIN sources s ON s.id = p.source_id
JOIN passage_terms pt ON pt.passage_id = p.id
JOIN terms t ON t.id = pt.term_id
JOIN term_relations r ON r.from_term_id = t.id
WHERE passages_fts MATCH '"간격"*' AND r.relation = 'is_a' AND r.to_term = 'Learning Technique'
ORDER BY bm25(passages_fts);

validate_sql knows these tables, their joins and the FTS functions, so these queries get the same checks as any other. The Term tables mirror the ontology and are read-only; change Terms through save_concept, define_entity and update_term.

The indexes follow each write row by row: triggers reindex the passages and sources that changed, and only Terms that changed are copied to the mirror. A write therefore costs about the same in a large store as in a small one. With 20,000 passages, adding a record took about 20 ms and saving a passage about 40 ms (Apple M4 Pro, median of five writes).

A session

The tool calls and results below are the ones in tests/test_knowledge.py; what the user and the model say is illustrative.

You     [two receipt photos] Remember these.

Model   → search_ontology("receipt", datasource="knowledge")              no match yet
        → define_entity("Merchant", columns=[name (key), city])
        → define_entity("Receipt", table="receipts", synonyms=["영수증"],
              columns=[paid_on date required, merchant ref:Merchant, category, total_krw integer])
        → add_records("Receipt", source={"title": "IMG_2041.jpg", "kind": "image"}, records=[
              {"paid_on": "2026/10/03", "merchant": "을지로 국수집", "category": "Eating Out",
               "total_krw": "12,000원", "_evidence": "합계 12,000"}, ...])
          inserted 3 · created Merchant: 을지로 국수집, Chipotle
          (dates and amounts normalized; adding the same receipt again changes nothing)

You     [book notes] Keep my notes on chapter 2 of Make It Stick.

Model   → save_concept("Spaced Repetition", description="Reviewing material at increasing intervals.",
              body="...", relations=[is_a Learning Technique, related_to Forgetting Curve],
              source={"title": "Make It Stick", "kind": "book"}, locator="ch. 2")
          empty concepts created to fill in later: Learning Technique, Forgetting Curve

You     How much did I spend eating out in October, and where is that from?

Model   → check_answerable(["영수증", "Eating Out"], datasource="knowledge")    answerable
        → run_sql("SELECT SUM(total_krw) FROM receipts
                   WHERE category = 'Eating Out' AND paid_on LIKE '2026-10-%'")   27500
        → get_source(1)      IMG_2041.jpg: 3 Receipt and 2 Merchant records

Model   27,500 KRW, from two receipts in IMG_2041.jpg.

If a record in a batch is wrong (a date written as "last tuesday", an amount as "12%", an unknown column), nothing in the batch is saved and every problem is listed, so the model fixes and retries. Records that other records reference cannot be deleted, an entity with records is only dropped with force, and column types cannot change.

Read the rest of the Auto Ontology README on GitHub

Questions about Auto Ontology

What is the Auto Ontology MCP server?

NVIDIA Auto Ontology's semantic layer and a personal knowledge base as an MCP server for Claude, ChatGPT and other MCP clients. No LLM API key needed. Auto Ontology is maintained by gogoymh on GitHub at gogoymh/auto-ontology-mcp, and works with AI apps that support the Model Context Protocol, such as Claude, Cursor and VS Code.

How do I install the Auto Ontology MCP server?

Auto Ontology doesn't publish a one-line install in the MCP registry, so follow the setup steps in its README on GitHub (gogoymh/auto-ontology-mcp). Like most servers, Auto Ontology ends with a command or URL you paste into your AI app's MCP config.

Does Auto Ontology need an API key?

The registry lists no required keys for Auto Ontology. Check the Auto Ontology README for optional settings, and expect a remote server to ask you to sign in the first time you connect.

Is Auto Ontology an official MCP server?

No. Auto Ontology is a community server maintained by gogoymh. Community servers can be excellent; read the code and the open issues before you give Auto Ontology access to company data.

What license is Auto Ontology under?

Auto Ontology is released under the Apache-2.0 license, according to its GitHub repository. The license covers the code of Auto Ontology; the service it connects to has its own terms.