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.4.3

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.4.3
File Size Uploaded Provenance Actions
fastmcp_sqltools-0.4.3.tar.gz 19.3 kB Without provenance Details for fastmcp_sqltools-0.4.3.tar.gz

Built distribution (wheel)

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

Total release size: 37.5 kB

Release files / fastmcp_sqltools-0.4.3.tar.gz

Download URL fastmcp_sqltools-0.4.3.tar.gz
Size 19.3 kB
Tags Source
SHA-256 checksum
How to use checksums
c5fb06718555fd345e6f956e5b26eda1ae891e2d11b5cf7541093eb62d2e77e8
BLAKE2b-256 checksum
How to use checksums
6ebe6a114b2b347ff6b82323867a2389f1c255f10891cd7d6b5d2c5f81c6428b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.6

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

Download URL fastmcp_sqltools-0.4.3-py3-none-any.whl
Size 18.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0475214e6930555ce8f1e3746752223997da23897ee9f41b52fba716aeb31e2b
BLAKE2b-256 checksum
How to use checksums
3bcf0491618b07a3e06f6a2fe3b262112e971d300ba60ea35ec3c843a50a2b8a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.6

Security for fastmcp-sqltools 0.4.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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