SQL Safe MCP
Overview
Description from the maker (original English)
Minimal, read-only, PII-safe MCP server for SQL databases.
What you can do with it
We have not written a plain-language summary for this one yet. Below are the facts we read from the registry.
- Connection: Runs on your computer
- Transport: stdio
- Category: Databases & datasets
Install
Pick the AI app you use, then copy the settings.
Passed 2/2 checks · Runs on your computer
First: which AI do you use?
Pick your app and the steps appear below.
Works with Claude, with some setup first
Install Python (uv) on your computer first (one time) · Only the Claude desktop app (Windows or Mac), not the web or phone
Install Python (uv)
One time only; it works for every server that needs Python (uv)
Open the Claude desktop app’s settings file
SettingsDeveloperEdit Config
Paste these settings and save the file
{ "mcpServers": { "sql-safe": { "command": "uvx", "args": [ "sql-safe-mcp" ] } } }Quit Claude and open it again
Try it
Use SQL Safe MCP and tell me what you can do for me, then show me one thing✓ If Claude says it is using SQL Safe MCP or shows a SQL Safe MCP tool in the answer, you are connected
Menu names checked against Anthropic’s help page on Nov 11, 2026 · your screen may differ slightly by app version
ChatGPT cannot connect SQL Safe MCP yet
SQL Safe MCP runs on your computer, but ChatGPT can only connect servers that run on the web
What you can do instead
A · Use an app that can connect SQL Safe MCP
- Install Python (uv) on your computer first (one time) · Only the Claude desktop app (Windows or Mac), not the web or phone
- Install Python (uv) on your computer first (one time)
- Install Python (uv) on your computer first (one time)
- Install Python (uv) on your computer first (one time)
B · Others in Databases & datasets that work with ChatGPT
Picked from the most used in the same category, only ones that connect by address with no key
- Supabase✓ ChatGPT
- Appwrite MCP✓ ChatGPT
- Pg Aiguide✓ ChatGPT
Works with Claude Code, with some setup first
Install Python (uv) on your computer first (one time)
Install Python (uv)
One time only; it works for every server that needs Python (uv)
Open Terminal
Mac: press Command+Space and type Terminal · Windows: open PowerShell
Paste this command and press Enter
claude mcp add sql-safe -- uvx sql-safe-mcpType /mcp in Claude Code
You should see SQL Safe MCP listed as connected
Try it
Use SQL Safe MCP and tell me what you can do for me, then show me one thing✓ If Claude Code says it is using SQL Safe MCP or shows a SQL Safe MCP tool in the answer, you are connected
Menu names checked against Anthropic’s help page on Nov 11, 2026 · your screen may differ slightly by app version
Works with Cursor, with some setup first
Install Python (uv) on your computer first (one time)
Install Python (uv)
One time only; it works for every server that needs Python (uv)
Open the AI chat in Cursor in Agent mode
Try it
Use SQL Safe MCP and tell me what you can do for me, then show me one thing✓ If Cursor says it is using SQL Safe MCP or shows a SQL Safe MCP tool in the answer, you are connected
Menu names checked against Cursor’s help page on Nov 11, 2026 · your screen may differ slightly by app version
Works with VS Code, with some setup first
Install Python (uv) on your computer first (one time)
Install Python (uv)
One time only; it works for every server that needs Python (uv)
Open the AI chat in VS Code in Agent mode
Try it
Use SQL Safe MCP and tell me what you can do for me, then show me one thing✓ If VS Code says it is using SQL Safe MCP or shows a SQL Safe MCP tool in the answer, you are connected
Menu names checked against VS Code’s help page on Nov 11, 2026 · your screen may differ slightly by app version
Other apps that use MCP, such as Windsurf, Zed or Gemini CLI, each add servers differently. See how in the app list.
JSON settings are under “For developers” below
For developers: Terminal commands and JSON settings
Installed on your computer
Claude Code
claude mcp add sql-safe -- uvx sql-safe-mcpClaude Desktop (claude_desktop_config.json)
{
"mcpServers": {
"sql-safe": {
"command": "uvx",
"args": [
"sql-safe-mcp"
]
}
}
}Cursor (~/.cursor/mcp.json)
{
"mcpServers": {
"sql-safe": {
"command": "uvx",
"args": [
"sql-safe-mcp"
]
}
}
}VS Code (mcp.json)
{
"servers": {
"sql-safe": {
"type": "stdio",
"command": "uvx",
"args": [
"sql-safe-mcp"
]
}
}
}These settings are generated from the maker’s registry entry. If the README says otherwise, follow the README.
At a glance
Which apps can use it
Based on how this server connects and on each app’s own docs, checked Nov 10, 2026.
Run on your computer in
ClaudeGooseLM StudioMsty StudioCherry StudioCursorVS Code + GitHub CopilotVisual StudioWindsurf (Devin Desktop)ZedKiroClineContinueJetBrains AI AssistantClaude CodeCodex CLIGemini CLIOpenCodenodecodeWarpLibreChatRaycast
Related guides
What it can do
Runs on your computer; the tool list appears in your AI app after you install it.
Basic checksi
We check information anyone can see; we have not read the code. Checks that do not apply are left out of the count. · Checked Nov 11, 2026
- ✓ Pass
Maker matches the repo
The registry name was verified with the GitHub account proprock, which owns the repo
- ✓ Pass
Still maintained
Code last changed 3 days ago
- … Not checked yet
Has a licence
We have not read this repo from GitHub yet
- – Not applicable
Endpoint responds
This one runs on your computer; there is no internet endpoint
- – Not applicable
Sign-in with OAuth
Runs on your computer and uses local settings instead
- … Not checked yet
No hidden instructions in tool descriptions
Runs on your computer; we can only read tool lists from internet endpoints
Discussion
Ask, share a tip or report that it does not work. Sorted by what people marked helpful.
No posts yet. Be the first to ask or share.
Posts here are written by users, not the PopNx team.
User reviews
No reviews yet
Compared with others in Databases & datasetsi
- More stars than 0% of the other 1162 servers in this category
- Published to the registry more recently than 92% of the other 1162 servers in this category
- Basic checks equal to or better than 100% of the other 1162 servers in this category
Compared with every active server in this category in the registry. Stars count only when the publisher owns the repo.
Common questions
Is SQL Safe MCP safe?
It passed 2 of 2 applicable basic checks. We have not read the code. Before adding a key or token, see what access the server asks for and use a key with only the permissions you need.
What keys or codes does it need?
The registry does not list a required key, though some servers ask you to sign in on first use.
Does it run on my computer or in the cloud?
It runs on your computer. Your AI app starts it when needed, and data does not pass through the maker’s servers (unless it calls an online service itself).
Is it still maintained?
The GitHub repo last changed 3 days ago, and the latest version (2.0.0) reached the registry 3 days ago.
Which apps can use it?
Apps that support MCP, such as Claude Desktop, Claude Code, Cursor and VS Code. You also need Python (uv) on your computer.
What can I use instead?
In the same category: Dbx, MCP Toolbox for Databases, MCP Toolbox for Databases
Alternatives
Servers in the same category from other makers, sorted by stars.
Reading a card:↓ Downloads per weeki★ GitHub starsiThree pillars: reviews · checks · usageiUpdated = latest version published to the registryi
MCP Toolbox for Databases
MCP Toolbox for Databases enables your agent to connect to your database.
MCP Toolbox for Databases
MCP Toolbox for Databases enables your agent to connect to your database.
README from the maker
Open the README
Copied from the maker’s repo as written. PopNx MCP has not reviewed or endorsed it. HTML, images and scripts are removed. Links lead off this site.
sql-safe-mcp
A PII-safe, read-only MCP server for coding agents working with SQL Server, MySQL and MariaDB: schema knowledge and safe queries without write-capable tools or plaintext exposure of configured PII columns.
Read the data. Protect the identity.
Give a coding agent the schema knowledge it needs to write correct code - servers, databases, tables, columns, keys, indexes, and stored procedures. On aliases you mark all_pii_safe, it can also query real rows while configured personal data stays hidden behind authenticated tokens.
PII-safe by default. Read-only by design.
- PII-safe by default - on an
all_pii_safeserver, the columns you configure come back as alias-bound, authenticated tokens (pii:v1:...), never as plaintext. An agent can still project, count, and filter on them with=andINusing tokens it was given, so it can follow a record without reading it. Tokens do not work on another server alias or with another key. - Read-only by construction - seven tools, all annotated read-only. No tool writes data, and the server never executes SQL an agent wrote: metadata comes from SQLAlchemy Inspector and fixed catalog queries, and
execute_sqlruns only a validated, regeneratedSELECT. - Multiple servers, isolated policies - one MCP process can expose multiple named SQL Server, MySQL, and MariaDB instances. Each alias has its own connection, access level, and, when enabled, PII key and protection rules. Every database operation targets an explicit alias; there is no network discovery.
Operational safeguards
- Fails closed - SQL validation is an allowlist. Unknown syntax, unresolved lineage, and unsupported protected-value types are refused, not guessed at. The verification evidence is in the security model.
- Least access first -
access_level: metadata(the default) exposes database navigation and table structure;meta_and_codeadditionally exposes stored procedures;execute_sqlneeds an explicitall_pii_safealias with its own key. Database permissions stay the primary control, so use a least-privilege login. - Secrets stay out of sight - connection URLs live in YAML with
${NAME}placeholders resolved from the environment. They never appear in logs or model-visible errors. - Compact, predictable output - object-rooted results with stable sorting, literal case-insensitive name filters, and stored procedure lists that do not expand definitions.
- Errors an agent can act on - an ambiguous name lists the candidate schemas. Errors never contain connection details, credentials, keys, tokens, or rows.
- Tested against attacks, not just examples - the SQL and PII boundary is checked with an adversarial corpus of hostile statements, property-based tests (token isolation, tamper resistance), a live attack run against a really writable login with before/after snapshots, and mutation testing. Results are in Verification of the SQL boundary.
- Diagnosable failures - a timeout or connection error carries a
Reference, and the stderr log records the connection stage, elapsed time, and driver error for the same reference, with credentials removed. See Logging.
| Tool | Access | Purpose |
|---|---|---|
list_servers | 🟢 read | Configured server aliases |
list_databases | 🟢 read | Databases visible to the credentials |
list_tables | 🟢 read | Base tables, filtered by schema or name |
get_table_definition | 🟢 read | Columns, keys, constraints, and indexes of one table |
list_stored_procedures | 🟢 read | Stored procedures, without definitions; requires meta_and_code or all_pii_safe |
get_stored_procedure | 🟢 read | The definition of one stored procedure; requires meta_and_code or all_pii_safe |
execute_sql | 🟢 read | One restricted SELECT on an all_pii_safe server; protected columns return tokens |
[!NOTE]
Status: SQL Server supports every tool. MySQL and MariaDB (
engine: mysqlormariadb,
mysql+pymysqlURLs) support every tool too.schemais alwaysnullthere because the
database is the catalog, and
execute_sqlusesLIMITinstead ofTOP. See
Quick start
Install
uvx sql-safe-mcp
or
pip install sql-safe-mcp
Pin a version when you want a fixed surface: uvx sql-safe-mcp==1.5.2.
Requires Python 3.12–3.14, uv (or pip), and Microsoft ODBC Driver 18 for SQL Server when you connect to SQL Server. MySQL and MariaDB use the bundled PyMySQL driver and need nothing else.
Verified against SQL Server 2022, MySQL 8.4, and MariaDB 11.4 (see checks.md).
Or you can even ask an agent to install it
Install sql-safe-mcp as a stdio MCP server.
Ask whether to install it for this project/workspace or at user level. Then: detect and preserve the host's existing MCP config; configure the server to run via uvx sql-safe-mcp; create a YAML config template with env placeholders only; add SQL_SAFE_MCP_CONFIG; report the env variables the user must set. Do not store secrets or connection data in tracked files or output. Validate with sql-safe-mcp --check-config once variables are available.
Configure server
Copy sql-safe-mcp.example-simple.yaml to sql-safe-mcp.yaml. This smallest configuration exposes schema metadata from one SQL Server instance and does not allow row queries. Keep the complete connection URL in an environment variable:
version: 1
servers: reporting: engine: sqlserver access_level: metadata connection_url: "${REPORTING_SQL_URL}"
Here reporting is the value an agent passes as server. A missing variable, or an engine that does not match the URL dialect, stops the MCP server at startup. For multiple servers, local PII rules, shared PII rule sets, logging, and runtime limits, use the commented examples in the configuration reference.
Check the configuration
After defining every environment variable referenced by the YAML file, point the server at it with SQL_SAFE_MCP_CONFIG (or --config) and check it without connecting to any database:
SQL_SAFE_MCP_CONFIG=sql-safe-mcp.yaml uvx sql-safe-mcp --check-config
Configuration is validated at startup, and an error names the problem without printing a URL or secret. Keep credentials in the host's own configuration and never commit them. The server acts with the database account's permissions, so use a dedicated login with the least access the job needs.
Connect an MCP client
Every client configuration needs SQL_SAFE_MCP_CONFIG plus the environment variables referenced by your YAML file. Keep connection URLs and PII keys in the MCP host's environment or configuration, never in the YAML file or other tracked files.
Claude Code
claude mcp add --env SQL_SAFE_MCP_CONFIG=/path/to/sql-safe-mcp.yaml --env REPORTING_SQL_URL=mssql+pyodbc://... --transport stdio sql-safe -- uvx sql-safe-mcp
Put at least one other option between the last --env and the server name, as above. Otherwise, the CLI reads the name as another KEY=value pair.
Claude Desktop
Add the server to claude_desktop_config.json:
{
"mcpServers": { "sql-safe": { "command": "uvx", "args": ["sql-safe-mcp"], "env": { "SQL_SAFE_MCP_CONFIG": "/path/to/sql-safe-mcp.yaml", "REPORTING_SQL_URL": "mssql+pyodbc://..." } } } }
Codex CLI
codex mcp add sql-safe --env SQL_SAFE_MCP_CONFIG=/path/to/sql-safe-mcp.yaml --env REPORTING_SQL_URL=mssql+pyodbc://... -- uvx sql-safe-mcp
Any other stdio host
Use command uvx, argument sql-safe-mcp, and set SQL_SAFE_MCP_CONFIG plus every environment variable referenced by the configuration file. The server writes MCP messages to stdout and logs only to stderr.
PII-safe queries
execute_sql on the billing alias allows one restricted SELECT. For example, these arguments:
{
"server": "billing", "database": "Billing", "sql": "SELECT CustomerId, Email FROM dbo.Customers" }
can return a row such as [42, "pii:v1:..."]: the agent can follow the customer without reading the email address. A token is accepted only in = and IN predicates on the same server alias. If FirstName is protected, SELECT FirstName FROM Users WHERE FirstName = 'Alice' is rejected before it reaches the database. Filter protected columns only with authentic pii:v1:... tokens returned by execute_sql for the same alias; a matching prefix alone is not enough. Each token is authenticated and alias-bound, then validated and converted to a bound database value. Protection covers the columns you list, so list every column that holds personal data.
Documentation
- Configuration reference - aliases, connection URLs, PII rules, runtime limits, and logging.
- Tool reference - arguments, responses, errors, and the accepted SQL subset.
- Security model - trust boundaries, guarantees, limitations, and verification.
- Checks - local, integration, and security verification commands.
Security
The MCP caller, SQL input, database metadata, rows, and tokens are untrusted. Database permissions remain the primary authorization control - this server never widens them. Read the full security model, including its limitations and verification evidence. To report a vulnerability, use the private channel in SECURITY.md.
Contributing
Setup, checks, the test commands, the branch and commit conventions, and the release model are in CONTRIBUTING.md. Changes that affect someone running the server are recorded in CHANGELOG.md.
License
MIT.