Newsletter
Join the Community
Subscribe to our newsletter for the latest news and updates
MCP Alchemy connects LLMs to relational databases, enabling exploration, SQL assistance, and data analysis via Claude Desktop.
GitHub MCP Server enables advanced automation and interaction capabilities for developers and tools using Model Context Protocol.
Status: Works great and is in daily use without any known bugs.
Let Claude be your database expert! MCP Alchemy connects Claude Desktop directly to your databases, allowing it to:
Works with PostgreSQL, MySQL, MariaDB, SQLite, Oracle, MS SQL Server and a host of other SQLAlchemy-compatible databases.
all_table_names
filter_table_names
q
(string)schema_definitions
table_names
(string[])execute_query
query
(string): SQL queryparams
(object, optional): Query parametersAdd to your claude_desktop_config.json
:
{
"mcpServers": {
"my_database": {
"command": "uvx",
"args": ["--from", "git+https://github.com/runekaagaard/mcp-alchemy", "mcp-alchemy"],
"env": {
"DB_URL": "mysql+pymysql://root:secret@localhost/databasename",
}
}
}
}
Environment Variables:
DB_URL
: SQLAlchemy database URL (required)
Examples:
postgresql://user:password@localhost/dbname
mysql+pymysql://user:password@localhost/dbname
mariadb+pymysql://user:password@localhost/dbname
sqlite:///path/to/database.db
CLAUDE_LOCAL_FILES_PATH
: Directory for full result sets (optional)EXECUTE_QUERY_MAX_CHARS
: Maximum output length (optional, default 4000)Clone repository:
git clone https://github.com/runekaagaard/mcp-alchemy.git
Ensure you have uv
# Install uv if you haven't already
curl -LsSf https://astral.sh/uv/install.sh | sh
Add database to claude_desktop_config.json (see above)
The following database drivers are included by default:
pymysql
psycopg2-binary
To use other databases supported by SQLAlchemy, install the appropriate driver:
# Microsoft SQL Server
uv pip install pymssql
# Oracle
uv pip install cx_oracle
# Other databases
# See: https://docs.sqlalchemy.org/en/20/dialects/
When claude-local-files is configured:
The integration automatically activates when CLAUDE_LOCAL_FILES_PATH
is set.
Contributions are warmly welcomed! Whether it's bug reports, feature requests, documentation improvements, or code contributions - all input is valuable. Feel free to:
The goal is to make database interaction with Claude even better, and your insights and contributions help achieve that.
Mozilla Public License Version 2.0