Fastmcp Sqltools

io.github.atarkowska由 GitHub 帳號 atarkowska 發布v0.3.0更新於 Oct 27, 2026

A MCP server provides SQL database access with support for PostgreSQL, MySQL, and SQLite.

已驗證STDIO僅桌面資料庫

概覽

AI 產生的概覽

本機 MCP 伺服器,讓助理存取 PostgreSQL、MySQL 與 SQLite 資料庫:列出資料表、檢視結構並執行 SQL 查詢。

可以做什麼
  • 列出資料庫中的所有資料表
  • 檢視資料表的欄位、型別、限制與索引等結構資訊
  • 執行任意 SQL,包括 INSERT、UPDATE、DELETE 與 DDL
  • 執行具備額外安全檢查的唯讀 SELECT 查詢
適用情境
適合讓助理探索與查詢既有的關聯式資料庫,例如查看資料表結構、撰寫 SELECT 語句,或刻意修改資料,而不必自行開發整合。
執行需求
以本機 Python 套件(fastmcp-sqltools,通常以 uvx 啟動)透過 stdio 執行。需設定 DATABASE_URL 環境變數,格式為 PostgreSQL、MySQL 或 SQLite 連線字串,資料庫類型會由此自動辨識。PostgreSQL 與 MySQL 需要能連線到資料庫主機的網路。
安裝前請注意
DATABASE_URL 通常包含資料庫帳號密碼,應視為機密。execute_query 可執行 INSERT、UPDATE、DELETE 與 DDL,助理可能修改或刪除資料;唯讀情境請改用 execute_safe_query,並使用權限最小的資料庫帳號。查詢內容與資料表結構會傳送給模型供應商。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Fastmcp Sqltools,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

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:

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.

來源:README.md,提交 1afc2bd

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.3.0最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分