Install
Install faz with pip, generate a config file, and verify the install works against your environment.
This page covers the standard install. If you want to track main or contribute, see Install from source. If you want the fastest path to a working AI-assistant query, jump to Quickstart — it includes install plus the full setup flow.
Prerequisites
- Python 3.10 or newer. Check with
python --version. faz uses async/await features and type-hint syntax that older Pythons don't have. - A database to point faz at. faz supports 14 — see Databases overview. For a first install, any local Postgres / MySQL / Mongo is fine.
- (Optional) an MCP-compatible AI client like Claude Desktop, Cursor, or Claude Code, if you plan to use faz as an MCP server. The REST API works without any client.
Install
Pick the method you use. The selection persists across the docs — every other page that shows a faz <cmd> example will follow it.
pip install faz-coreRun faz commands as faz <cmd> — for example, faz init, faz serve, faz mcp install. Use this for a project virtualenv or a global install you don't mind upgrading manually.
pipx install faz-coreRun faz commands as faz <cmd>. Recommended for a system-wide install — pipx keeps faz isolated in its own venv and always puts the faz command on your PATH.
uv pip install faz-coreRun faz commands as uv run faz <cmd> — for example, uv run faz init, uv run faz serve, uv run faz mcp install. The uv run prefix activates the project's environment.
faz pulls in 30+ database driver packages — all 14 connectors plus FastAPI, MCP, and DuckDB. Expect 30–90 seconds for a fresh install.
Configure
Generate a starter config in your current directory:
faz inituv run faz initpython -m faz initThis creates two things:
faz.yaml— your config. Heavily commented; edit it to match your environment..faz/— a runtime directory where the audit log lives (.faz/audit.jsonl).
The generated faz.yaml looks like this:
databases:
- name: postgres
type: postgresql
host: localhost
port: 5432
database: myapp
username: ${POSTGRES_USER} # ← env-var interpolation NOT yet implemented
password: ${POSTGRES_PASSWORD} # set the literal value or use docker secrets
permissions:
- database: postgres
access: R # baseline applies to every table
tables:
<audit-table>: W
<writable-table>: RW
safety:
max_rows_per_query: 5000
queries_per_minute: 60
query_timeout_seconds: 30
auto_block_sensitive: trueEdit faz.yaml:
- Replace the sample
databases:entry with your real connection details. Per-connector specifics — whathost,port,database, andextra:mean for each — are documented on the individual connector pages. - Set the
permissions:block to match your trust model. Start withaccess: Rand tighten or loosen per-table from there.
The full schema for every key, with every default value, is on faz.yaml.
${POSTGRES_PASSWORD} syntax is shown in the generated template, but environment-variable interpolation is not yet implemented. Either set the literal password in faz.yaml, or pre-export the value into your environment and use a wrapper that renders the file at deploy time. Patterns are on Secrets.
If you'd rather not edit YAML by hand, an interactive wizard walks you through one connection at a time:
faz add-databaseuv run faz add-databasepython -m faz add-databaseIt prompts for connection type, host, port, credentials, and writes the entry to faz.yaml.
Verify
Print the loaded permission policy. This confirms faz.yaml parses cleanly:
faz policyuv run faz policypython -m faz policyExpected output (for the default starter config):
<database>
baseline: R
overrides:
<audit-table> → W
<writable-table> → RW
safety:
auto_block_sensitive = True
max_rows_per_query = 5000
queries_per_minute = 60
query_timeout_seconds = 30If you see (no permissions loaded — check faz.yaml), your permissions: block didn't parse. Run faz init again or check Connection failed for parse-error messages.
To confirm faz can actually reach your database, start the REST server in one terminal:
faz serveuv run faz servepython -m faz serve…and in another terminal, hit the health endpoint:
curl http://localhost:8787/v1/healthA reachable database returns:
{ "status": "ok", "version": "0.1.0", "databases_connected": 1 }If databases_connected is 0, faz couldn't open the connection. The server logs the underlying error at startup; GET /v1/databases will show reachable: false with the error message for each failed connection.
Next steps
Quickstart
Install plus the full setup walkthrough — add a database, wire up Claude or Cursor, and run your first query.
Connect an AI assistant
Wire faz into Claude Desktop, Cursor, Claude Code, OpenClaw, or any MCP client.
How faz protects you
The five safety checks every query passes through, and what each one catches.