← Back to directory
S

SLayer

Community
An embeddable, expressive semantic layer for AI agents and humans
Category
Database #43 of 58
Stars
★ 303 Popular
Transport
stdio (local process)
Runtime
Python
Credentials
No credential needed
License
MIT
Last commit
48FMRS · D

SLayer is a MIT-licensed open-source semantic layer maintained by the Motley team, focused on giving AI agents governed data access and querying. It supports MCP among several interfaces and has clear install steps, making it well suited to teams building analytical agents or APIs on a warehouse; its read-only connections and credential-passing approach warrant attention to security configuration.

Strongest · Setup experience 12/20 Weakest · Reliability 7/20

Reliability
7/20
Security and permissions
9/20
Maintenance
10/20
Documentation
10/20
Setup experience
12/20
Why each score
Reliability 7/20
Only the repository-root README and badges are reviewable; the server manifest is not cached, and there are no visible CI workflows or committed tests proving the server starts cleanly, completes the MCP init and tool-list handshake, or that declared tools match real behavior. The README claims startup via `slayer mcp --demo` or `slayer mcp --ingest-on-startup` and mentions search and memory-store tools, but all of this is self-reported and unverifiable. Dependencies rely on the PyPI package `motley-slayer[all]`, so correctness depends on network and version resolution, and error handling and edge cases are invisible in the source. Given the static cap of 12 and the deduction for missing execution evidence, the score is 7.
Security and permissions 9/20
No red-line risks such as malware, credential theft, covert exfiltration, or unconfirmed destructive defaults were found. The README states database connectivity is read-only, reads the password from the `${DB_PASSWORD}` environment variable at init time without saving to disk or exposing it to Claude, and mentions row-level security, showing some least-privilege and data-boundary awareness. However, visible concerns remain: `--ingest-on-startup` actively connects to the user's datasource and ingests metadata with no explicit disclosure of connection scope, external network behavior, or where ingested data goes; MCP subprocesses inherit the launching process environment, and credential isolation relies on the user without full explanation; and no explicit confirmation mechanism for dangerous operations is described. Main risks are visible but permission scoping and confirmation flow are incomplete, so the score is 9.
Maintenance 10/20
The repository is MIT-licensed, not archived, has 168 stars and 3 open issues, and comes from the Motley team as a stated core product component, providing organizational backing for continued maintenance. However, the static source offers no verifiable information on release cadence, commit history, dependency update policy, issue response record, or security response channel, leaving governance and versioning gaps. Active but with governance/versioning information missing, the score is 10.
Documentation 10/20
The README provides install commands, two quickstart paths (demo and own data), datasource creation examples, and layered docs links for MCP, REST, CLI, Python, Flight SQL, and dbt/Cube/Ossie importers, plus conceptual expression and multi-stage query explanations, making it generally usable. But it lacks tool parameter details, explicit limits and cost/quota disclosure, and directly readable troubleshooting content, and key evidence is external links rather than reviewable in-repo text, leaving hidden assumptions and troubleshooting gaps. The score is 10.
Setup experience 12/20
The install path is clear: install the PyPI package `motley-slayer[all]` with uv, then add it to Claude Code with a one-line `claude mcp add` command, with a zero-config demo dataset quickstart and an own-data datasource example, requiring few steps and targeting a mainstream client. But it depends on uv, PATH refresh (`uv tool update-shell`), and exporting environment variables in the launching shell, and actual connectivity is not verified in the source, leaving manual and environment-sensitive steps. Given the static cap of 15 and the absence of executable verification evidence, the score is 12.

Static review · not runListed 2026-09-10

Read the FMRS scoring method →

Fit and risk

What it can accessConnects to a database

Best for

  • Data teams wanting a governed data access surface for AI agents
  • Developers building analytical MCP servers or APIs on top of a warehouse
  • Teams with existing dbt, Cube, or Ossie semantic configs they want to reuse
  • Engineers embedding a semantic layer into Python apps

