Universal SQLAlchemy-based database integration supporting PostgreSQL, MySQL, MariaDB, SQLite, Oracle, MS SQL Server and many more databases. Features schema and relationship inspection, and large dataset analysis capabilities.
Current Status: Production-Ready and Battle-Tested
Latest Update: Now Available on PyPI! Please Report Any Issues.
Transform Claude into your personal database virtuoso! MCP Alchemy bridges the gap between Claude Desktop and your databases, empowering it to:
claude-local-files
for Unbounded Data Analysis: Seamlessly integrate with claude-local-files
to overcome context window limitations and analyze extremely large datasets.MCP Alchemy boasts compatibility with a wide array of databases, including:
Ensure you have uv
installed for optimal package management:
# Install uv if you haven't already curl -LsSf https://astral.sh/uv/install.sh | sh
Integrate MCP Alchemy into your claude_desktop_config.json
file. Remember to include the appropriate database driver using the --with
parameter.
{ "mcpServers": { "my_sqlite_db": { "command": "uvx", "args": ["--from", "mcp-alchemy==2025.04.09.091234", "mcp-alchemy"], "env": { "DB_URL": "sqlite:///path/to/database.db" } } } }
{ "mcpServers": { "my_postgres_db": { "command": "uvx", "args": ["--from", "mcp-alchemy==2025.04.09.091234", "--with", "psycopg2-binary", "mcp-alchemy"], "env": { "DB_URL": "postgresql://user:password@localhost/dbname" } } } }
{ "mcpServers": { "my_mysql_db": { "command": "uvx", "args": ["--from", "mcp-alchemy==2025.04.09.091234", "--with", "pymysql", "mcp-alchemy"], "env": { "DB_URL": "mysql+pymysql://user:password@localhost/dbname" } } } }
{ "mcpServers": { "my_mssql_db": { "command": "uvx", "args": ["--from", "mcp-alchemy==2025.04.09.091234", "--with", "pymssql", "mcp-alchemy"], "env": { "DB_URL": "mssql+pymssql://user:password@localhost/dbname" } } } }
{ "mcpServers": { "my_oracle_db": { "command": "uvx", "args": ["--from", "mcp-alchemy==2025.04.09.091234", "--with", "cx_oracle", "mcp-alchemy"], "env": { "DB_URL": "oracle+cx_oracle://user:password@localhost/dbname" } } } }
{ "mcpServers": { "my_cratedb": { "command": "uvx", "args": ["--from", "mcp-alchemy==2025.04.09.091234", "--with", "sqlalchemy-cratedb>=0.42.0.dev1", "mcp-alchemy"], "env": { "DB_URL": "crate://user:password@localhost:4200/?schema=testdrive" } } } }
For CrateDB Cloud connections, utilize a URL structure similar to: crate://user:[email protected]:4200?ssl=true
.
DB_URL
: The essential SQLAlchemy database URL defining your database connection.CLAUDE_LOCAL_FILES_PATH
: (Optional) Specifies the directory for storing full result sets, enabling analysis beyond Claude's context window.EXECUTE_QUERY_MAX_CHARS
: (Optional) Sets the maximum output length for query results (default: 4000 characters).all_table_names:
users, orders, products, categories
filter_table_names:
q
(string) - The substring to search for.Input: "user"
Returns: "users, user_roles, user_permissions"
schema_definitions:
table_names
(string[]) - An array of table names.users:
id: INTEGER, primary key, autoincrement
email: VARCHAR(255), nullable
created_at: DATETIME
Relationships:
id -> orders.user_id
execute_query:
query
(string): The SQL query to execute.params
(object, optional): Query parameters (if required).1. row
id: 123
name: John Doe
created_at: 2024-03-15T14:30:00
email: NULL
Result: 1 rows
claude-local-files
for accessing complete result sets.When integrated with claude-local-files:
The integration is automatically enabled when the CLAUDE_LOCAL_FILES_PATH
environment variable is set.
Your contributions are highly valued! We encourage you to:
Together, we can make database interaction with Claude even more powerful and intuitive.
๐ โ๏ธ Biomedical research server providing access to PubMed, ClinicalTrials.gov, and MyVariant.info.
๐ MCP server that provides SQL analysis, linting, and dialect conversion using [SQLGlot](https://github.com/tobymao/sqlglot)
๐ ๐ All-in-one MCP server for Postgres development and operations, with tools for performance analysis, tuning, and health checks
Supabase MCP Server with support for SQL query execution and database exploration tools