# mcp-encrypted-sqlite [Health: Active]

**Category:** 🗄️ Databases  
**Repository:** https://github.com/rosch100/mcp-encrypted-sqlite  
**GitHub Stars:** 0  
**Views:** 4  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/mcp-encrypted-sqlite

## Description
MCP server for encrypted SQLite databases (SQLCipher 4) - Works with MoneyMoney, KeePass and more

## Tools
Capabilities this server exposes over MCP:

- **list_tables** — List all tables in the database. By default only table names, with `include_columns=true` also column details.
- **get_table_data** — Read data from a table with optional filtering, column selection, and pagination.
- **execute_sql** — Execute arbitrary SQL statements (SELECT, INSERT, UPDATE, DELETE, DDL).
- **insert_or_update** — Perform UPSERT operations (INSERT or UPDATE on conflict).
- **delete_rows** — Delete rows from a table based on filters.
- **get_table_schema** — Retrieves detailed schema information for a table (columns, indexes, foreign keys, constraints).
- **list_indexes** — Lists all indexes of a table.

## Claude Desktop Quick Installation
No generated config for this server: it installs through its own setup steps.

The project's own setup steps (from https://github.com/rosch100/mcp-encrypted-sqlite), copied verbatim. Follow them in order; they are not an mcpServers config.

1. Install:

```sh
docker pull ghcr.io/rosch100/mcp-encrypted-sqlite:latest
```

2. Install:

```sh
git clone https://github.com/rosch100/mcp-encrypted-sqlite.git
```

3. Install:

```sh
./gradlew build installDist
```

4. Configure:

```sh
./store-key-in-keychain.sh --generate
```

5. Configure:

```sh
./encrypt-passphrase.sh "your-plain-passphrase"
```

6. Start the server:

```sh
./build/install/mcp-encrypted-sqlite/bin/mcp-encrypted-sqlite --args '{"db_path":"/path/to/db.sqlite","passphrase":"secret"}' 2>&1 | tee mcp-debug.log
```

## Documentation

## What mcp-encrypted-sqlite does

The mcp-encrypted-sqlite MCP server gives an MCP client access to SQLCipher 4 databases through database inspection and data-management tools. It can open a database using a file path and passphrase, enumerate its structure, read rows, and apply changes. The repository describes compatibility with encrypted databases from MoneyMoney, 1Password, Signal, WhatsApp, Firefox, Telegram, KeePass, and other applications that use SQLCipher.

Access requires the database passphrase. The server also supports passphrases encrypted with AES-256-GCM. On macOS, the encryption key can be loaded from Keychain when using the relevant setup. Docker containers cannot access the macOS Keychain, so Docker users must provide the encryption key through the container environment when using an encrypted passphrase.

## How it works

The server implements MCP over STDIO. An MCP client launches the executable or Docker command and passes startup arguments containing the database path and passphrase. The default cipher configuration targets SQLCipher 4, while an optional cipher profile can override values such as page size, KDF iterations, HMAC algorithm, and KDF algorithm.

The mcp-encrypted-sqlite MCP server validates SQL identifiers and input values such as limits and offsets. This validation applies to the server’s database operations, while `execute_sql` still accepts arbitrary SQL statements in normal read-write mode. Debug output can be enabled with the `MCP_DEBUG` environment variable.

## Setup and configuration

Running from source requires Java 21 or later and uses the included Gradle wrapper. Building with `./gradlew build installDist` produces an executable under `build/install/mcp-encrypted-sqlite/bin/`. The build obtains the encrypted SQLite JDBC driver from the referenced `sqlite-jdbc-crypt` release.

A prebuilt image is available at `ghcr.io/rosch100/mcp-encrypted-sqlite:latest`. For a local client configuration, set the MCP command to the installed executable and pass an `--args` JSON object containing `db_path` and `passphrase`. Cursor and Claude Desktop configuration paths are documented in the repository. Docker examples mount the database into the container, using read-only mode by default.

The `immutable` option opens the file with SQLite’s immutable URI mode. It is intended for reading a database that another application has locked exclusively. In that mode, write tools are omitted and `execute_sql` accepts read-only statements.

## Tools and capabilities

Available operations include:

- `list_tables` returns table names and can include column details.
- `get_table_data` reads selected rows with optional filters, chosen columns, and pagination.
- `execute_sql` runs SELECT, INSERT, UPDATE, DELETE, and DDL statements unless immutable mode restricts it to reads.
- `insert_or_update` performs an insert-or-update operation when a conflict occurs.
- `delete_rows` removes rows matching supplied filters.
- `get_table_schema` reports columns, indexes, foreign keys, and constraints for a table.
- `list_indexes` lists indexes belonging to a table.

These capabilities make the mcp-encrypted-sqlite MCP server suitable for inspecting application databases, querying stored records, and performing controlled CRUD or schema operations through an MCP client.

## Limitations and notes

The database passphrase is not optional for an encrypted file, and the server does not provide a way to recover it. Writing also depends on the database being opened in normal mode and on the mounted file having write access. Docker configurations shown in the repository mount files read-only unless that setting is changed.

Storing an encryption key and encrypted passphrase as plain text in client configuration creates a security risk. Custom cipher settings may be necessary for databases whose SQLCipher configuration differs from the defaults. The project requires the encrypted SQLite JDBC driver rather than a standard unencrypted SQLite driver.

_Full upstream README: https://allmcps.com/mcp/mcp-encrypted-sqlite/readme_

