selfhost.directory

The index of self-hostable projects — ranked, categorized and served with live updates.
Own your data and stop giving it to big tech.

SLayer logo

Self-host SLayer

v1.4.1

Semantic layer for AI agents with query-time formulas

ReleaseOpen SourceMIT
Updated5 days ago
LanguagePython
Setup difficultyModerate
Stars
314
Port
5143 (HTTP server (REST API + MCP SSE endpoint))
Install with Python

What is SLayer?

SLayer is an embeddable semantic layer designed for AI agents and humans to query data warehouses using governed, structured requests instead of raw SQL. It handles database connectivity, SQL translation, query-time aggregations and transforms (like time shifts, ratios, period changes), row-level security, and multi-stage queries. Agents and apps interact via MCP (stdio or SSE), REST API, Python SDK, CLI, Flight SQL, or a Postgres wire facade. Models can be defined as YAML code, auto-generated from database introspection, or imported from dbt/Cube/OSI, and can be edited at runtime without rebuilds. A memory store with semantic search captures business context. SLayer is MIT licensed and runs on Python 3.10+.

Should you self-host SLayer?

SLayer scores 50/100 on selfhost.directory (how scoring works) and ranks #50 of 125 in AI. It has 314 GitHub stars.

It shipped 10 stable releases in the past year. The latest, v1.4.1, came out on 22 October 2026. New versions land roughly every 4 days.

Setup is moderate: expect some configuration beyond a single command. It is MIT-licensed and written mostly in Python.

Its closest alternative on selfhost.directory is ComfyUI (93/100, 143 668 stars). It scores higher overall, so compare the two before you pick. See SLayer vs ComfyUI side by side.

Features

  • Auto-ingestion from databases
  • CLI
  • dbt/Cube/OSI import
  • Flight SQL / Arrow support
  • MCP server (stdio and SSE)
  • Memories with semantic search
  • Multi-stage queries
  • Postgres wire facade
  • Python SDK
  • Query-time formulas and transforms
  • REST API
  • Row-level Security
  • Runtime model editing
  • Semantic layer for AI agents

SLayer README

How to install SLayer

Install SLayer with Python

Environment variables
SLAYER_USAGE_REPORTING, DO_NOT_TRACK, SLAYER_INGEST_ON_STARTUP, SLAYER_MCP_ALWAYS_LOAD_QUERY

$ pip install motley-slayer $ pip install 'motley-slayer[all]' # with all extras

Install from PyPI. The [all] extra includes optional dependencies for dbt, advanced search, etc.

How to configure SLayer

  • DO_NOT_TRACK0Standard do-not-track flag to disable usage reporting

    Standard do-not-track flag to disable usage reporting

    values: 1, 0

  • SLAYER_INGEST_ON_STARTUP0Run idempotent auto-ingestion over every configured datasource on server startup

    Run idempotent auto-ingestion over every configured datasource on server startup

    values: 1, 0

  • SLAYER_MCP_ALWAYS_LOAD_QUERY0Mark the MCP query tool with Claude Code's alwaysLoad flag so it is never deferred

    Mark the MCP query tool with Claude Code's alwaysLoad flag so it is never deferred

    values: 1, 0

  • SLAYER_USAGE_REPORTINGonEnable or disable anonymous usage reporting (on/off)

    Enable or disable anonymous usage reporting (on/off)

    values: on, off

SLayer releases & version history

More in Data Management

Rate this project

Click to rate — no account needed.

0 comments

Posting as guest
Loading comments…