What is USQLMCP?
USQLMCP is a universal SQL MCP (Model Context Protocol) server that enables AI assistants to execute SQL queries against a wide range of database systems. It leverages the usql library to support many databases (SQLite, PostgreSQL, MySQL, etc.) and exposes three tool calls (read_query, write_query, create_table) for read, write, and schema‑creation operations.
How to use USQLMCP?
Download the pre‑built binary for your platform from the Releases page and place it on your PATH, or run it via Docker. Then configure your MCP client (e.g., Cursor) to launch USQLMCP with a --dsn argument specifying the target database connection string. The server automatically provides the read_query, write_query, and create_table tools to the client.
Key features of USQLMCP
read_query tool for executing SELECT queries
write_query tool for INSERT, UPDATE, DELETE, ALTER
create_table tool for defining new tables
- Supports any database engine usable via usql (SQLite, PostgreSQL, MySQL, etc.)
- Runs over stdio transport; works with any MCP‑compatible client
- Single‑binary release or Docker image for easy deployment
Use cases of USQLMCP
- AI‑powered natural‑language querying of a live database
- Automated schema migrations via
create_table and write_query
- Read‑only data exploration for BI assistants
- Database administration tasks triggered from a chat interface
评论