MIT licensed - MCP, REST, dashboard - Docker-ready

Grounded answers from your database, backed by real queries.

Tablix connects to databases you define, crawls the schema, uses your configured model to derive editable context, and gives people and agents a controlled way to ask questions of live data.

Built-in database chat for NL2SQL, MCP for coding agents, REST for applications, and guarded execution that returns SQL, row counts, and evidence with the answer.

Read the MCP tool contract

No signup. No cloud dependency. No telemetry. Your data stays in your infrastructure.

git clone https://github.com/jchristn/Tablix.git
cd Tablix/docker
docker compose up -d

REST http://localhost:9100

Dashboard http://localhost:9101

MCP http://localhost:9102/rpc

The problem

Models can write SQL. They still need to understand your data.

A capable model can produce clean SQL against a schema it only half understands. It can infer joins from table names, treat ambiguous business words as obvious, and return a confident answer before anything was actually executed.

Tablix gives that model the missing layer: crawled schema, durable human-editable context, model-backed database chat, and a query path that runs under explicit guardrails.

?

Structure gets guessed

Column names, join paths, and business entities are inferred from thin clues instead of discovered.

!

Results get fabricated

Totals and row counts are only trustworthy when they came from an executed query.

/

The loop stays open

SQL handed back to a user is a draft. Executed SQL with rows and evidence is an answer.

What it is

Database chat, schema context, and agent access in one local stack.

Tablix is a self-hosted .NET server and React dashboard for asking natural-language questions of databases. It connects to user-defined databases, crawls schema, derives editable context with a configured model, and exposes the same workflows through the UI, MCP, and REST.

Database chat

Ask questions in the dashboard and get NL2SQL answers backed by executed queries, returned rows, SQL, row counts, and evidence.

Schema and context

Crawl tables, keys, indexes, and relationships, then generate database- and table-level context that can be edited and reused.

Multiple protocols

Use the dashboard for people, MCP for tool-capable coding agents, and REST for applications and automation.

Multiple database types

Connect SQLite, PostgreSQL, MySQL, and SQL Server databases from the same server and dashboard.

Guarded query execution

Set allowed statement types per database, scope calls to the selected connection, and reject multi-statement SQL.

Model provider setup

Configure and validate Ollama, OpenAI, OpenAI-compatible endpoints, or Gemini before database chat uses them.

How it works

Five steps from connection to answer.

  1. Connect. Add the database connections Tablix should know about through the dashboard, setup wizard, or API.
  2. Crawl and contextualize. Tablix reads schema geometry, generates editable database and table context, and keeps that context available to the UI, MCP, and REST.
  3. Define models and validate. Configure a provider, model, endpoint, and API key, then validate that the model path supports the tool-driven database workflow.
  4. Ask. A user asks in dashboard chat, an agent asks over MCP, or an application calls REST. Tablix supplies the schema and context needed to build SQL.
  5. Review the answer. Tablix guards and executes the query, returns real rows to the model, and exposes the verification state, SQL, row count, and evidence.
Connect
Crawl
Model
Ask
Verify

Features

What you actually get.

Verified database answers

Responses distinguish verified, partial, blocked, and ambiguous outcomes so a user can see what actually happened.

Editable context

Database and table context persists between sessions, so corrected definitions and useful join notes do not disappear.

Guarded SQL

Keep production-shaped access sane with per-database statement allowlists and selected-database execution.

Large-schema discovery

Agents can page through compact table and relationship indexes, then inspect only the tables relevant to the question.

Ambiguity handling

When words like active, latest, customer, or revenue are unclear, the flow can ask for clarification instead of guessing.

Dashboard workflows

Use setup, schema browsing, context editing, query running, CSV/JSON export, and chat without building admin tools first.

Show, do not tell

From connection string to grounded answer.

{
  "mcpServers": {
    "tablix": {
      "type": "http",
      "url": "http://localhost:9102/rpc"
    }
  }
}

