Talk with Your Database is an MCP server that enables AI clients to interact with relational databases using SQLAlchemy under the hood. Designed for developers, data engineers, and analysts, it connects AI environments directly to database instances including PostgreSQL, MySQL, MariaDB, and SQLite. Built on top of mcp-alchemy, the server facilitates natural language querying, schema inspection, and data retrieval through standardized Model Context Protocol tools. Users run the server locally via Python and uv, providing database credentials via standard connection strings. The setup allows an AI assistant like Claude Desktop to execute queries, inspect dummy data or production tables, and assist with debugging or reporting workflows without switching between separate database client interfaces. By leveraging SQLAlchemy connection drivers, the server ensures cross-database compatibility across multiple SQL dialects while allowing local control over database access credentials and connection parameters.
Category: Databases & Data Stores
Tags: mariadb, mysql, postgresql, SQL, sqlalchemy, sqlite
bash cp .env.example .env 2. If needed, spin up the local PostgreSQL database using Docker Compose: bash docker-compose up -d 3. Install the uv package manager if not present: bash curl -LsSf https://astral.sh/uv/install.sh | sh 4. Add the server entry to your Claude Desktop configuration file: json { "mcpServers": { "my_database": { "command": "uv", "args": [ "--directory", "/directory/where/this/app/is/located/app/", "run", "server.py" ], "env": { "DB_URL": "postgresql://postgres:password@localhost:5432/mydatabase" } } } } 5. Launch or restart Claude Desktop to initialize the connection.Part of MCP Servers
You configure Talk with Your Database by cloning its repository, setting up an environment file, and launching the server through the uv package manager. You configure Claude Desktop to call uv run server.py alongside the required DB_URL connection variable.
Because it relies on SQLAlchemy under the hood, it supports PostgreSQL, MySQL, MariaDB, and SQLite databases. You connect by supplying the appropriate connection string in the DB_URL environment variable inside your configuration.
The server is tested and documented for Claude Desktop, but it can connect to any client that complies with the standard Model Context Protocol and supports launching local command-line processes.
Yes, Talk with Your Database is an open source project available on GitHub under repository rhabraken/mcp-python, built on top of the open source mcp-alchemy project.