all_table_namesLABSCO SUMMARY
Schema discovery first, so the SQL it writes is against tables that actually exist.
Filtering the table names and reading the schema definitions lets the model map the database — foreign keys included — before it composes anything, which is the step that otherwise costs several failed queries. The query tool then runs whatever you give it, so the grants on the account in your connection string are the real boundary.
What it is
A server that connects to any SQLAlchemy-supported database through one connection string and exposes four tools: list the tables, filter them, read their schemas, and run a query.
What you get
- all_table_names — every table in the database, as a plain list
- filter_table_names — the tables matching a substring, for finding your way around a large schema
- schema_definitions — column names and types, primary keys, foreign-key relationships and nullable flags for the tables you name
- execute_query — any SQL you write, with optional bound parameters, returned row by row in a readable vertical layout
- Large result sets truncated sensibly, NULLs shown as NULL rather than blanks, and dates in ISO form
- Complete result sets beyond the context window when the companion local-files helper is configured, which is what makes a large export or a chart possible
Requirements
uv, a connection string in DB_URL, and the driver for your database installed alongside the server — psycopg2-binary for PostgreSQL, pymysql for MySQL and MariaDB, pymssql for SQL Server, with SQLite needing none. PostgreSQL, MySQL, MariaDB, SQLite, Oracle, SQL Server, CrateDB, Vertica and the other SQLAlchemy dialects all work. Setting CLAUDE_LOCAL_FILES_PATH is what turns on full result-set access. Mozilla Public License 2.0.
Setup effort
One command plus credentials — uvx --from mcp-alchemy==2026.8.1.2602 --refresh-package mcp-alchemy mcp-alchemy, then supply credentials
USE CASES
Getting oriented in a database with hundreds of tables
Filter the names down to the area you care about, then read those tables' schemas rather than the whole catalogue.
Writing a join you have not written before
The foreign-key relationships come back with the columns, so the join condition is read rather than guessed.
Answering a question about the data
Run the SQL with bound parameters and read the rows back in a layout that stays legible with wide tables.
Working with a result too big for the conversation
With the local-files helper configured, the full result set is available beyond what the context can hold.
4 tools
Listed in project docs. Your client may show a different list.
filter_table_namesschema_definitionsexecute_queryBEFORE YOU INSTALL
What to know first
Tools you get
4 tools named in the project's documentation.
Requires
- uvx on PATH
- DB_URL in your environment
Where it runs
The documented client runs the server on your machine.
INSTALLATION
Connect your client
Server setup
uvx --from mcp-alchemy==2026.8.1.2602 --refresh-package mcp-alchemy mcp-alchemyMCP Clients
Claude Desktop
{
"mcpServers": {
"my_postgres_db": {
"command": "uvx",
"args": [
"--from",
"mcp-alchemy==2026.8.1.2602",
"--with",
"psycopg2-binary",
"--refresh-package",
"mcp-alchemy",
"mcp-alchemy"
],
"env": {
"DB_URL": "postgresql://<YOUR_DB_USER>:<YOUR_DB_PASSWORD>@localhost/<YOUR_DB_NAME>"
}
}
}
}