Find your next open-source project

Search by name, purpose, or keyword — or paste a GitHub repository URL

gogoymh/auto-ontology-mcp

Data

An MCP server that builds a semantic layer over databases and a notes knowledge base, answering questions with validated SQL.

222
33
Python
Apache-2.0
2 days old

What it does

Auto Ontology MCP is an MCP server that connects to databases and to a personal document store, exposing tools that an MCP client's model can call. It follows NVIDIA Auto Ontology: the server scans and profiles tables, infers keys and joins, and stores Terms, relationships and SQL attributes in a local SQLite ontology. The model does the modeling one table at a time, while the server validates SQL against the ontology, checks literals against real values, flags one-to-many fan-out, and runs queries read-only.

A second datasource, the knowledge store, keeps records, concepts, passages and sources extracted from documents, receipts or notes. Full originals stay in an Obsidian vault; the store keeps typed records and full-text indexes so answers can cite the passage behind a fact. Typical users are people asking questions over business databases and individuals building a searchable personal knowledge base.

Quick start

You need uv. Create the demo database and demo documents:

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

Then register the server with your client. For Claude Code:

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

For Cursor, VS Code, Claude Desktop and other clients, add the equivalent uvx command to the client's MCP configuration; auto-ontology-mcp config prints snippets with absolute paths. After restarting the client, ask it to build the ontology for the demo datasource, review proposed joins and save SQL attributes. Then ask a question like "Which states brought in the most delivered revenue in 2024?" and check the SQL it runs.

To connect a real 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

The matching --with driver flag must also be added to the client configuration.

Usage constraints

  • Python 3.12+ is required, and uvx installs from the Git repository; upgrades need --refresh because uvx caches the install.
  • SQLite works out of the box. PostgreSQL, MySQL and DuckDB need the corresponding driver extras. The test suite runs against SQLite and PostgreSQL 17; MySQL and DuckDB share the same code path but the README notes they have not been tested against a live server.
  • Connected databases are opened read-only, single-statement queries only, with a 30-second timeout and 500-row cap by default.
  • Datasource URLs, including passwords, are stored in plain text in ~/.auto-ontology-mcp/ontology.db; the README recommends read-only accounts and AUTO_ONTOLOGY_ALLOW_DATASOURCE_TOOLS=0 on shared machines.
  • Web clients such as ChatGPT and claude.ai can only connect through a public HTTPS URL, and the HTTP transport requires a token outside localhost.
  • The server does not watch files or compare document versions; the model must resubmit changed sources.
  • The project is Apache-2.0, personal and unaffiliated with NVIDIA.

HotRepo's take

On the HotRepo new-project list for 2026-11-07, the repository gained 3 stars (and 1 fork) within its first observed hour, reaching 105 stars overall. That is a single short-window snapshot rather than a trend, so it mainly shows early interest, not adoption. The design choice worth noting is that it reuses NVIDIA Auto Ontology's modeling and validation rules but replaces the warehouse-side LLM and Postgres/pgvector backend with the user's own MCP client model and local SQLite, trading a warehouse deployment for client-side validation.

Written by AI from the project's README, updated . The project's own docs are the source of truth.