runekaagaard/mcp-alchemy logo

runekaagaard/mcp-alchemy

Free

通用 SQLAlchemy 数据库集成,支持 PG, MySQL, MariaDB, SQLite, Oracle, MS SQL Server 等。含模式/关系检查和大数据集分析能力。

FreeFree tier
Type
Open Source

About runekaagaard/mcp-alchemy

MCP Alchemy is an open-source Model Context Protocol (MCP) server that connects LLMs like Claude to relational databases via SQLAlchemy. It enables natural-language database exploration, schema inspection, SQL query generation and validation, table relationship visualization, and large dataset analysis. Supports PostgreSQL, MySQL, MariaDB, SQLite, Oracle, MS SQL Server, CrateDB, Vertica, and other SQLAlchemy-compatible databases. Designed for use with Claude Desktop, it provides a seamless way to turn an LLM into a database expert with minimal setup.

Key Features

Natural-language exploration and understanding of database structure
Assistance in writing and validating SQL queries
Visualization of relationships between tables
Analysis of large datasets and creation of reports
Support for PostgreSQL, MySQL, MariaDB, SQLite, Oracle, MS SQL Server, CrateDB, Vertica, and other SQLAlchemy-compatible databases
Integration with Claude Desktop via the Model Context Protocol
Uses SQLAlchemy for broad database compatibility
Easy installation with uv and pip (PyPI package available)

Pros & Cons

Pros
  • Open source and free to use
  • Supports a wide range of relational databases through SQLAlchemy
  • Seamless integration with Claude Desktop
  • Active maintenance with no known bugs
  • Allows natural language interaction with databases
  • Configurable with environment variables for secure credentials
Cons
  • Requires uv for installation (not pip by default)
  • Dependent on the MCP client ecosystem (e.g., Claude Desktop)
  • Cache clearing issue can cause versioning errors on updates (up to 600s)
  • Requires manual configuration of database driver in the command arguments

Best For

Database schema exploration and documentationSQL query generation and validationLarge dataset analysis and reportingAutomated database interactions via LLM assistantsEducational tool for learning database structures and queries

FAQ

What databases are supported?
MCP Alchemy supports PostgreSQL, MySQL, MariaDB, SQLite, Oracle, MS SQL Server, CrateDB, Vertica, and any other SQLAlchemy-compatible database.
How do I install and configure MCP Alchemy?
Install using uv with the appropriate database driver (e.g., psycopg2-binary for PostgreSQL, pymysql for MySQL). Configure by adding an entry to claude_desktop_config.json with the command 'uvx mcp-alchemy' and the DB_URL environment variable.
How does it work with Claude Desktop?
After configuration, Claude Desktop connects to the specified database via the MCP protocol. Users can then ask Claude questions about the database, request SQL queries, explore schemas, and analyze data.
Is there a caching issue after updates?
Yes, after a new version release, locally cached packages may cause a versioning error for up to 600 seconds. Restarting the MCP client resolves the error.