agentic-catalog
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
agentic-data-catalog
A metadata catalog that AI agents can search, understand and query safely, served over the Model Context Protocol (MCP). The agent finds the right table from business words, reads what each column means and who owns it, and runs SQL through a gateway that enforces the same column-level permissions a human analyst has.
Everything here is a from-scratch reference implementation on a synthetic warehouse (DuckDB). It reflects a pattern I work with: using the catalog, not a prompt, as the context layer for agents.
The problem
Give an LLM agent a SQL connection and a list of table names, and three things go wrong:
It picks the wrong table.
raw.orders_eventsandanalytics.fct_ordersboth "have orders"; only one is deduplicated and safe for revenue.It does not know what columns mean. Is
total_brlgross or net? Which time zone isorder_date?It reads what it should not. Nothing stops
SELECT email FROM customersexcept a hope that the prompt said not to.
The fix for all three is the same: put meaning, lineage and access rules in a catalog, and make the agent go through it.
Related MCP server: DataHub MCP Server
How it works
flowchart LR
A[AI agent] -- MCP --> T1
subgraph S[MCP server, runs as one principal]
T1[search_tables] --> C[(catalog.yaml: descriptions, owners, lineage, sensitivity per column)]
T2[describe_table] --> C
T3[get_lineage] --> C
T4[run_sql] --> G[Query gateway]
G -- parse with sqlglot --> P{policy check per column}
P -- clear --> W[(DuckDB warehouse)]
P -- masked --> R[rewrite to sha256] --> W
P -- denied --> X[reject with reason]
endTool | What the agent gets |
| Ranked tables (BM25 over names, descriptions and column docs), with curated marts boosted over raw logs |
| Columns, meaning, owner, freshness, quality rules, and the caller's access to each column |
| Upstream sources and downstream consumers |
| Rows, with masked columns hashed; a clear error when a column is denied |
Security model
The gateway works on the parsed SQL tree, not on text, so the common bypasses fail:
Attempt | Result |
|
|
| the alias keeps its name, the value is still hashed |
| rejected: filtering on a masked column would leak it through comparisons |
| rejected: |
| rejected: one read-only |
| rejected: only catalogued tables are queryable |
A query with no | capped at 200 rows |
The principal comes from the CATALOG_PRINCIPAL environment variable set by whoever launches the server, never from the model. An agent cannot talk its way into more access.
Same table, three agents
describe_table("analytics.dim_customer"):
Column |
|
|
|
| clear | clear | clear |
| masked | clear | masked |
| denied | denied | clear |
Run it
pip install -e ".[dev]"
pytest
# start the MCP server over stdio as the analyst agent
CATALOG_PRINCIPAL=analyst-agent agentic-catalogTo use it from an MCP client such as Claude Desktop or Claude Code, register the command:
{
"mcpServers": {
"data-catalog": {
"command": "agentic-catalog",
"env": { "CATALOG_PRINCIPAL": "analyst-agent" }
}
}
}Then ask: "What was the cancellation rate by state last month?" The agent searches, finds analytics.fct_orders and analytics.dim_customer, reads that they join on customer_id, and queries them without ever seeing an e-mail.
Design decisions
Decision | Alternative rejected | Why |
Catalog as code (YAML), reviewed in pull requests | Metadata edited in a UI | Descriptions and sensitivity change with the schema, in the same diff |
BM25 search | Embeddings from day one | Deterministic and testable: the suite asserts "revenue by order date" ranks |
Mask by hashing at query time | Separate masked copies of tables | One copy of the data; the masking decision depends on who is asking |
Reject a query that touches a denied column | Silently drop the column | The agent gets a reason it can act on, instead of a misleading result |
Synthetic warehouse
warehouse.py generates customers, credit limits and order events from a fixed seed, including duplicate events to mimic at-least-once delivery. analytics.fct_orders deduplicates them, and a test asserts it.
Quality
30 tests (search ranking, lineage, the access matrix, every bypass above, the MCP tools end to end), 95% coverage, ruff, mypy --strict, CI on Python 3.11 to 3.13.
License
MIT
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Governed SQL access to your databases: redaction, query review and an audit log.
Governed access to sensitive data, secrets and APIs for AI agents. A signed proof for each decision.
Safe, read-only Postgres and MySQL access for AI agents. Audit log + column-level controls.
Query your org's data in natural language — read-only MCP access to SQL, NoSQL, files & warehouses.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to understand and query your database safely by providing a semantic layer of metadata, with tools to search, explain, validate, and generate safe SQL.2MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to search, explore data lineage, understand business context, and generate SQL queries across an organization's data ecosystem.Apache 2.0
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to query a read-only data surface through typed tools, enforcing caller-specific row access, field masking, and withheld-row disclosure so they can retrieve entitled information without writes or silent data leakage.MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to query DuckDB, Postgres, and BigQuery through a governed, read-only layer with a semantic model, SQL guard, role-based row policies, PII pseudonymization, audit logging, and cost caps.218 PyPIMIT