Skip to main content
Glama
nethinwei

sql-mcp-server

by nethinwei

SQL MCP Server

The governed SQL gateway for untrusted AI agents.

面向不可信 AI Agent 的受控 SQL 数据访问网关。通过显式 Entity、关系代数 IR 和 参数化 codegen 访问 PostgreSQL、MySQL 与 OceanBase,不接受任意 SQL,不提供 DDL

核心差异

  • 确定性执行:Agent 只能组合受控工具和白名单 IR;

  • 字段与行治理:RBAC、字段 ACL、row policy 和 mask 统一强制;

  • 成本可控:EXPLAIN 预筛、结果上限、超时和 session/tenant 预算;

  • 默认拒绝:安全能力无法证明时 fail closed;

  • 可审计:配置热重载、异步审计和 OpenTelemetry hook。

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

Related MCP server: safedb-mcp

五分钟体验

只需 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.25.12+ 和一个已验证数据库版本

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

按角色阅读

首次体验与集成

部署与安全

开发与维护

版本与规划

许可

MIT

A
license - permissive license
-
quality - not tested
A
maintenance

Maintenance

Maintainers
Response time
0dRelease cycle
11Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    -
    quality
    A
    maintenance
    Secure SQL proxy for AI agents. Translates natural language to safe SQL via Claude, validates at the AST level (SELECT-only, no DDL/DML), enforces per-agent row-level security, and audit-logs every query.
    Last updated
    1
    MIT
  • A
    license
    A
    quality
    A
    maintenance
    Secure MCP server for safe, read-only DB access by AI agents, with SQL guardrails, table allowlists, PII masking, and audit logs
    Last updated
    6
    93
    7
    MIT
  • A
    license
    A
    quality
    A
    maintenance
    A governed SQL gateway that exposes typed tools to AI agents, compiling safe read-only queries from a semantic layer while blocking PII before execution, supporting SQL Server, Postgres, and SQLite.
    Last updated
    9
    MIT
  • F
    license
    -
    quality
    C
    maintenance
    An AI-to-DB secure gateway that enables AI assistants like Claude Code to interact with MySQL databases through controlled, auditable operations with permission modes and AST-level validation.
    Last updated
    3

View all related MCP servers

Related MCP Connectors

  • The grounded data layer for any LLM: governed SQL, metrics, lineage and catalog over your data.

  • Query PostgreSQL databases in plain English — LLM-generated, safety-validated SQL.

  • Enterprise AI Control Plane: governance, guardrails, spend tracking, compliance & smart routing.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/nethinwei/sql-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server