# sql-safe MCP server

> Provides coding agents with read-only SQL schema knowledge and PII-safe query capabilities for SQL Server, MySQL, and MariaDB.

- Repository: https://github.com/proprock/sql-mini-mcp
- Page: https://hostedmcp.org/servers/proprock/sql-mini-mcp
- Transport: stdio
- Stars: 0
- License: MIT
- Latest version: 1.1.0

## Install

### Claude Code

```sh
claude mcp add sql-mini-mcp -- uvx sql-mini-mcp
```

### Cursor (`~/.cursor/mcp.json`)

```json
{
  "mcpServers": {
    "sql-mini-mcp": {
      "command": "uvx",
      "args": [
        "sql-mini-mcp"
      ]
    }
  }
}
```

### VS Code (`.vscode/mcp.json`)

```json
{
  "servers": {
    "sql-mini-mcp": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "sql-mini-mcp"
      ]
    }
  }
}
```

### VS Code CLI

```sh
code --add-mcp '{"name":"sql-mini-mcp","type":"stdio","command":"uvx","args":["sql-mini-mcp"]}'
```

### Claude Desktop (`claude_desktop_config.json`)

```json
{
  "mcpServers": {
    "sql-mini-mcp": {
      "command": "uvx",
      "args": [
        "sql-mini-mcp"
      ]
    }
  }
}
```

### Codex (`~/.codex/config.toml`)

```toml
[mcp_servers.sql-mini-mcp]
command = "uvx"
args = ["sql-mini-mcp"]
```

### Gemini CLI (`~/.gemini/settings.json`)

```json
{
  "mcpServers": {
    "sql-mini-mcp": {
      "command": "uvx",
      "args": [
        "sql-mini-mcp"
      ]
    }
  }
}
```

## Environment variables

| Name | Required | Secret | Description |
|---|---|---|---|
| `REPORTING_SQL_URL` | no | no |  |
| `SQL_SAFE_MCP_CONFIG` | no | no |  |

## FAQ

### What databases does this server support?

The server supports SQL Server, MySQL, and MariaDB.

### Is the server capable of writing data to my database?

No, the server is read-only by design and all tools are annotated as read-only to prevent data modification.

### How does the server protect PII (Personally Identifiable Information)?

Configured PII columns are returned as alias-bound, authenticated tokens instead of plaintext, allowing agents to filter or count records without seeing the actual data.

### Can I use this with SQL Server?

Yes, SQL Server is fully supported and every tool is available for it.
