Loading...

MCP server for DuckDB, enabling SQL queries and database interactions via LLMs; supports read-only mode for safety and single connection reuse for performance.
Boost this tool
Subscribe to listing upgrades or segmented pushes.
MCP server for DuckDB, enabling SQL queries and database interactions via LLMs; supports read-only mode for safety and single connection reuse for performance.
The server is relatively safe when running in read-only mode, as it prevents any write operations. However, when running with write access enabled, the risk increases significantly due to the ability to execute arbitrary SQL queries, potentially leading to data modification or deletion. Proper input validation and access control mechanisms are crucial for mitigating these risks.
Performance depends on the complexity of the SQL queries and the size of the DuckDB database. Using a single connection (--keep-connection) can improve performance but may lead to locking issues.
No direct cost, as DuckDB is a free and open-source database. However, complex queries may consume significant CPU and memory resources.
npx -y @smithery/cli install mcp-server-duckdb --client claude{
"mcpServers": {
"duckdb": {
"command": "uvx",
"args": [
"mcp-server-duckdb",
"--db-path",
"~/mcp-server-duckdb/data/data.db"
]
}
}
}queryExecutes an arbitrary SQL query against the DuckDB database.
Allows execution of arbitrary SQL, potentially leading to data modification or information disclosure.
None
local
The server is relatively safe when running in read-only mode, as it prevents any write operations. However, when running with write access enabled, the risk increases significantly due to the ability to execute arbitrary SQL queries, potentially leading to data modification or deletion. Proper input validation and access control mechanisms are crucial for mitigating these risks.
Autonomy is highly dependent on the configuration. Read-only mode significantly restricts autonomy, while write-enabled mode grants full access to the database. Exercise caution when granting write access to LLMs.
Production Tip
Always run the server in read-only mode in production environments unless write access is absolutely necessary. Implement robust input validation and access controls to mitigate risks.
Use the `--readonly` flag when starting the server.
Yes, but be mindful of potential concurrency issues and resource limitations.
Implement robust input validation and sanitization techniques in your LLM application.
If `--readonly` is not specified, the server will automatically create the database file and parent directories if they don't exist. If `--readonly` is specified and the database file doesn't exist, the server will fail to start with an error.
Use the `--db-path` parameter when starting the server.
You can execute any valid DuckDB SQL statement.
Use the MCP Inspector for detailed request/response logging and debugging.