ktx-ai-data-agents-mcp-context-skills

Builds a semantic context layer so AI agents query data warehouses accurately.

7|2|Updated May 16, 2026
One-click install
npx skills add https://github.com/reason-machines/mcp-skills --skill ktx-ai-data-agents-mcp-context-skills-reason-machines
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: ktx-ai-data-agents-mcp-context-skills
Source: https://github.com/reason-machines/mcp-skills/tree/main/skills/ktx-ai-data-agents-mcp-context-skills
Command: npx skills add https://github.com/reason-machines/mcp-skills --skill ktx-ai-data-agents-mcp-context-skills-reason-machines

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @kaelio/ktx.

What problem does it solve? AI agents often generate incorrect SQL against data warehouses because they lack knowledge of approved metric definitions, joinable columns, and business terminology. ktx solves this by building a self-improving context layer that ingests dbt models, wiki content, and warehouse metadata, then serves that unified context to agents like Claude Code, Codex, and Cursor via CLI and MCP tools. ## Core Features & Use Cases - Context Ingestion: Ingests dbt projects, MetricFlow, LookML, Looker, Metabase, and Notion sources, deduplicating knowledge and flagging contradictions. - Semantic Layer Modeling: Defines metrics, dimensions, and join relationships in YAML, resolving chasm and fan traps through a join graph. - Agent Integration via MCP: Exposes tools like ktx_search_semantic_layer, ktx_get_metric_definition, and ktx_validate_query so agents retrieve accurate definitions before writing SQL. - Use Case: A data team configures ktx with their Snowflake warehouse and dbt project, runs ktx ingest, starts the MCP server, and Claude Code can then answer "what is our MRR definition" and generate validated revenue queries. ## Quick Start Ask the agent to run ktx setup in your analytics project, then start the MCP server with ktx mcp start so it can search the semantic layer for metric definitions.

Frequently Asked Questions about ktx-ai-data-agents-mcp-context-skills

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up ktx for a data warehouse project?▼

Run ktx setup in your project directory for an interactive flow that configures the LLM provider, embeddings provider, database connections, and context sources like dbt or Notion. It then builds initial context and installs agent integration automatically.

How to give Claude Code access to metric definitions?▼

Start the ktx MCP server with ktx mcp start after building context with ktx ingest. Claude Code can then use tools like ktx_get_metric_definition and ktx_search_semantic_layer to retrieve approved metric SQL and table schemas.

Does ktx support Snowflake and BigQuery connections?▼

Yes, ktx supports PostgreSQL, Snowflake, BigQuery, and ClickHouse through YAML database configuration in ktx.yaml. Credentials are stored separately in .ktx/secrets.yaml or environment variables, and all connections are read-only.

Can ktx ingest dbt models and Notion documentation?▼

Yes, ktx ingests dbt projects, MetricFlow, LookML, Looker, Metabase, and Notion as context sources. It organizes wiki content, removes duplicates, flags contradictions, and detects joinable columns from warehouse metadata.

Why does ktx report LLM not ready during setup?▼

The LLM not ready error means the configured provider lacks a valid API key or configuration. Run ktx status to check provider state, verify ANTHROPIC_API_KEY or equivalent environment variables, and rerun ktx setup to reconfigure.

Does ktx write to my data warehouse?▼

No, ktx is read-only by design and never executes INSERT, UPDATE, DELETE, or DDL statements. It only samples table data, reads schema metadata, and analyzes query patterns to build context.