runekaagaard/mcp-alchemy

A MCP (model context protocol) server that gives the LLM access to and knowledge about relational databases like SQLite, Postgresql, MySQL & MariaDB, Oracle, and MS-SQL.

What it solves

This project bridges the gap between AI assistants and structured data. It allows Claude Desktop to directly interact with various databases, enabling the AI to explore database schemas, write and validate SQL queries, and perform data analysis without requiring the user to manually export or copy-paste data.

How it works

It acts as an MCP (Model Context Protocol) server. By connecting to your database via SQLAlchemy, it exposes a set of tools to Claude Desktop. These tools allow the AI to list tables, inspect schema definitions (including relationships), and execute SQL queries. It includes optimized connection pooling for long-running sessions and can integrate with local file systems to handle large datasets that exceed the AI's immediate context window.

Who it’s for

This is for developers, data analysts, and power users who use Claude Desktop and want to perform natural language queries or analysis on their local or remote databases (PostgreSQL, MySQL, SQLite, Oracle, etc.) without leaving the chat interface.

Highlights

  • Supports a wide range of databases via SQLAlchemy, including PostgreSQL, MySQL, MariaDB, SQLite, Oracle, MS SQL Server, CrateDB, and Vertica.
  • Provides tools for schema discovery, table filtering, and secure SQL execution.
  • Includes smart output formatting for query results, such as vertical row display and ISO date handling.
  • Integrates with local file systems to allow the AI to process and analyze large datasets beyond its standard context window.
  • Offers flexible deployment options, including direct execution via uv or containerized deployment via Docker.

Related

  • Project
  • Project
  • Project
  • Project
  • Project