Auto Ontology MCP
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| AUTO_ONTOLOGY_HOME | No | Where the ontology store, the knowledge store (knowledge.sqlite) and the demo database live | ~/.auto-ontology-mcp |
| AUTO_ONTOLOGY_STORE | No | Ontology store file | $AUTO_ONTOLOGY_HOME/ontology.db |
| AUTO_ONTOLOGY_MAX_ROWS | No | Maximum number of rows returned by run_sql | 30 |
| AUTO_ONTOLOGY_MCP_HOST | No | Host address for HTTP transport | 127.0.0.1 |
| AUTO_ONTOLOGY_MCP_PORT | No | Port for HTTP transport | 8765 |
| AUTO_ONTOLOGY_MCP_TOKEN | No | Token required for HTTP transport authentication | |
| AUTO_ONTOLOGY_PROFILE_ROWS | No | Number of rows sampled per table to estimate profiling statistics | 1000 |
| AUTO_ONTOLOGY_QUERY_TIMEOUT | No | Maximum time in seconds for query execution | 30 |
| AUTO_ONTOLOGY_ALLOW_DATASOURCE_TOOLS | No | Whether to expose add_datasource and scan_datasource tools | 1 |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
Auto Ontology MCP gives you (the model) a semantic layer over relational databases: business Terms mapped to columns, reviewed SQL attributes (measures, filters, joins) and verified relationships between tables. The server does the deterministic work (schema extraction, profiling, key inference, validation, read-only execution). You do the language work that NVIDIA Auto Ontology normally sends to its own LLM.
Answering a data question (always in this order):
check_readiness: is there a modeled datasource that can execute SQL?
check_answerable(question, entities): extract the entity phrases yourself, see which the ontology covers. If something material is not covered, say so and ask; do not guess.
get_query_context(terms): columns, sample values, SQL attributes, the join path and verified example queries for the Terms you will use.
lookup_values for any literal filter (names, statuses, places) you are not sure about.
Write the SQL yourself in the datasource dialect, using the join path and SQL attributes.
validate_sql, fix every error, take warnings seriously (fan-out, near-miss literals, unverified joins, percent-vs-fraction).
run_sql with the user's question. Check the rows against the question before you answer, show the SQL, and mention truncation and any uncertified (draft) Terms you relied on.
If the user confirms the answer is right, save_example_query so the next answer reuses it.
Building an ontology: add_datasource → scan_datasource → get_modeling_worklist / save_table_terms until no tables remain → list_relationships / set_relationship to review proposed joins → suggest_sql_attributes / save_sql_attribute → certify what a person approved with update_term(status="certified").
Keeping personal knowledge (datasource "knowledge", created on first use): when the user shares documents, images, notes or facts to remember, read them yourself and store what they contain. search_ontology first and reuse existing Terms instead of creating near-duplicates. Facts you would count, sum, filter or compare go into entities (define_entity, then add_records with a source); explanations, ideas and definitions go into concepts (save_concept) linked by typed relations. Every record and concept should name its source. Ask before deleting anything. list_terms is the index and recent_changes the log. For "what is X / what do I know about X", answer from get_term (definition, body, relations, sources); for totals, counts and comparisons, use SQL as for any datasource. Cite sources (get_source, or join _source_id = sources.id). When an answer is worth keeping, file it back: append it to a concept's body or save_example_query. export_wiki writes the store as an Obsidian vault the user can browse.
Search is lexical, not semantic. Search with the words the schema uses; if the user writes in another language, translate entity phrases to the ontology's language first, and try synonyms. Add the user's own words as Term synonyms with update_term so the next search finds them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
| logging | {} |
| prompts | {
"listChanged": true
} |
| resources | {
"subscribe": false,
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| check_readinessA | Start here. Lists every datasource with whether SQL can run against it, how much of it is modeled (Terms, relationships, SQL attributes) and what to do next. |
| add_datasourceA | Register a database (connections are always read-only) and, by default, scan it. Use only when the user gives you a connection URL; never invent credentials. |
| scan_datasourceA | Read (or re-read) tables, columns and declared keys; profile column values (samples, uniqueness, date formats, small value sets); infer undeclared primary/foreign keys by name and confirm them by value containment. Existing Terms and reviewed relationships are kept. |
| get_modeling_worklistA | Next tables that still need business Terms, with everything needed to name them: candidate columns with types, sample values, uniqueness and formats, foreign keys and the Terms they point to, plus the modeling rules. Then call save_table_terms once per table. Repeat until remaining is 0. |
| save_table_termsA | Save the Terms you propose for one table and map its columns to them. Replaces this table's previous Terms (Terms with SQL attributes are kept). New Terms start as draft; editing a certified Term's meaning returns it to draft. Unassigned candidate columns are attached to the first Term. |
| list_relationshipsA | Joins between tables with their evidence (declared, inferred by name and value containment, or added manually), roles when several columns point at the same table, and identifier columns that have no relationship yet. Review proposed ones with set_relationship. |
| set_relationshipA | Accept, reject, add, annotate or delete a join between two columns. Reviewed relationships survive re-scans. Only accepted relationships are used for join paths. |
| suggest_sql_attributesA | Candidate SQL attributes (reusable measures, filters, join patterns) mined from executed and verified queries, bridge tables and column profiles, with the rules for judging them. Save the good ones with save_sql_attribute. |
| save_sql_attributeA | Create, update, certify or delete a named SQL expression under a Term. The expression is executed read-only against the database before it is saved, so a broken one is rejected with the error. |
| update_termA | Edit, certify, deprecate or delete a Term. Changing the name or description of a certified Term returns it to draft unless you also pass status. |
| save_glossaryC | Maintain the glossary of abbreviations and internal jargon (MRR → monthly recurring revenue). Glossary entries are returned with query context and searched like Terms. |
| define_entityA | Create an entity in the personal knowledge store (a Term with its own table), add columns to it as you learn more, or delete it. Column types: text, integer, number, date, datetime, boolean, ref: (a link that becomes a relationship). Every record also gets id, _source_id, _source_locator, _evidence, _note and timestamps. Storing knowledge (Auto Ontology's model applied to personal knowledge):
|
| add_recordsA | Store facts you extracted from what the user shared (receipts, statements, reading notes, logs). All records are validated first; if any is wrong nothing is written and every problem is listed. Records matching existing ones by key (or identical ones) update or are skipped instead of duplicating. |
| edit_recordsA | Correct or delete records by id. Deleting a record that other records reference is refused. Confirm with the user before deleting. |
| save_conceptA | Create or update a concept: a Term with a definition, a markdown body (a wiki page) and typed relations to other Terms. Works on entity Terms too, to explain them. Targets that do not exist yet become empty concepts to fill in later. |
| get_sourceA | One source with its summary and content, and everything stored from it: records per entity, concepts and relations. Use it to cite where an answer came from. |
| list_termsA | The index of a datasource: every Term (entities and concepts) with its one-line definition, status, synonyms, record and relation counts, and which concepts are still empty. Read it before adding knowledge, to reuse Terms instead of creating near-duplicates. |
| recent_changesB | The log: what was added, changed, certified or deleted recently, newest first. |
| export_wikiA | Write the ontology (by default the knowledge store) as markdown pages that Obsidian can open: one page per Term with synonyms as aliases and relations as [[links]], one page per source, an index.md and a log.md. The folder is ~/.auto-ontology-mcp/wiki/; re-exporting replaces generated pages only. It is a one-way view: edits made in Obsidian are not read back. |
| search_ontologyA | Lexical search across Terms (entities and concepts, including their bodies and relations), synonyms, mapped columns, SQL attributes, glossary, verified example questions, sources (title, summary, content) and unmodeled tables. In the knowledge store it also finds records by their stored text ('value' hits; request kind 'value' to search another datasource's data). Not semantic: use the schema's vocabulary, try synonyms, translate. |
| get_termB | One Term: definition, status, synonyms, mapped columns with sample values and formats, SQL attributes and related Terms with their join conditions and multiplicity. |
| describe_tableC | A physical table with its Terms, columns (and the attributes mapping them), relationships and SQL attributes. |
| find_join_pathA | Shortest chain of accepted relationships between two Terms or tables, with ON conditions, a ready FROM/JOIN clause, fan-out warnings and alternative roles (e.g. billing vs delivery city). |
| check_answerableA | Cheap pre-flight: does the ontology cover every entity of the question? Returns coverage, a verdict (answerable, uncertain, partially_answerable, not_answerable) and the best matches per entity. When something material is not covered, tell the user instead of substituting a similar measure. |
| get_query_contextB | Everything needed to write the SQL: qualified tables, mapped columns with sample values and formats, SQL attributes, the join path connecting the Terms (with a ready FROM/JOIN clause and role notes), verified example queries, glossary and the SQL rules for this dialect. |
| lookup_valuesA | Real values stored in a column, to ground literal filters ('Pennsylvania', a product name, a status code) before you write them into SQL. |
| validate_sqlA | Check a query before running it: read-only guard, unknown tables/columns, joins that are not (or not the default) relationships in the ontology, wrong-looking literals (near-miss values, percent vs fraction), one-to-many fan-out under SUM/AVG/COUNT, and a dry run. Also reports which Terms the query relies on and whether they are certified. |
| run_sqlA | Execute a read-only query and return columns, rows, row_count and truncated, plus the Terms it used and warnings. Writes, DDL and multiple statements are refused; the connection itself is read-only. Present the SQL with the answer and say when results are truncated. |
| save_example_queryA | Store a question and SQL pair the user confirmed as correct. Verified examples are offered by get_query_context for similar questions and mined by suggest_sql_attributes. |
| export_ontologyA | The whole semantic layer of a datasource as one YAML/JSON document (Terms, column mappings, SQL attributes, relationships, glossary, example queries), for review or version control. |
| import_ontologyB | Apply an exported document to a scanned datasource (matching tables and columns by name). |
| searchB | Search the ontology documents (Terms and tables) across all datasources. Returns ids for fetch. |
| fetchA | Full text of one ontology document (a Term with its attributes, SQL attributes and relationships, or a table). |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| build_ontology | Walk through modeling a datasource end to end. |
| answer_question | Answer a data question through the ontology. |
| remember | Store what I shared (files, images, notes) in the knowledge store. |
| review_ontology | Find gaps and risks in the current ontology. |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| guide | How to use this server. |
TDQS
Scored across 33 tools
Most tools target distinct operations, but several search/retrieval tools overlap: search_ontology, search, fetch, get_term, list_terms and describe_table can all surface Term or table information. Similarly, define_entity, save_concept, save_table_terms and update_term all create/update Terms in different scopes, forcing the agent to reason carefully about which one to use.
Predominantly verb_noun (get_term, save_sql_attribute, validate_sql, find_join_path), with only minor deviations like recent_changes, search and fetch. The convention is predictable overall.
With 33 tools, the surface is well above the 3–15 sweet spot and includes redundant search/read tools. Although the domain is broad, the set feels overgrown and could be consolidated.
Covers datasource registration/scanning, Term modeling, relationships, SQL attributes, glossary, query validation/execution, export/import, personal knowledge records, concepts, sources and wiki export. Minor gaps include no delete-datasource operation and no explicit datasource listing beyond check_readiness.