Skip to main content
MCP server CX Codex

semlayer — Claude Code MCP server: features and setup

The semlayer MCP server for Claude Code derives a semantic layer from a data warehouse. Agents can use it to check SQL against the warehouse’s structure and rules.

no license ★ 5 updated 2026-11-14

Install into Claude Code · Platform CLI All methods and platforms ↓
claude mcp add mcp -e ANTHROPIC_API_KEY=<ANTHROPIC_API_KEY> -- uvx semlayer
Open on GitHub

What semlayer does

semlayer examines a warehouse and produces a portable semantic layer with table and column descriptions, relationships, decoded status values, and business rules. Each inferred claim carries its confidence, source, and review state.

An agent accesses the layer over MCP. The semlayer lint command checks SQL for issues such as missing filters and unsafe joins; semlayer drift detects schema changes. Claude Code setup requires ANTHROPIC_API_KEY, and inference needs access to a data warehouse.

What it helps with

  • describe warehouse tables and columns
  • discover relationships without declared keys
  • check SQL for missing filters and faulty joins
  • detect changes to a warehouse schema

Example prompts for the agent

  • Infer a semantic layer from my Snowflake warehouse.
  • Check query.sql against the semantic layer.
  • Compare the layer with the current Snowflake schema and find changes.

How to install semlayer

Platform CLI

claude mcp add mcp -e ANTHROPIC_API_KEY=<ANTHROPIC_API_KEY> -- uvx semlayer

Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from semlayer <command>

Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more

Questions about semlayer

How do I install semlayer in Claude Code?

Run claude mcp add mcp -e ANTHROPIC_API_KEY=<ANTHROPIC_API_KEY> -- uvx semlayer. This registers the MCP server with the API key.

What does semlayer do?

It examines a warehouse schema and builds a semantic layer containing table descriptions, relationships, and business rules. Agents access the layer over MCP, while semlayer lint and semlayer drift check SQL and schema changes.

What does semlayer need to run?

Claude Code setup needs ANTHROPIC_API_KEY, and inference needs access to a data warehouse. The API key is used for language-model calls during inference.

Similar MCP servers

All MCP servers for Data and databases →
ktx-ai-data-agents-context-layer reason-machines The ktx-ai-data-agents-context-layer skill guides setup of ktx as a context layer for warehouse queries. It connects approved metrics, data structure, and business knowledge for AI agents. CX Codex +1 157installs ktx-ai-data-agents-context reason-machines The ktx-ai-data-agents-context skill configures ktx as context for agents querying a data warehouse. Use it to bring schema, metric definitions, and business knowledge into MCP-powered data work. CX Codex +1 145installs answering-natural-language-questions-with-dbt dbt-labs answering-natural-language-questions-with-dbt is a Claude Code skill that answers business questions about data by checking the dbt Semantic Layer, then writing and running SQL. CX Codex +1 1,100installs setting-up-data-catalog PostHog setting-up-data-catalog fills a project's data catalog: canonical metric definitions, trust marks on warehouse tables, and reviewed join proposals. CX Codex +1 182installs mz-ontology-design MaterializeInc The mz-ontology-design Claude Code skill helps design the semantic layer of a Materialize SQL project. It activates for schema planning, relationship modeling, and reviews of shared versus use-case data. CX Codex +1 107installs sql-jdbc-access-design Samuel Berthe sql-jdbc-access-design designs how a product exposes its data to customers over live SQL: a JDBC/ODBC endpoint, a warehouse share, or a hosted query surface. Use it before the first customer connects. CX Codex +1 10,100installs

Project sponsors

Companies that keep this analytics open