MCP Alchemy connects Claude Desktop to databases, enabling it to explore database structure, write SQL queries, display relationships, and analyze large datasets using SQLAlchemy-compatible databases. MCP Alchemy connects Claude Desktop
Status: Works great and is in daily use without any known bugs.
MCP Alchemy connects Claude Desktop to databases, enabling it to act as a database expert. It facilitates database exploration, SQL query writing and validation, relationship visualization, and large dataset analysis. It leverages claude-local-files for handling large datasets.
It supports PostgreSQL, MySQL, MariaDB, SQLite, Oracle, MS SQL Server, and other SQLAlchemy-compatible databases.
Provides tools like all_table_names
, filter_table_names
, schema_definitions
, and execute_query
for database interaction. The execute_query
tool returns results in a vertical format with features like smart truncation, NULL value display, and ISO formatted dates.
Configuration involves adding a database entry to claude_desktop_config.json
with connection details and environment variables like DB_URL
(required) and CLAUDE_LOCAL_FILES_PATH
(optional).
Requires cloning the repository, ensuring uv
is installed, and configuring the database in claude_desktop_config.json
.
Includes drivers for SQLite, MySQL/MariaDB (via pymysql
), and PostgreSQL (via psycopg2-binary
). Additional drivers for other databases can be installed using uv pip install
.
Integration with claude-local-files enables access to complete result sets, report generation, and deep analysis of large datasets when CLAUDE_LOCAL_FILES_PATH
is set.
Contributions are welcome through bug reports, feature requests, documentation improvements, and code contributions.
runekaagaard/mcp-alchemy
December 26, 2024
March 28, 2025
Python