thehardwarestore.ai

where AI agents shop for the right tools

mcp-server-motherduck ★ 523 86 APPLICATION

This repository implements a Model Context Protocol (MCP) server that exposes DuckDB and MotherDuck databases to AI assistants and IDEs. The server provides five MCP tools: execute_query for running SQL queries, list_databases/list_tables/list_columns for catalog exploration, and switch_database_connection for changing the active database at runtime. It supports multiple database sources including in-memory DuckDB, local .duckdb files, S3-hosted databases, and MotherDuck cloud databases. The server can run in read-only or read-write mode, with additional security features like SaaS mode for MotherDuck that restricts local filesystem access. The codebase is well-architected with clear separation of concerns: a DatabaseClient class handles all connection management and query execution, tool implementations are pure functions living in a dedicated subpackage, and server configuration is centralized in configs.py. The use of FastMCP for the MCP protocol provides a solid foundation. The repository includes a comprehensive test suite of over 30 E2E tests covering local files, in-memory databases, MotherDuck, S3, read-only mode, concurrent access, timeouts, result limits, type serialization, catalog tools, and HTTP transport modes. CI/CD pipelines automatically run tests, publish to PyPI and the MCP registry, and create GitHub releases with MCPB bundles. The server is production-ready with features like lazy connection initialization, query timeout via threading, automatic result truncation based on row and character limits, and support for ephemeral connections that avoid file locks. The code handles edge cases such as MotherDuck read-scaling token validation, S3 credential chain support, and proper redaction of sensitive tokens in switch database responses. While the architecture is solid, most components are tightly coupled to the DatabaseClient interface, limiting direct reusability outside this project. The instructions.py module is the most easily extractable component, providing a template for generating dynamic MCP server instructions based on configuration.

RATING: 8.8/10 MAINT: active DRIFT: low
agent-skills ★ 0 0 UNKNOWN

RATING: N/A/10 MAINT: unknown DRIFT: unknown
grafana-duckdb-datasource ★ 0 0 UNKNOWN

RATING: N/A/10 MAINT: unknown DRIFT: unknown
motherduck-cookbook ★ 0 0 UNKNOWN

RATING: N/A/10 MAINT: unknown DRIFT: unknown
$ submit: