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.2.1.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.2.1-py3-none-any.whl (17.9 kB view details)

Uploaded Python 3

File details

Details for the file fastmcp_sqltools-0.2.1.tar.gz.

File metadata

  • Download URL: fastmcp_sqltools-0.2.1.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.2.1.tar.gz
Algorithm Hash digest
SHA256 0adf3b4b9b6de4fe07cdac469f002fbf40604e11cc88dd3c5205ad50b40cae59
MD5 efc30b4d67df5ef7458eac331f630424
BLAKE2b-256 12efb893254097e1bf89341aa66fc2fa4e9195284fbe882aab2a146edb066ce3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fastmcp_sqltools-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ae863ff1e7279dff7722ebcacc52f4eed7d136e9585701e22a3789160cf6dde9
MD5 e07875a4efe479cc6426f1e386997983
BLAKE2b-256 87c6ca7af42b3ea74e3aa11a0ec8d419117ef2838aec57cf8d40b38672ed3587

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