QueryDeck Docs
Security

Credentials and Keychain

Where QueryDeck stores database passwords, SSH secrets, and AI provider keys on macOS.

For: anyone connecting QueryDeck to a database, bastion host, or cloud AI provider.

QueryDeck keeps connection metadata and secrets separate. Hosts, ports, usernames, database names, and other non-secret connection settings can live in QueryDeck's local configuration. Passwords and API keys are stored in the macOS Keychain instead of plaintext config files.

Database passwords

Database passwords are stored in the macOS Keychain under the QueryDeck service identifier com.querydeck.app.

When you save a PostgreSQL or MySQL connection:

  • host, port, username, and database name are saved as connection metadata;
  • the password is written to Keychain;
  • opening the saved connection reads the password back from Keychain when needed.

Deleting a saved connection from QueryDeck also removes that connection's password from Keychain.

Credentials discovered from a project

The qdeck CLI can resolve connection values from supported ORM config files and .env files. That lets it open QueryDeck without making you copy and paste DATABASE_URL manually.

The detection summary redacts the password. QueryDeck's MCP tools also do not return connection passwords, SSH keys, or .env contents to the AI client. The model can receive schema and query results, but not the secret that was used to establish the connection.

See ORM detection for the supported project formats.

SSH passwords and key passphrases

SSH tunnel secrets follow the same model:

  • a bastion password can be stored in Keychain;
  • a passphrase for an encrypted private key can be saved in Keychain after the first prompt;
  • the private key itself stays at the file path you selected.

If you already use ssh-agent, QueryDeck can use the loaded key through the agent instead of storing a separate SSH password.

See SSH tunnels for setup and host-key verification.

AI provider API keys

OpenAI, Anthropic, and other cloud-provider API keys configured in QueryDeck are stored in the macOS Keychain. QueryDeck does not write those keys into notebooks, query history, or exported database content.

If you use a local provider such as Ollama, there may be no cloud API key at all. See AI providers and AI privacy for the full AI data path.

Touch ID is a gate, not secret storage

For sensitive connections, QueryDeck can require Touch ID before opening the connection:

  1. Edit the connection.
  2. Enable Require Touch ID to open.
  3. Save.

The password still lives in Keychain. Touch ID is an additional per-connection gate before QueryDeck uses the saved connection.

See Connections overview for the connection-safety workflow.

What QueryDeck does not send to MCP clients

The MCP server deliberately keeps secrets outside the tool surface. It does not return:

  • database passwords;
  • SSH passwords or private keys;
  • .env file contents;
  • AI provider API keys.

For the MCP-specific rules, read MCP safety.