Skip to main content

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fastmcp_sqltools-0.3.0.tar.gz (19.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fastmcp_sqltools-0.3.0-py3-none-any.whl (18.0 kB view details)

Uploaded Python 3

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

Hashes for fastmcp_sqltools-0.3.0.tar.gz
Algorithm Hash digest
SHA256 a67807ab01c1ad5a6e84413ebcc22f575be109fbe8f2cdfd4eba0610ce36501b
MD5 8d0024518cce8f0fc5903858bb68b601
BLAKE2b-256 086374b2f5e87f15aab78ed7273e464d3e5fa65c62b99ce12020fb6a4a75c8bd

See more details on using hashes here.

File details

Details for the file fastmcp_sqltools-0.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for fastmcp_sqltools-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 37c6e0ebb884ebbe1e695c5f9c3ca80954276bb01d387e133280c7d6917d45c9
MD5 d0e07928c3fdcc012944dbd190f85991
BLAKE2b-256 7298a6604263e2408b87e0ddc85e184678dfb473e3412be2f2fc36801bb75b33

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page