Revision: 15/02/2025
DuckDB Command¶
The duckdb (or db) command group integrates with the DuckDB MCP server for SQL querying, federation, and database management.
Usage¶
Subcommands¶
serve¶
Start a DuckDB MCP server instance for external access.
Options:
--port <number>: Server port (default: 5432).--host <host>: Server host (default: 0.0.0.0).-f, --format <type>: Output format.
connect¶
Connect to an external DuckDB instance.
Options:
--url <url>: Required. DuckDB connection URL.--name <name>: Connection name (default:external).-f, --format <type>: Output format.
federate¶
Execute a federated SQL query across multiple DuckDB instances.
Arguments:
query: The SQL query to execute.
Options:
--sources <json>: Required. JSON array of data sources.-f, --format <type>: Output format.
expose¶
Expose a local DuckDB database file via the MCP protocol.
Options:
--database <path>: Database file path.--readonly: Expose as read-only.-f, --format <type>: Output format.
query¶
Execute a SQL query via the DuckDB MCP protocol.
Arguments:
query: The SQL query to execute.
Options:
--connection <name>: Connection name to use (default:default).-f, --format <type>: Output format.
status¶
Get the status of the DuckDB MCP server.
Options:
-f, --format <type>: Output format.