Add the local HTTP endpoint to Claude, Codex, Cursor, Gemini, or any MCP client that supports HTTP servers.

MCP server name: tablix
Transport: HTTP
URL: http://localhost:9102/rpc
discover databases
read database and table context
page through tables and relationships
inspect only the tables that matter
execute a permitted query
return SQL, row count, rows, and evidence
persist useful context corrections
curl -X POST http://localhost:9100/v1/database/db_orders/query \
  -H "Authorization: Bearer tablixadmin" \
  -H "Content-Type: application/json" \
  -d '{"query":"SELECT COUNT(*) AS c FROM orders WHERE status = 1"}'
{
  "Success": true,
  "RowsReturned": 1,
  "TotalMs": 4,
  "Data": { "Columns": ["c"], "Rows": [[1847]] }
}

Full contracts in REST_API.md and MCP_API.md, plus Swagger UI at /swagger on any running instance.

Dashboard included

Configure, crawl, query, and chat without building admin tooling first.

The built-in UI covers setup, model validation, database details, query results, context editing, streaming chat, inline tool calls, and exports.

Use cases

When to use Tablix.

For engineers running Claude Code, Cursor, or Codex

Coding agents that need live database facts

Your agent can discover schema, read context explaining soft deletes, run permitted queries, and return actual row counts instead of asking you to paste output back into chat.

For data and platform teams

Self-serve analytics without a BI rollout

Non-SQL colleagues ask questions in dashboard chat and get answers with SQL and row count attached. Ambiguous questions can become clarifying questions.

For whoever inherited it

Onboarding a legacy schema

Point Tablix at the database with hundreds of tables and thin foreign keys. It crawls, surfaces inferred join candidates, and generates first-draft context you can correct.

For AI engineers

Grounding an internal assistant

Give an assistant a controlled path to live data so operational questions return numbers from the system of record, not stale index guesses.

For DevOps and SRE

Ops and incident triage

Connect a read-only database entry and let an agent answer what is queued, stuck, or delayed without opening a SQL shell mid-incident.

For platform teams

Living database documentation

Table context becomes documentation that humans and agents both read. Corrections can persist instead of staying buried in a chat transcript.

Getting started

Docker starts the full stack.

Compose starts the server, dashboard, MCP endpoint, product state, and a sample SQLite database.

git clone https://github.com/jchristn/Tablix.git
cd Tablix/docker
docker compose pull
docker compose up -d

Default local services

Default API key: tablixadmin

Sample SQLite database ships with users, orders, and line_items.

Walk the wizard

Open the dashboard, validate a model provider, validate a database, crawl schema, generate context, and end in Chat.

Add Tablix to an MCP client

MCP server name: tablix
Transport: HTTP
URL: http://localhost:9102/rpc

Deploy with Docker

Keep Tablix self-hosted, point it at databases with controlled permissions, and choose model providers that support tool calling.

FAQ

Questions engineers should ask first.

Does my data leave my infrastructure?

No. Tablix is self-hosted. The only outbound calls are to whatever model provider you configure, and if you point it at local Ollama, there are none.

Which models work?

Tablix can configure Ollama, OpenAI, OpenAI-compatible endpoints, and Gemini through PolyPrompt. The database-chat and MCP workflow require a model/provider path with tool calling support.

Can it write to my database?

Only if you allow it. AllowedQueries is per database entry, and ["SELECT"] is the sane default. Back that up with a read-only database role.

How does it handle a thousand tables?

Agents page through compact table and relationship indexes, then request full detail only for tables relevant to the question.

What does verified mean?

Tablix executed SQL against your database and the model answered from returned rows. The envelope also distinguishes partial, blocked, and ambiguous answers.

Is it production-ready?

Tablix is early software. It is a strong fit for internal tools, development environments, and read-only production access with proper database permissions.

Call to action

Give your agents a database they can query with context.

Clone the repo, start Docker, open the dashboard, and add the MCP endpoint to your agent.