
Raw SQL MCP
io.github.KifoPL由 GitHub 账号 KifoPL 发布v0.1.0更新于 Oct 24, 2026
Execute raw SQL queries against SQL Server, SQLite, PostgreSQL, MySQL, and MariaDB.
概览
一个本地 STDIO MCP 服务器,让助手对你配置的 SQL Server、SQLite、PostgreSQL、MySQL 和 MariaDB 数据库执行原始 SQL。
- 可以做什么
- 列出为服务器配置的数据库名称,并读取其架构元数据,让助手在查询前了解表和列。对选定的已配置数据库执行原始 SQL 语句。运行参数化查询和返回单个值的标量查询。数据库通过环境变量命名,因此可以同时暴露多个连接。
- 适用场景
- 适合在开发、调试或报表场景中,让助手检查架构并对你自己的数据库执行临时 SQL,且你愿意在每次执行前审查查询。
- 运行要求
- 作为 STDIO 本地进程运行,通过 dnx 从 RawSqlMcp NuGet 包启动,因此需要提供 dnx 的 .NET 工具链。每个数据库需要提供程序设置(sqlserver、sqlite、postgres、postgresql、mysql 或 mariadb)和连接字符串,通过 RawSqlMcpDatabasesDefaultProvider 和 RawSqlMcpDatabasesDefaultConnectionString 等环境变量提供。连接远程数据库服务器需要网络访问。可设置可选的命令超时。
安装
在 SourceWeft 中
- 打开 控制台中的 Raw SQL MCP,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
Raw SQL MCP
Raw SQL MCP is a STDIO MCP server for executing raw SQL against SQL Server, SQLite, PostgreSQL, MySQL, and MariaDB.
[!IMPORTANT] Use it carefully. The server does not protect you from destructive queries, expensive queries, SQL injection, missing pagination, or unsafe data exposure. Always review and approve queries before running them.
Installation
Run the server with dnx:
For a specific version:
Package: RawSqlMcp on NuGet
Configuration
Databases are configured with environment variables under RawSqlMcp__Databases__.
SQLite:
PostgreSQL:
MySQL/MariaDB:
SQL Server:
Optional command timeout, in seconds:
[!INFO] The legacy
RawSqlMcp__ConnectionStrings__Default="..."format is obsolete. It still works for compatibility and is interpreted as SQL Server.
Usage
Register the server in an MCP client as a STDIO server:
The server exposes tools for listing configured database names, reading schema metadata, and executing raw, parameterized, and scalar SQL queries.
来源:README.md,提交 41328c9
工具
0版本历史
1- v0.1.0最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分