What problem does it solve? AI data agents often generate incorrect SQL because they lack knowledge of your warehouse schema, metric definitions, and business rules. ktx solves this by combining approved metrics, joinable columns, wiki knowledge, and dbt/Looker metadata into one searchable context layer served to agents through MCP. ## Core Features & Use Cases - Automatic warehouse learning: Samples tables, detects joinable columns, and resolves fan/chasm traps across PostgreSQL, Snowflake, BigQuery, ClickHouse, MySQL, SQL Server, and SQLite. - Context ingestion: Combines dbt, MetricFlow, LookML, Looker, Metabase, and Notion content into a semantic layer with contradiction detection. - MCP server for agents: Exposes CLI and Model Context Protocol tools so Claude Code, Codex, Cursor, and OpenCode can search metrics and wiki knowledge. - Use Case: A data team with a dbt + Snowflake project runs ktx setup and ktx ingest, then asks Claude Code "What is our total revenue metric defined as?" and receives an answer grounded in the approved semantic definition. ## Quick Start Install ktx globally with npm, run ktx setup in your analytics project to configure your LLM, database, and dbt context source, then run ktx ingest and start the MCP server with ktx mcp start before opening your agent.