Open source · Self-hosted

Claix Core

The open source engine for controlled database access. A SQL firewall and scoped reads for AI agents, on a machine you operate. A statement passes only when a permission covers it.

Claix
  • Release

    v0.1.0

  • Language

    TypeScript

  • Runtime

    Node.js 22+

  • License

    Apache-2.0

Docker

git clone https://github.com/claix-dev/claix-core
cd claix-core
docker compose up -d --build --wait

npx

npx -y @claix-dev/core

Compose starts Core with a sample shop. Replace the sample key before a real database. Package @claix-dev/core. Image ghcr.io/claix-dev/claix-core. PostgreSQL, MySQL, and MariaDB.

IDEs and agents

Use it with your IDEs or your own production agents

Point Cursor, Claude, Visual Studio Code, or IntelliJ at the local MCP server, or call the HTTP API from an agent you run in production. Core does not require a Claix account.

  • Cursor
  • Claude
  • Visual Studio Code
  • IntelliJ IDEA

The same process serves an agent you wrote: check a statement before it runs, and ask for a scoped read when the agent needs rows. Run the SQL only when the verdict is allow.

What it is

A perimeter you run yourself

Claix Core sits between an agent and your database. The agent proposes a statement or asks a question. Core decides what is allowed and returns a traced result. Your data stays in your database.

The firewall is deny by default. A statement is allowed only when an active permission covers that statement. A permission for one delete does not cover a drop, an alter, or a grant. If no permissions are configured, writes are denied. A plain SELECT and a transaction statement such as BEGIN or COMMIT pass. Session changes that could turn security off, such as switching role or disabling row-level security from the session, cannot be permitted.

Reads go through an agent you define. The scope travels with every query. A model is never called to decide a check. A model is optional, and only when you want a natural-language question answered from the rows that agent is allowed to see.

Release
0.1.0
Language
TypeScript
Runtime
Node.js 22 or newer
License
Apache-2.0
Package
@claix-dev/core
Container
ghcr.io/claix-dev/claix-core
Databases
PostgreSQL, MySQL, MariaDB
Interfaces
HTTP and MCP
Check
No model call
Default
Deny unless a permission covers it

What stays open

The engine that is maintained in the open

Claix Core is the product that remains public. These pieces are in the repository today, they are maintained there, and that is where they will keep being maintained. Claix Cloud adds hosting, a dashboard, Slack approvals, and workspaces on top of the same kind of check.

  • The SQL firewall

    Parses the statement, looks at the rows a write would touch, and returns allow, deny, or needs approval. The check does not call a model.

  • Scoped retrieval

    Each agent has its own file. A scope is applied to every read, so a portal agent cannot see another customer's rows.

  • The command-line tool

    init, serve, mcp, and validate. Validate checks every permission and every route against the database catalog before an agent arrives.

  • HTTP and MCP

    The same server answers HTTP checks and reads, and can run as a local MCP server for a coding agent or for an agent you run in production.

  • npm and Docker

    The package and the container image are published from the same open source project and stay on that release line.

  • The license

    Apache-2.0. You can read it, run it, and ship it. The repository is the place that work continues.

License: Apache-2.0. Source: github.com/claix-dev/claix-core.

Install

Four ways to run it

  1. 1. Docker Compose quickstart

    Clones the repository and starts Core with a sample shop. Useful the first time you want to see a deny, an approval, and a scoped read. Change the sample key before any real database.

    Quickstart

    git clone https://github.com/claix-dev/claix-core
    cd claix-core
    docker compose up -d --build --wait
  2. 2. Your own database

    Pull ghcr.io/claix-dev/claix-core and point it at PostgreSQL, MySQL, or MariaDB. Mount the folder that holds your agent files and permissions as read-only. Use a database role that can read and cannot write. Set the engine to mysql for MySQL or MariaDB.

    Compose, your database

    services:
      claix:
        image: ghcr.io/claix-dev/claix-core
        environment:
          CLAIX_API_KEY: ${CLAIX_API_KEY}
          CLAIX_DB_ENGINE: postgres
          CLAIX_DB_HOST: db.internal
          CLAIX_DB_NAME: app
          CLAIX_DB_USER: claix_agent
          CLAIX_DB_PASSWORD: ${CLAIX_DB_PASSWORD}
          CLAIX_DB_SSL: require
        volumes:
          - ./claix:/claix:ro
  3. 3. npm, without Docker

    Node.js 22 or newer. The CLI is claix: init a config, serve the API, start the MCP server, or validate the files against the catalog.

    CLI

    npx -y @claix-dev/core
  4. 4. A coding agent over MCP

    Add this server in Cursor, Claude, Visual Studio Code, IntelliJ, or another agent that speaks MCP. Set the API key and the config directory in that process environment first. The agent should check a statement before it applies a change, and ask for a scoped read when it needs rows.

    MCP

    {
      "mcpServers": {
        "claix": {
          "command": "npx",
          "args": ["-y", "@claix-dev/core", "mcp"]
        }
      }
    }

Core or Cloud?

Core is the open source engine you host. Cloud is the hosted product, with a dashboard, Slack approvals, and workspaces. The comparison page says which one fits a solo developer, a company, and a team that wants it operated for them.

Questions

Claix Core, in short

What is Claix Core?
Claix Core is the open source, self-hosted edition of Claix. It is a SQL firewall and a scoped database access layer for AI agents. You run it next to your database. A statement is allowed only when a permission you wrote covers it.
What language is Claix Core written in?
TypeScript. It runs on Node.js 22 or newer. You can start it with Docker or with the npm package @claix-dev/core. You do not need to compile it to use the published image or the CLI.
Which databases does it support?
PostgreSQL, MySQL, and MariaDB. Give Claix a read-only database role. It reads the rows a write would touch and does not run the write. Your application runs a statement only after an explicit allow.
What stays open source?
The engine stays open and maintained in the public repository: the SQL firewall, scoped retrieval, the command-line tool, the HTTP API, the MCP server, the npm package, and the container image. The license is Apache-2.0.
Does the check call a model?
No. Deciding whether a statement may run does not call a model. A model is optional, and only for turning a natural-language question into a scoped read. The firewall itself parses the statement and applies the permissions you saved.