
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.
概览
本地 MCP 服务器,让助手访问 PostgreSQL、MySQL 和 SQLite 数据库:列出表、查看结构并执行 SQL 查询。
- 可以做什么
- 列出数据库中的所有表
- 查看表的列、类型、约束和索引等结构信息
- 执行任意 SQL,包括 INSERT、UPDATE、DELETE 和 DDL
- 执行带额外安全检查的只读 SELECT 查询
- 适用场景
- 适合让助手探索和查询已有的关系型数据库,例如查看表结构、编写 SELECT 语句,或有意识地修改数据,而无需自行开发集成。
- 运行要求
- 以本地 Python 包(fastmcp-sqltools,通常用 uvx 启动)通过 stdio 运行。需要设置 DATABASE_URL 环境变量,格式为 PostgreSQL、MySQL 或 SQLite 连接串,数据库类型由此自动识别。PostgreSQL 和 MySQL 需要能访问数据库主机的网络。
安装
在 SourceWeft 中
- 打开 控制台中的 Fastmcp Sqltools,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
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:
Database URL Format
The DATABASE_URL should be in one of the following formats:
- PostgreSQL:
postgresql://user:password@host:port/databaseorpostgres://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版本历史
1- v0.3.0最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分