About whodb
WhoDB is a tool for database operations and data analysis, offering database queries and schema inspection through MCP tools or its CLI. It also provides platform workspace selection and a preview-and-confirm flow for writes.
Key features
- 01Run SQL queries and inspect results
- 02Browse database schemas, tables, and columns
- 03Manage connections and test connectivity
- 04Export tables or query results
- 05Select platform workspaces and preview writes
Use cases
- 01Explore the structure of a new database
- 02Query and aggregate data to answer questions
- 03Export tables or filtered query results
- 04Run platform operations in a selected workspace
MCP support
`whodb mcp serve` exposes platform tools; enabling the database module also allows direct MCP connections to databases. MCP tools support queries and schema inspection, while platform writes require a preview and approved confirmation.
Install
Copy the command and run it in a terminal.
npx skills add https:/ / github.com/ clidey/ whodb --skill whodbAfter installing, type/whodbin Claude Code to confirm it loaded.
Details
From the project READMEWhoDB Database Assistant
You have access to WhoDB for database operations. Use these tools and commands to help users with database tasks.
Platform MCP (default)
whodb mcp serve exposes hosted platform tools. Sign in to each required host with
whodb login --host <url>. Start with whodb_platform_hosts to discover saved
hosts and accounts, then whodb_platform_orgs with workspace: {host} and
whodb_platform_projects with workspace: {host, org}.
Resolve the intended target with whodb_platform_workspace_resolve. Pass an
explicit workspace: {host, org, project} on subsequent tools when working across
UAT, production, or projects. Targets apply to one call, including parallel calls,
and never change saved defaults. Check the returned scope. Do not run whodb use
to switch another session's defaults. Omitted targets use process overrides, then
saved defaults. Read whodb://platform/schema for operations and payloads.
Writes return a preview bound to its host, account, organization, and project.
Confirm only after approval of that exact preview. Changing defaults does not
redirect a pending confirmation. Ask for whodb login --host <url> when a host
needs authentication; no separate login is needed per project.
Guided setup
This skill is optional. WhoDB MCP supplies its own instructions, tool schemas,
and setup guidance. Prefer live MCP discovery if this skill differs from it.
Keep one entry: command whodb, args ["mcp", "serve"].
Use whodb_mcp_setup with action: "inspect" to discover settings, targets,
choices, and the settings schema. Ask the user what they want, then use
action: "preview" with a patch. Show the proposed settings and obtain approval
before action: "apply" with the returned confirmation_token and approved: true.
Do not send a patch with apply. Tokens expire after five minutes; only the latest
preview is valid. Restart MCP after changed settings, then use action: "verify".
Verification checks active settings. Omitted patch fields are preserved.
No shell access is required for this flow. Browser sign-in and credential entry
remain user actions; never request credentials in chat. If setup tools are
filtered out, ask the user to run whodb setup. CLI agents can alternatively use
whodb setup inspect, validate, apply --yes, and verify.
Inspect whodb://mcp/configuration for active modules and restrictions.
Platform calls target workspace; database calls target connection.
Database-only MCP
Enable the database module through whodb setup; both modules can run in the same whodb mcp serve connection. --database remains an advanced process override.
This connects directly to databases without a WhoDB platform server; databases
can be remote. The terminal UI is available with whodb --tui.
Database tools
When database-only MCP is configured, use these tools directly:
whodb_connections
List all available database connections.
No parameters required.
Returns: List of connection names with type and source (env/saved).
whodb_query
Execute SQL queries against a database.
Parameters:
- connection: Connection name (optional if only one connection exists)
- query: SQL query to execute
Example: whodb_query(connection="mydb", query="SELECT * FROM users LIMIT 10")
whodb_schemas
List all schemas in a database.
Parameters:
- connection: Connection name (optional if only one connection exists)
- include_tables: Set true to also return tables within each schema (optional)
Example: whodb_schemas(connection="mydb")
Example: whodb_schemas(connection="mydb", include_tables=true)
whodb_tables
List all tables in a schema.
Parameters:
- connection: Connection name (optional if only one connection exists)
- schema: Schema name (optional, uses default if not specified)
- include_columns: Set true to also return column details for every table (optional)
Example: whodb_tables(connection="mydb", schema="public")
Example: whodb_tables(connection="mydb", schema="public", include_columns=true)
whodb_columns
Describe columns in a table.
Parameters:
- connection: Connection name (optional if only one connection exists)
- table: Table name (required)
- schema: Schema name (optional)
Example: whodb_columns(connection="mydb", table="users")
CLI Commands (Fallback)
If MCP tools are unavailable, use the CLI directly via Bash:
Query Execution
whodb query "SELECT * FROM users LIMIT 10" --connection mydb --format json
Schema Discovery
# List schemas
whodb schemas --connection mydb --format json
# List tables
whodb tables --connection mydb --schema public --format json
# Describe columns
whodb columns --connection mydb --table users --format json
Connection Management
# List connections
whodb connections list --format json
# Test connection
whodb connections test mydb
# Add new connection (interactive)
whodb connections add --name mydb --type Postgres --host localhost --database mydb
Data Export
# Export to CSV
whodb export --connection mydb --table users --output users.csv
# Export query results
whodb export --connection mydb --query "SELECT * FROM orders" --output orders.xlsx
Workflow Examples
Explore a New Database (Efficient)
- List connections:
whodb_connections - Get tables with columns in one call:
whodb_tables(connection="name", include_columns=true) - Sample data:
whodb_query(connection="name", query="SELECT * FROM users LIMIT 5")
Query results include column_types alongside column names, so you know the data types without a separate call.
Explore a New Database (Multi-Schema)
- List connections:
whodb_connections - Get all schemas with tables:
whodb_schemas(connection="name", include_tables=true) - Get columns for the schema you care about:
whodb_tables(connection="name", schema="public", include_columns=true) - Query:
whodb_query(connection="name", query="SELECT * FROM users LIMIT 5")
Answer Data Questions
- Understand the schema first - check table structure
- Write targeted queries with appropriate filters
- Always use LIMIT for exploratory queries
- Present results in a clear, readable format
Best Practices
- Always explore schema first before writing queries
- Use LIMIT for exploratory queries to avoid overwhelming output
- Prefer specific columns over SELECT * for clarity
- Check foreign keys via whodb_columns to understand relationships
- Use JSON format (--format json) when parsing output programmatically
- Never expose credentials - use connection names, not connection strings