mcp-alchemy  by runekaagaard

LLM database integration server

Created 8 months ago
324 stars

Top 83.8% on SourcePulse

GitHubView on GitHub
Project Summary

This project provides an MCP (Model Context Protocol) server that enables LLMs, specifically Claude Desktop, to interact with relational databases. It allows users to explore database schemas, write and validate SQL queries, analyze data, and generate reports, acting as a database expert for the LLM.

How It Works

MCP Alchemy leverages SQLAlchemy for broad database compatibility, supporting PostgreSQL, MySQL, MariaDB, SQLite, Oracle, MS SQL Server, CrateDB, Vertica, and others. It integrates with Claude Desktop via a configuration file, launching the server using uvx and specifying the necessary database driver. The server exposes API tools for common database operations like listing tables, retrieving schema definitions, and executing SQL queries, with options for handling large datasets via claude-local-files.

Quick Start & Requirements

  • Install uv: curl -LsSf https://astral.sh/uv/install.sh | sh
  • Configure claude_desktop_config.json with the appropriate DB_URL and database driver (e.g., psycopg2-binary for PostgreSQL).
  • Official documentation and examples are available within the README.

Highlighted Details

  • Supports a wide range of SQL databases through SQLAlchemy.
  • Integrates with claude-local-files for handling large datasets beyond context window limits.
  • Provides API tools for schema exploration, query execution, and table filtering.
  • Features connection pooling optimized for long-running MCP servers with configurable parameters.
  • Offers smart truncation, clean NULL display, and ISO-formatted dates for query results.

Maintenance & Community

The project is actively maintained, with recent updates including PyPI packaging and usage instructions. Contributions are welcomed via issues and pull requests. The project is listed in several MCP directory sites, indicating community adoption.

Licensing & Compatibility

Licensed under the Mozilla Public License Version 2.0 (MPL 2.0). This license is generally permissive and allows for use in commercial and closed-source applications, provided modifications to the licensed code are shared under the same license.

Limitations & Caveats

The README mentions a potential temporary versioning error with uv after new releases, which can be resolved by restarting the MCP client. Some database drivers might require specific versions or additional setup.

Health Check
Last Commit

1 month ago

Responsiveness

1 day

Pull Requests (30d)
0
Issues (30d)
0
Star History
29 stars in the last 30 days

Explore Similar Projects

Starred by Elie Bursztein Elie Bursztein(Cybersecurity Lead at Google DeepMind), Michael Chiang Michael Chiang(Cofounder of Ollama), and
2 more.

enrichmcp by featureform

0.3%
611
ORM for AI agents
Created 5 months ago
Updated 1 week ago
Feedback? Help us improve.