Skip to content
MCP server
Registry

SQL MCP Server

Controlled SQL access gateway with policy, cost limits, tenant isolation, and safe tools.

SQL MCP Server scores 37 (Limited), licensed MIT and written in Go. It installs as a local process. It does not declare tools yet. Filed under Databases. GitHub shows 1 stars. Install configs are generated for 10 clients. Being listed in the registry is not the same as being vendor-official.

by nethinweiMITGo1 stars
Trust score
37Limited
Trust score 37 of 100, Limited

Limited trust

37 of 100 from six public signals. Nobody can buy a point.

  • OSI-style license: mit.
How we score trust
Scorecard

License, quality and maintenance

How grades work
Trust breakdown

Where the 37 comes from

0 + 15 + 1 + 10 + 4 + 7 = 37. Each factor is capped, so no single signal can carry a listing.

Registry0 / 30

Active in the official MCP registry, plus a known vendor namespace.

Registry: 0 of 30 points.
Maintenance15 / 20

How recently the repository saw a commit or release.

Maintenance: 15 of 20 points.
Popularity1 / 20

GitHub stars and weekly downloads, on a log scale.

Popularity: 1 of 20 points.
License10 / 10

A clear, OSI-style open-source license.

License: 10 of 10 points.
Security4 / 10

Not archived, a secure install path, a pinned version.

Security: 4 of 10 points.
Docs7 / 10

A real summary, a README with depth, listed tools.

Docs: 7 of 10 points.

Install

Pick your client, copy the config, paste it in.

Needs Cursor or VS Code installed on this device. The button opens the app and asks you to confirm before it adds the server.

~/Library/Application Support/Claude/claude_desktop_config.json
{  "mcpServers": {    "nethinwei-sql-mcp-server": {      "command": "docker",      "args": [        "run",        "-i",        "--rm",        "ghcr.io/nethinwei/sql-mcp-server:0.1.21"      ],      "env": {        "DATABASE_DSN": "YOUR_DATABASE_DSN"      }    }  }}

Environment variables

NameRequiredNotes
DATABASE_DSNSecretOptionalDatabase DSN referenced by ${DATABASE_DSN} in config.yaml

Tools show up when the registry metadata or the repository README lists them. Public READMEs are read directly. A GitHub token is used only when one is already configured.

About

SQL MCP Server

The governed SQL gateway for untrusted AI agents.

面向不可信 AI Agent 的受控 SQL 数据访问网关。通过显式 Entity、关系代数 IR 和 参数化 codegen 访问 PostgreSQL、MySQL 与 OceanBase,受治理面不接受任意 SQL,不提供 DDL。可信操作者另有独立的 SQL 逃生通道 execute_sql:默认关闭,只对被显式授予 sql:execute@<数据源> 的用户可见,走单独声明的连接,受硬上限与写入失败即拒绝的 审计约束(见安全模型)。

核心差异

  • 确定性执行:Agent 只能组合受控工具和白名单 IR;
  • 字段与行治理:RBAC、字段 ACL、row policy 和 mask 统一强制;
  • 成本可控:EXPLAIN 预筛、结果上限、超时和 session/tenant 预算;
  • 默认拒绝:安全能力无法证明时 fail closed;
  • 可审计:配置热重载、异步审计和 OpenTelemetry hook。

运行时安全行为以安全模型为准;Provider 验证边界与证据层级 以兼容矩阵为准;威胁、控制与剩余风险见 威胁模型。所有对外声明的证据汇总见 架构、安全边界与证据索引。不以本页摘要为准。

五分钟体验

只需 Docker 与 Docker Compose:

docker compose -f examples/quickstart/compose.yaml up -d --wait
curl -fsS http://127.0.0.1:8080/healthz

完整的 MCP Inspector 调用、tenant 隔离、mask 和拒绝场景见 五分钟快速体验。

安装与接入

源码构建要求 Go 1.26.10+ 和一个已验证数据库版本:

git clone https://github.com/nethinwei/sql-mcp-server.git
cd sql-mcp-server
make build

按角色阅读

首次体验与集成

部署与安全

开发与维护

版本与规划

许可

MIT

Frequently asked questions

What is SQL MCP Server?

Controlled SQL access gateway with policy, cost limits, tenant isolation, and safe tools.

How do I install SQL MCP Server in Claude Desktop, Cursor, or VS Code?

Pick your client in the Install section on this page and copy the generated config into the client's config file. Step-by-step guides: Claude Desktop, Cursor, and VS Code. SQL MCP Server runs locally from the Docker image ghcr.io/nethinwei/sql-mcp-server:0.1.21 with the command docker run -i --rm ghcr.io/nethinwei/sql-mcp-server:0.1.21.

Is SQL MCP Server free and open source?

Yes. SQL MCP Server is released under the MIT license, an OSI-approved open-source license, so you can use, modify, and self-host it under those terms.

Does SQL MCP Server support remote (HTTP) connections?

No remote endpoint is listed for SQL MCP Server. It runs locally on your machine over stdio, started by your MCP client.

How is SQL MCP Server's trust score calculated?

SQL MCP Server scores 37 out of 100 (Limited). The score adds six capped public signals: registry status, maintenance, popularity, license, documentation, and security. Nobody can pay for points. Read the methodology for the full formula.

Reviews

No reviews yet

—Be the first to review

5 star0 reviews at 5 stars
4 star0 reviews at 4 stars
3 star0 reviews at 3 stars
2 star0 reviews at 2 stars
1 star0 reviews at 1 stars

No published reviews yet. Used it? Tell the next person how it went.

Add badge to your README

Paste either snippet into the repository README. The image links to this listing.

Listed on MCPpedia

Top 5 MCP servers

Daily or weekly. Confirm by email, unsubscribe any time.

How often

Manage this listing

Claim this server