Skip to main content

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/database or postgres://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.

Metadata

Release files for fastmcp-sqltools 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fastmcp-sqltools 0.3.0
File Size Uploaded
fastmcp_sqltools-0.3.0.tar.gz 19.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for fastmcp-sqltools 0.3.0
File Interpreter ABI Platform
fastmcp_sqltools-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 37.3 kB

Release files / fastmcp_sqltools-0.3.0.tar.gz

Download URL fastmcp_sqltools-0.3.0.tar.gz
Size 19.3 kB
Tags Source
SHA-256 checksum
How to use checksums
a67807ab01c1ad5a6e84413ebcc22f575be109fbe8f2cdfd4eba0610ce36501b
BLAKE2b-256 checksum
How to use checksums
086374b2f5e87f15aab78ed7273e464d3e5fa65c62b99ce12020fb6a4a75c8bd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.1

Release files / fastmcp_sqltools-0.3.0-py3-none-any.whl

Download URL fastmcp_sqltools-0.3.0-py3-none-any.whl
Size 18.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
37c6e0ebb884ebbe1e695c5f9c3ca80954276bb01d387e133280c7d6917d45c9
BLAKE2b-256 checksum
How to use checksums
7298a6604263e2408b87e0ddc85e184678dfb473e3412be2f2fc36801bb75b33
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.1

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 release files

0.2.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page