semlayer
What it does
Infers a semantic layer from your data warehouse and serves it to agents over MCP.
- Connects Runs on your computer
- Account or key No key needed
- Category Databases & datasets
Install
Pick the AI app you use, then copy the settings.
Passed 2/3 checks · Runs on your computer · ✓ Commands checked Nov 14, 2026
First: which AI do you use?
Pick your app and the steps appear below.
Works with Claude, with some setup first
Install Python (uv) on your computer first (one time) · Only the Claude desktop app (Windows or Mac), not the web or phone
Install Python (uv)
One time only; it works for every server that needs Python (uv)
Open the Claude desktop app’s settings file
SettingsDeveloperEdit Config
Paste these settings and save the file
{ "mcpServers": { "semlayer": { "command": "uvx", "args": [ "semlayer", "mcp" ] } } }Quit Claude and open it again
Try it
Use semlayer and tell me what you can do for me, then show me one thing✓ If Claude says it is using semlayer or shows a semlayer tool in the answer, you are connected
1 optional setting(s) (works without them)
The command above works without these. Add them only if you want to change something, following the maker’s description.
ANTHROPIC_API_KEYOptional. Descriptions and LLM-validated joins need it; statistics-only inference works without it.
Descriptions are as written by the maker.
Menu names checked against Anthropic’s help page on Nov 11, 2026 · your screen may differ slightly by app version
ChatGPT cannot connect semlayer yet
semlayer runs on your computer, but ChatGPT can only connect servers that run on the web
What you can do instead
A · Use an app that can connect semlayer
- Install Python (uv) on your computer first (one time) · Only the Claude desktop app (Windows or Mac), not the web or phone
- Install Python (uv) on your computer first (one time)
- Install Python (uv) on your computer first (one time)
- Install Python (uv) on your computer first (one time)
B · Others in Databases & datasets that work with ChatGPT
Picked from the most used in the same category, only ones that connect by address with no key
- Supabase✓ ChatGPT
- Appwrite MCP✓ ChatGPT
- Pg Aiguide✓ ChatGPT
Works with Claude Code, with some setup first
Install Python (uv) on your computer first (one time)
Install Python (uv)
One time only; it works for every server that needs Python (uv)
Open Terminal
Mac: press Command+Space and type Terminal · Windows: open PowerShell
Paste this command and press Enter
claude mcp add --scope user semlayer -- uvx semlayer mcpType /mcp in Claude Code
You should see semlayer listed as connected
Try it
Use semlayer and tell me what you can do for me, then show me one thing✓ If Claude Code says it is using semlayer or shows a semlayer tool in the answer, you are connected
1 optional setting(s) (works without them)
The command above works without these. Add them only if you want to change something, following the maker’s description.
ANTHROPIC_API_KEYOptional. Descriptions and LLM-validated joins need it; statistics-only inference works without it.
Descriptions are as written by the maker.
Menu names checked against Anthropic’s help page on Nov 11, 2026 · your screen may differ slightly by app version
Works with Cursor, with some setup first
Install Python (uv) on your computer first (one time)
Install Python (uv)
One time only; it works for every server that needs Python (uv)
Open the AI chat in Cursor in Agent mode
Try it
Use semlayer and tell me what you can do for me, then show me one thing✓ If Cursor says it is using semlayer or shows a semlayer tool in the answer, you are connected
1 optional setting(s) (works without them)
The command above works without these. Add them only if you want to change something, following the maker’s description.
ANTHROPIC_API_KEYOptional. Descriptions and LLM-validated joins need it; statistics-only inference works without it.
Descriptions are as written by the maker.
Menu names checked against Cursor’s help page on Nov 11, 2026 · your screen may differ slightly by app version
Works with VS Code, with some setup first
Install Python (uv) on your computer first (one time)
Install Python (uv)
One time only; it works for every server that needs Python (uv)
Open the AI chat in VS Code in Agent mode
Try it
Use semlayer and tell me what you can do for me, then show me one thing✓ If VS Code says it is using semlayer or shows a semlayer tool in the answer, you are connected
1 optional setting(s) (works without them)
The command above works without these. Add them only if you want to change something, following the maker’s description.
ANTHROPIC_API_KEYOptional. Descriptions and LLM-validated joins need it; statistics-only inference works without it.
Descriptions are as written by the maker.
Menu names checked against VS Code’s help page on Nov 11, 2026 · your screen may differ slightly by app version
Other apps that use MCP, such as Windsurf, Zed or Gemini CLI, each add servers differently. See how in the app list.
JSON settings are under “For developers” below
For developers: Terminal commands and JSON settings
Installed on your computer
Claude Code
claude mcp add --scope user semlayer -- uvx semlayer mcpClaude Desktop (claude_desktop_config.json)
{
"mcpServers": {
"semlayer": {
"command": "uvx",
"args": [
"semlayer",
"mcp"
]
}
}
}Cursor (~/.cursor/mcp.json)
{
"mcpServers": {
"semlayer": {
"command": "uvx",
"args": [
"semlayer",
"mcp"
]
}
}
}VS Code (mcp.json)
{
"servers": {
"semlayer": {
"type": "stdio",
"command": "uvx",
"args": [
"semlayer",
"mcp"
]
}
}
}Values you fill in
ANTHROPIC_API_KEYsecret envOptional. Descriptions and LLM-validated joins need it; statistics-only inference works without it.
Descriptions are as written by the maker.
These settings are generated from the maker’s registry entry. If the README says otherwise, follow the README.
At a glance
- Downloads per weeki
- 227/wk
- Verified domain
- ✓ semlayer.dev
- Connection
- Runs on your computer
- Latest versioni
- 0.7.0b3
- Categoryi
- Databases & datasets
- Published to registryi
- Nov 13, 2026
- Code last changedi
- Nov 13, 2026
- Maker
- semlayer-dev
- Packages
pypi: semlayer- Website
- semlayer.dev
- Registry status
- Active
Which apps can use it
Based on how this server connects and on each app’s own docs, checked Nov 10, 2026.
Run on your computer in
ClaudeGooseLM StudioMsty StudioCherry StudioCursorVS Code + GitHub CopilotVisual StudioWindsurf (Devin Desktop)ZedKiroClineContinueJetBrains AI AssistantClaude CodeCodex CLIGemini CLIOpenCodenodecodeWarpLibreChatRaycast
Related guides
What it can do
Runs on your computer; the tool list appears in your AI app after you install it.
Basic checksi
We check information anyone can see; we have not read the code. Checks that do not apply are left out of the count. · Checked Nov 14, 2026
- ✓ Pass
Maker matches the repo
The registry name was verified against the domain semlayer.dev (the registry checks domain ownership)
- ✓ Pass
Still maintained
Code last changed yesterday
- ! Caution
Has a licence
GitHub could not identify the licence type; open the file to check
- – Not applicable
Endpoint responds
This one runs on your computer; there is no internet endpoint
- – Not applicable
Sign-in with OAuth
Runs on your computer and uses local settings instead
- … Not checked yet
No hidden instructions in tool descriptions
Runs on your computer; we can only read tool lists from internet endpoints
Discussion
Ask, share a tip or report that it does not work. Sorted by what people marked helpful.
No posts yet. Be the first to ask or share.
Posts here are written by users, not the PopNx team.
User reviews
No reviews yet
Compared with others in Databases & datasetsi
- More stars than 86% of the other 1190 servers in this category
- Published to the registry more recently than 96% of the other 1190 servers in this category
- Basic checks equal to or better than 51% of the other 1190 servers in this category
Compared with every active server in this category in the registry. Stars count only when the publisher owns the repo.
Common questions
Is semlayer safe?
It passed 2 of 3 applicable basic checks. We have not read the code. Before adding a key or token, see what access the server asks for and use a key with only the permissions you need.
What keys or codes does it need?
The registry does not list a required key, though some servers ask you to sign in on first use.
Does it run on my computer or in the cloud?
It runs on your computer. Your AI app starts it when needed, and data does not pass through the maker’s servers (unless it calls an online service itself).
Is it still maintained?
The GitHub repo last changed yesterday, and the latest version (0.7.0b3) reached the registry yesterday.
Which apps can use it?
Apps that support MCP, such as Claude Desktop, Claude Code, Cursor and VS Code. You also need Python (uv) on your computer.
What can I use instead?
In the same category: Dbx, MCP Toolbox for Databases, MCP Toolbox for Databases
Others in the same category
Servers in the same category from other makers, sorted by stars.
Reading a card:↓ Downloads per weeki★ GitHub starsiThree pillars: reviews · checks · usageiUpdated = latest version published to the registryi
MCP Toolbox for Databases
MCP Toolbox for Databases enables your agent to connect to your database.
MCP Toolbox for Databases
MCP Toolbox for Databases enables your agent to connect to your database.
README from the maker
Open the README
Copied from the maker’s repo as written. PopNx MCP has not reviewed or endorsed it. HTML, images and scripts are removed. Links lead off this site.
semlayer
The semantic layer that infers itself — skip the quarter of hand-writing dbt YAML. Fair Source (FSL-1.1-ALv2); the format and its schemas are Apache-2.0.
Point it at your warehouse. It profiles every column, discovers the foreign keys nobody declared, decodes the status columns, finds the business rules hiding in your aggregate tables, and writes the whole thing down as a portable semantic layer in an openly licensed format — with confidence, provenance, and lifecycle on every single claim — ready for any AI agent to consume over MCP.
pip install "semlayer[warehouses]"
semlayer init snowflake # generates the minimal-grant setup script
snowflake reads the environment; snowflake: reads
~/.snowflake/connections.toml; snowflake://user@account/db?role=.. is a URL
semlayer infer snowflake -o layer.yaml \ --context ./docs/ --context ./etl-repo/CLAUDE.md # optional: your wikis/dictionaries as priors semlayer review layer.yaml # accept/reject what the engine inferred semlayer mcp layer.yaml # serve it to Claude, Cursor, or any MCP client semlayer lint layer.yaml query.sql # check any SQL (yours or an agent's) against the layer semlayer drift layer.yaml snowflake # catch schema changes (cron- and CI-friendly)
Or start from an agent instead of a terminal: add the MCP server to Claude Desktop, Claude Code or Cursor and ask it what it can see — it discovers the warehouses configured on your machine and says what to do next, with no layer built yet. See docs/mcp.md.
In VS Code and Cursor, the same layer underlines the fan-out joins and missing required filters as you type — docs/vscode.md.
From a checkout (to develop on semlayer itself): pip install -e ".[warehouses]".
Why
AI agents fail on real warehouses: frontier models solved just 21.3% of Spider 2.0's enterprise-warehouse tasks at publication (vs ~91% on the earlier academic Spider 1.0) — and even today's best agentic scaffolds only reach ~30%. The fix is a semantic layer — but every existing tool (dbt, LookML, Cube, Snowflake semantic views) makes humans write it by hand, and it goes stale the day someone runs an ALTER TABLE.
On our messy-warehouse benchmark (cryptic names, zero declared constraints, hidden business rules), an agent using the inferred layer answers 82% of business questions correctly vs 42% from the raw schema (+95% relative), with or without the layer's SQL linter — and the errors it fixes are the *silent* kind: raw-schema "total revenue" happily sums cancelled orders; a fan-out join quietly triples a total. Full benchmark, methodology changes included, and where we DON'T help →
What gets inferred
| Examples from the test suite | |
|---|---|
| Semantic types + roles | sts_cd → status code; tot_amt → monetary measure with sum/avg aggregations; PII flagged recall-first |
| Keys & joins | 104/104 undeclared FKs on TPC-DS-style naming, F1 = 1.0 on our messy fixture — with zero of the seeded false-FK traps accepted (statistics alone never auto-include; naming + LLM must corroborate) |
| Enum decodes | C=Completed, X=Cancelled — joined from the decode dimension the engine itself discovered |
| Business rules | "these aggregate tables reconcile only when sts_cd <> 'X'" — found by hypothesis-testing, scoped to revenue metrics (scope: measures), never to counts; inherited by a child fact only when its line amounts provably sum to the parent's total |
| Grain, SCD2, ratios | "one row per ord_id"; cust_mstr is SCD2 with eff_start_dt/eff_end_dt/is_curr_flg and an as-of join rule; avg_tot_amt_per_order = revenue / orders |
| SQL linting | check_sql (MCP) / semlayer lint (CLI): deterministic checks of any SQL against the layer — missing required filters, fan-out sums, deprecated tables, SCD2 without a validity window, hallucinated columns, vacuous correlated subqueries — each with a fix hint |
| Metrics, routing, deprecation | revenue/count metrics with contract-legal filters; "use ord_hdr, avoid ord_hdr_legacy (superseded)" |
| Descriptions | every table + column, LLM-written from evidence via join-graph context propagation, judged 0.82–0.89 correct+useful by an independent model |
| Your docs as priors | --context ingests data dictionaries, wiki exports, CLAUDE.md files — and *tells you where they're wrong*: doc-vs-data contradictions go to review, never silent override (guide) |
Everything lands with confidence (calibrated, with the misses published), provenance (which signals produced it), and lifecycle (inferred → reviewed → certified, plus deprecated/orphaned), governed by a normative consumer contract that makes silent misuse — summing across a fan-out, joining SCD2 at current-row, filtering on guessed decodes — *non-conforming*, not merely unwise.
Cost & privacy
- ~$0.70 per 100 tables end-to-end on the cheap model tier, with your own API key (measured cost model). LLM calls are escalation-only; ~80% of columns resolve from statistics alone.
- Several teams, one surface: each team infers its own schema into its own file; an analyst's hub lists them as
membersand holds the cross-document relationships,semlayer stitchinfers those through the analyst's own connection, and every command takes the hub (docs/sets.md). - Tiers: every table carries a
tier(core, staging, raw, scratch) inferred from its name and ETL columns; raw and scratch tables aremodeling: inventory_only-- listed with their shape, never joined, described, metricised or queued for review column by column. On a 2,000-table synthetic estate that is 62% of tables set aside, the review queue cut 4.4x and foreign-key precision 0.31 → 0.94 (measured). - `--no-llm`: fully deterministic mode, zero API calls, still useful (0.780 typing / 0.834 role across 7 fixtures, against 0.809 / 0.838 with the model) — for orgs where LLM access needs procurement.
- `--no-sample-egress`: no value read from a warehouse cell is sent to the LLM, at no net accuracy cost across our 7 fixtures (0.809 typing / 0.842 role, versus 0.809 / 0.838 with samples). Per warehouse it trades rather than being uniformly free — up to a point better or worse. Re-measured 2026-10-03; see docs/cost-model.md.
- Two knobs for speed, output identical at any value:
--llm-workers N(default 4) runs that many model calls at once (typing escalation, foreign-key validation, both Describe passes; bounded by your API rate limit, measured 7.2x at 8) and--query-workers Nruns that many foreign-key queries at once *in your warehouse* (default 4 on a network warehouse, since it spends your compute: measured 3.3x at 4 and 6.7x at 8 on BigQuery; every core on an in-process DuckDB file).--no-llmbuilds still use--query-workers. (measured) - Read-only, minimal-grant:
semlayer initgenerates the grant script; the reader persona is proved unable to write — on PostgreSQL by a test that runs in ordinary CI against a real server (tests/test_postgres.py, no credentials needed), and on Snowflake by a live suite runnable against your own account (tests/test_snowflake_live.py). - Model-response cache, on your disk and nowhere else: each model response is cached in
semlayer/cassettesunder your platform cache directory ($XDG_CACHE_HOMEor~/.cache,~/Library/Cacheson macOS,%LOCALAPPDATA%on Windows), so an interrupted whole-warehouse run resumes without paying for the same prompts twice. The files hold what the model wrote *about* your schema — descriptions, inferred types, and the enum decodes it returned, which do quote the coded values it was shown (X=Cancelled). No credentials, no result sets, and nothing is sent to us. Switch it off with--no-llm-cacheorSEMLAYER_LLM_CACHE=off, move it withSEMLAYER_LLM_CACHE=, or keep cell values out of the prompts entirely with--no-sample-egress. - Telemetry: anonymous usage statistics — command, duration, outcome, warehouse type, bucketed table/column counts, version, OS, whether an
inferwas started from the CLI or from an agent, and forsemlayer mcpwhich MCP client connected and which of our tools it called (one of seven fixed words for the client, never its own name; tool names only, never their arguments). Never names, SQL, or data. See exactly what is sent withsemlayer telemetry --show; opt out withsemlayer telemetry --off, or per-shell withSEMLAYER_TELEMETRY=off. (what and why)
Honest scope (beta)
- Best on messy warehouses. On clean, well-named schemas our benchmark shows raw DDL is already sufficient — we publish that negative result rather than hide it. If your warehouse is tidy TPC-DS, you may not need us.
- ETL input: dbt (
--manifest target/manifest.json) -- reads the model DAG to settle join targets statistics cannot. Catalog comments and--contextdocs are read as priors on every run. - Verify it yourself, free:
ANTHROPIC_API_KEY= pytest -qreplays recorded model responses, so every accuracy floor and benchmark number above is checkable with no API key and no spend — including from a fork, where CI has no secrets (what those recordings are, and what is still untidy about them). The warehouses behind the numbers, with sources, pinned versions and licences, are listed in docs/warehouses.md. - Scale: measured to 50,000 tables, as one file or as one layer per team stitched into a hub; the largest real warehouse run so far is about 2,000. Data VOLUME is not the limit -- 4TB and 45TB are the same architecture. The ladder, and how to make it fast.
- Warehouses: Snowflake, BigQuery, PostgreSQL, DuckDB (+ Iceberg on S3 via the DuckDB bridge). PostgreSQL also reaches Redshift and other Postgres-protocol engines, whose catalogs differ in places and are untested. Exporter: dbt (losses reported, never silent). LLM: Anthropic API (Bedrock/Vertex routing is next).
- Not included: hosted service, ontology enrichment (it failed our own ablation gate — receipts), LookML/RDF exporters.
- The eval harness ships in this repo — fixtures, gold layers, competency questions, benchmark runner. Run our numbers yourself:
python fixtures/build.py && pytest tests/ -q.
Beta feedback
Running the beta? File the Beta feedback form. GitHub issues are public and permanent, so the form asks only for numbers you are happy to say out loud — don't paste schema names, role names or the *.report.json the CLI writes next to your output. That file stays on your machine; it records which tables and schemas you scoped the run to, so it is yours, not ours. If you want us to see it, email hello@semlayer.dev — same address for anything else sensitive.
Layout
spec/ format schema + consumer contract · src/semlayer/ the engine · fixtures/ 9 eval warehouses + golds + CQ suites · docs/ benchmark, cost model, spike reports · ARCHITECTURE.md how it works
Licence
Fair Source, not open source. The engine and CLI are FSL-1.1-ALv2: free for any internal use, including in production and CI, with no fee or key; the one prohibition is offering semlayer to third parties as a competing product or service. Every release converts to Apache-2.0 two years after it is published.
The format specification, its JSON Schemas and the exporters are Apache-2.0 — a semantic layer nobody el