FastMCP SQL server with support for PostgreSQL, MySQL, and SQLite
Project description
FastMCP SQL Tools
mcp-name: io.github.atarkowska/fastmcp-sqltools
A Model Context Protocol (MCP) server built with FastMCP that provides SQL database access with support for PostgreSQL, MySQL, and SQLite.
Features
- list_tables: List all tables in the database
- get_table_schema: Get detailed schema information for a table including columns, types, constraints, and indexes
- execute_query: Execute any SQL query (INSERT, UPDATE, DELETE, DDL, etc.)
- execute_safe_query: Execute read-only SELECT queries with additional safety checks
Supported Databases
- PostgreSQL: Full support via asyncpg
- MySQL: Full support via aiomysql
- SQLite: Full support via aiosqlite
The server automatically detects the database type from the DATABASE_URL environment variable.
Configuration
Add the following to your claude_desktop_config.json:
{
"mcpServers": {
"sql-mcp-tools": {
"command": "uvx",
"args": [
"fastmcp-sqltools"
],
"env": {
"DATABASE_URL": "<your-database-url>"
}
}
}
}
Database URL Format
The DATABASE_URL should be in one of the following formats:
- PostgreSQL:
postgresql://user:password@host:port/databaseorpostgres://user:password@host:port/database - MySQL:
mysql://user:password@host:port/database - SQLite:
sqlite:///path/to/database.db(use three slashes for absolute path)
## License
This project is licensed under the GNU Affero General Public License v3.0 (AGPL-3.0).
See the LICENSE file for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fastmcp_sqltools-0.3.0.tar.gz.
File metadata
- Download URL: fastmcp_sqltools-0.3.0.tar.gz
- Upload date:
- Size: 19.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a67807ab01c1ad5a6e84413ebcc22f575be109fbe8f2cdfd4eba0610ce36501b
|
|
| MD5 |
8d0024518cce8f0fc5903858bb68b601
|
|
| BLAKE2b-256 |
086374b2f5e87f15aab78ed7273e464d3e5fa65c62b99ce12020fb6a4a75c8bd
|
File details
Details for the file fastmcp_sqltools-0.3.0-py3-none-any.whl.
File metadata
- Download URL: fastmcp_sqltools-0.3.0-py3-none-any.whl
- Upload date:
- Size: 18.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
37c6e0ebb884ebbe1e695c5f9c3ca80954276bb01d387e133280c7d6917d45c9
|
|
| MD5 |
d0e07928c3fdcc012944dbd190f85991
|
|
| BLAKE2b-256 |
7298a6604263e2408b87e0ddc85e184678dfb473e3412be2f2fc36801bb75b33
|