跳至主要內容
hs-sql-agent

Cursor · MCP

在 Cursor 裡使用受治理的 SQL tools。

讓 Cursor 透過 MCP 連到 hs-sql-agent,generated SQL 仍然經過 production 使用的 compiler、database scope、tool policy 與 audit boundary。

01

Schema discovery

透過 authenticated metadata tools 取得 schemas、tables、columns。

02

Compiled queries

Generated SELECT 先進 typed query runtime,之後才 execution。

03

Controlled mutations

DML 仍然可以被 Safe DML approval protocol gate 住。

Coding Assistance 與 Database Authority 分開

Cursor 可以產生並呼叫 SQL tool,但真正決定哪些 operation 能碰到 database 的仍然是 hs-sql-agent。Model context 不會自動變成 database authorization。

開發階段也使用正式的 Production Boundary

Developer client 可以直接沿用 MCP key scope、compiler、query policy、Safe DML 與 audit path,不需要為了方便另外開一條 unrestricted connection。