MCP Alchemy logo

MCP Alchemy

by runekaagaard

Connects Claude Desktop to SQLAlchemy-compatible databases for schema inspection, SQL execution, and large-result analysis.

Install MCP Alchemy

Pick your client, then add it in one click or paste the config.

STDIOPython
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "runekaagaard-mcp-alchemy": {
      "command": "uvx",
      "args": [
        "--from",
        "mcp-alchemy==2026.9.5.185701",
        "--refresh-package",
        "mcp-alchemy",
        "mcp-alchemy"
      ],
      "env": {
        "DB_URL": "YOUR_VALUE_HERE"
      }
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Values are written into the snippet above so you can paste it as is. They never leave your browser.

We couldn’t confirm it starts correctly

We ran the install command but it didn't respond within our test window — this can mean a slow first-time install rather than a real problem.

uvx --from mcp-alchemy==2026.9.5.185701 --refresh-package mcp-alchemy mcp-alchemy

No response to initialize.

This is an experimental automated check and can have false negatives — missing environment variables, a slow cold install, etc. It doesn’t necessarily mean something’s wrong. Last checked .

Overview

The runekaagaard/mcp-alchemy MCP server connects an MCP client to a database through SQLAlchemy and exposes tools for listing tables, inspecting schemas, and executing SQL. Configure a required DB_URL with a SQLAlchemy database URL, then provide the matching Python database driver when needed. It supports PostgreSQL, MySQL, MariaDB, SQLite, Oracle, Microsoft SQL Server, CrateDB, Vertica, and other SQLAlchemy-compatible databases. Reach for it when an agent needs to explore relational data, validate queries, or analyze results that may exceed its context window.

Use cases

  • Inspect relational database schemas
  • Find tables by name
  • Draft and validate SQL queries
  • Analyze large query results
  • Review foreign-key relationships

Key features

  • SQLAlchemy-compatible database access
  • Table and schema inspection
  • Foreign-key relationship discovery
  • Parameterized SQL execution
  • Configurable result truncation
  • Optional large-result file access

Tools4

What MCP Alchemy lets your agent do. Expand a tool for its parameters.

Self-reported~6 tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

37/37 checks healthy over the last 113d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 7d ago via OSV.dev · mcp-alchemy (PyPI)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars420Stargazers on the source repository.
Last commit1mo agoMost recent push to the default branch.
Install checkInconclusiveDidn't respond in our test window — often a slow first install.
Tools exposed4Callable tools this server registers over MCP.
Directory activity13 viewsConfig copies, upvotes, and views on AllMCPs.

How MCP Alchemy works

What runekaagaard/mcp-alchemy MCP server does

The runekaagaard/mcp-alchemy MCP server gives an MCP client access to a configured SQLAlchemy database. It is intended for database discovery and query-oriented analysis rather than application-specific business actions. An agent can find tables, inspect columns and relationships, and run SQL with optional parameters.

The actual database coverage depends on SQLAlchemy compatibility and the driver installed for the selected dialect.

How it works

The server reads a database connection URL from DB_URL and creates a SQLAlchemy engine. Database-specific drivers are supplied separately when launching the server; the examples use psycopg2-binary for PostgreSQL, pymysql for MySQL and MariaDB, pymssql for Microsoft SQL Server, oracledb for Oracle, sqlalchemy-cratedb for CrateDB, and vertica-python for Vertica.

Its discovery flow can begin with a complete table listing or a substring filter. Schema inspection accepts selected table names and reports columns, types, primary keys, nullability, and foreign-key relationships. Query execution returns rows in a vertical, readable format, formats dates as ISO values, displays NULL explicitly, and truncates output according to a configurable character limit.

The server uses a connection pool aimed at long-running MCP processes. Its documented defaults include connection liveness checks, one persistent connection, limited overflow capacity, one-hour connection recycling, and autocommit isolation. These engine settings can be changed with a JSON object in DB_ENGINE_OPTIONS.

Setup and configuration

Install uv, then launch the package with uvx or run the checked-out source with uv. A typical packaged configuration uses the mcp-alchemy package and ends with the mcp-alchemy executable. SQLite requires no additional driver in the documented example; other database types need the appropriate --with dependency.

Required configuration:

  • DB_URL: a SQLAlchemy database URL, including credentials and dialect details where applicable.

Optional configuration includes CLAUDE_LOCAL_FILES_PATH, EXECUTE_QUERY_MAX_CHARS, and DB_ENGINE_OPTIONS. The output limit defaults to 4000 characters. DB_ENGINE_OPTIONS must contain JSON representing SQLAlchemy engine options.

Tools and capabilities

The documented API provides these operations:

  • List every table in the database.
  • Filter table names using a search string.
  • Retrieve detailed definitions for selected tables.
  • Execute SQL with an optional parameter object.
  • Work with complete query results through the separate claude-local-files integration when its path is configured.

With that integration enabled, the runekaagaard/mcp-alchemy MCP server can make full result sets available outside the normal response window for reports, visualizations, and further analysis.

Limitations and notes

The server requires a valid SQLAlchemy connection URL and a compatible database driver. Credentials are typically part of that URL, so configuration should protect the resulting client settings. Large-query output is truncated unless the optional local-files workflow is configured. The README’s packaged examples pin version 2026.8.1.2602; cached package metadata may briefly cause version errors after a release, in which case restarting the MCP client is recommended.

The listed tool names in the README API are all_table_names, filter_table_names, schema_definitions, and execute_query; these correspond to the table-listing, filtering, schema, and query functions exposed by the server. The runekaagaard/mcp-alchemy MCP server does not document write-specific tools or database migration features, so it should be evaluated primarily for inspection and SQL execution use cases.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about MCP Alchemy

Install uv, then run the packaged server with uvx using the mcp-alchemy package. Configure DB_URL and add the database driver required by your SQLAlchemy dialect.

Yes. The README provides Claude Desktop configuration examples using uvx and the DB_URL environment variable.

The documented examples cover PostgreSQL, MySQL, MariaDB, SQLite, Oracle, Microsoft SQL Server, CrateDB, and Vertica. Other SQLAlchemy-compatible databases may also work with their drivers.

It truncates normal query output based on EXECUTE_QUERY_MAX_CHARS. When CLAUDE_LOCAL_FILES_PATH is configured with the separate claude-local-files integration, complete result sets can be accessed for reports and deeper analysis.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewMCP Alchemy AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/runekaagaard-mcp-alchemy?style=directory)](https://allmcps.com/mcp/runekaagaard-mcp-alchemy)
HTML Embed
<a href="https://allmcps.com/mcp/runekaagaard-mcp-alchemy"><img src="https://allmcps.com/api/badge/runekaagaard-mcp-alchemy?style=directory" alt="MCP Alchemy on AllMCPs" /></a>