Not for

  • Scenarios requiring write access to the database (SLayer connections are read-only)
  • Simple cases where direct SQL is sufficient and no semantic layer is needed
  • Non-Python stacks that cannot run the CLI or an MCP subprocess

Required permissions

  • Read-only database access to configured datasources
  • Environment variables holding database credentials such as DB_PASSWORD
  • Permission to run the local CLI and the MCP subprocess
  • Permission to modify Claude Code MCP configuration

Risks and side effects

  • Database credentials are passed to the MCP subprocess via environment variables, so a compromised launching shell could expose them
  • Connections are read-only but can still read sensitive business data, so row-level security should be applied
  • Once connected via MCP, agents can run queries, so verify their query scope matches expectations
  • As a third-party project, availability and behavior depend on upstream maintenance

Setup

Before you start

Runtime:Python

DB_PASSWORD optionalsecret Database password read by SLayer at init time and never saved to disk; export it in the shell that launches Claude Code.

Using uv is recommended. Run uv tool install 'motley-slayer[all]'; if slayer isn't found on PATH afterwards, run uv tool update-shell and reopen your terminal. With the demo dataset: claude mcp add slayer_demo -- slayer mcp --demo (preloaded Jaffle Shop demo, zero-config). With your own data: create a datasource, e.g. slayer datasources create 'postgresql://user:${DB_PASSWORD}@hostname/db_name' — the password is read at init time and is not saved to disk or exposed to Claude — then run claude mcp add slayer -- slayer mcp --ingest-on-startup. Launch Claude Code from a shell where DB_PASSWORD is exported, since the MCP subprocess inherits its environment from the launching process.

Check that it works

Run `claude mcp add slayer_demo -- slayer mcp --demo`, then start Claude Code and check that SLayer MCP tools (e.g. search/query) appear in the tool list; ask a question against the Jaffle Shop demo database to confirm the connection works.

Troubleshooting

  1. slayer command not found after install: run `uv tool update-shell` and reopen your terminal
  2. MCP not showing up in Claude Code: confirm `claude mcp add` ran and restart Claude Code
  3. Database connection failures: verify the datasource string's database type, username, hostname, and db_name
  4. Password not read: confirm the client is launched from a shell where DB_PASSWORD and related variables are exported

Things to try

Once connected, you can ask your AI assistant things like:

  • Search available datasources and metric definitions
  • Show monthly revenue by store with month-over-month % change
  • Query year-over-year revenue:sum using time_shift
  • Explore the Jaffle Shop demo database for monthly revenue

Use cases

Let AI agents run governed analytical queries on your warehouse
Power analytical MCP servers or APIs with a semantic layer
Query databases semantically instead of writing SQL by hand
Embed a semantic layer inside a Python application
Import dbt, Cube, or Ossie configs and reuse existing metric definitions

Supported clients

Claude Code

Listed from the project's documentation, not tested by this site.

Overview

SLayer is an embeddable, expressive semantic layer created and maintained by the Motley team, enabling AI-powered data analytics on top of your warehouse. It gives agents a governed, shared surface through which they access your data and metrics and deliver reliable answers. SLayer handles database connectivity (read-only), SQL translation, common data transformations, and row-level security, so LLMs and humans don't have to. It can be used as a standalone tool or imported as a Python library and embedded into any Python app — for powering analytical MCP servers or APIs, or simply querying databases semantically. Unlike traditional BI semantic layers where every metric and aggregation must be predefined, SLayer lets you define a column such as revenue once and query it using expressions like revenue:sum, revenue:avg, revenue:sum / *:count, or time_shift(revenue:sum, -1, 'year'), with multi-stage queries also supported. SLayer focuses on the common agentic search → inspect → query flow, offering a search tool for efficient discovery and a memory store for linking relevant business context. Agents, apps, and humans can talk to SLayer via MCP, REST API, CLI, Python client, Flight SQL, or a Postgres-based SQL API, and it provides importers for dbt, Cube, and Ossie configs.

Similar servers

Source revision 82a40b39ddfc Data synced 2026-10-19 Read the FMRS scoring method