![The SQL console on a SQLite database: the schema list on the left, a SELECT query in the editor, timing and row count, export buttons for CSV, TSV, JSON, JSONL and Markdown, and the result rows with NULLs shown in grey.](/assets/devops-sql-console.svg)

*Illustrative mock-up with made-up data, not a screenshot.*

## Features

- Connect to a database file on a remote machine
- Run SQL queries
- Save and recall queries
- Query history, per connection
- Audit log of queries
- Browse tables and columns
- View a table's DDL
- Export results as CSV, TSV, JSON, JSONL or Markdown

## For AI agents (MCP)

Connect Claude or another MCP client to Levirge DevOps and the agent can work with this plugin directly.

- `find_connection` finds the right connection by name or type.
- `get_sql_schema` returns tables and columns. The schema is also offered as an MCP resource, so clients can cache it.
- `run_query` runs SQL and pages through large results. Reads work for every role; writes need a role that allows them, and the reply flags any statement that changed data.
- `list_saved_queries` returns your saved queries, ready to run.
- `get_audit_log` reads the audit log, for admins and owners.
- Changes an agent makes are recorded in the audit log as assistant actions.

## Capabilities

- Connects to SQLite files on the machine where devops-client runs.
- WAL-mode databases are supported.
- Each database file is its own connection in the sidebar.
- Blob values are shown as `0x…` hex strings.

## Limits

- The user devops-client runs as must be able to read the database file.
- One statement per query: multi-statement SQL returns an error.
- Exports cover the rows already fetched, so add a `LIMIT` for large tables.
- Files over 2 GB can be slow on unindexed full-table scans.
- Databases held under an exclusive lock may show stale reads during concurrent writes.
