list_tablesLABSCO SUMMARY
The profile is the security boundary, and it is visual.
Rather than trusting an agent to stay inside its instructions, what it can reach is decided before it connects — table and column selection, masking rules and row scoping are configured in a UI and enforced on the endpoint. That makes 'give the support team read access to customers without exposing emails' a configuration task rather than a code review. One deployment detail worth getting right on day one: persist the generated secret file, or a container restart invalidates every token you have issued.
What it is
A self-hosted control plane between a database and an MCP client. You connect PostgreSQL, MySQL or SQLite, define an access profile — which tables and columns are visible, which columns are masked, which rows are in scope, which auth mode applies — and each profile is served as its own MCP endpoint.
What you get
- A profile's MCP endpoint at
http://localhost:4567/mcp/<profile>, with tools generated from the profile — one per exposed table plus a query tool - Read-only by construction: queries run under
SET TRANSACTION READ ONLYand are parameterised only - PII detection and masking, automatic or by custom rule, globally or per column
- Row-level scoping, so a profile can be restricted to rows matching a condition
- A write queue with an approval workflow, for the cases where mutation is needed
- Per-profile authentication — open, bearer token, password, OIDC SSO, OAuth 2.1 with dynamic client registration, or an external validation URL — with per-user tokens, revocation and a full exportable audit log
- A built-in chat for querying without an external client, backed by Anthropic, OpenRouter, or any OpenAI-compatible endpoint including a local Ollama
- A knowledge base that indexes document sources with on-device embeddings by default, so nothing leaves the machine
Requirements
You host it. git clone, pnpm install, pnpm dev, then open http://localhost:4567 and create the admin account — or docker compose up. Published as calame version 0.6.0. On first run it generates a CALAME_SECRET_KEY used to encrypt tokens and connection strings and writes it to .calame-secret; under Docker, mount a persistent volume on /data or every restart invalidates your saved tokens. You can set CALAME_SECRET_KEY yourself to reuse an existing secret. Optional SSH tunnelling covers remote databases; HashiCorp Vault integration and Caddy and nginx templates are included. Dual-licensed: Apache 2.0 for the main tree, BUSL 1.1 for the ee/ directory holding the SSO implementation.
Setup effort
One command — docker compose up
USE CASES
Letting a team query the production database safely
Expose a profile with only the tables they need, read-only, and hand them its endpoint.
Sharing data without exposing personal details
Mask the PII columns in the profile so the values never reach the client.
Scoping a profile to one customer's rows
Set a row-level condition so the same tables return only that customer's data.
Answering a data question without an MCP client
Use the built-in chat against the same profile, pointed at whichever model you configured.
Proving who queried what
Export the audit log covering the profile's activity.
12 tools
Listed in project docs. Your client may show a different list.
querydescribeaggregatejoin_aggregatewritecalcrag_searchrag_list_sourcesrag_list_foldersrag_list_documentsrag_get_documentBEFORE YOU INSTALL
What to know first
Tools you get
12 tools named in the project's documentation.
Where it runs
The documented client runs the server on your machine.
INSTALLATION
Connect your client
Server setup
Pick a runtime — Docker (recommended): Docker Desktop or Docker Engine + Compose. Or Node.js dev mode: Node >= 18 and pnpm >= 9 (corepack enable && corepack prepare pnpm@9.15.4 --activate)
git clone https://github.com/Calame-Tech/calame.git && cd calameDocker: docker compose up — OR Node dev: pnpm install && pnpm dev
Open http://localhost:4567 and create the admin account on the Setup page
Connections panel -> New connection: add your PostgreSQL / MySQL / SQLite database and Test connection (Calame introspects the schema)
Profiles panel -> New profile: pick tables and columns, set PII masking, optional row-level scoping, pick an auth mode (open / token / password / oauth / sso / external), Save, then START the profile
For token mode: Users panel -> New user -> Generate token (shown once, copy it)
Point your MCP client at http://localhost:4567/mcp/<YOUR_PROFILE_NAME>. In token mode send the header Authorization: Bearer <YOUR_TOKEN>; in oauth mode leave the header out and the client prompts you to sign in (the Cursor tab below shows where they go in Cursor; other HTTP-capable clients take the same URL and header)
IMPORTANT for Docker: mount a persistent volume on /data so the auto-generated .calame-secret survives restarts — otherwise every restart invalidates your saved tokens
MCP Clients
Cursor
Cursor → Settings → Features → MCP → Add MCP server
URL:
http://localhost:4567/mcp/<YOUR_PROFILE_NAME>Headers (token mode): Authorization: Bearer <YOUR_TOKEN>