queryshield

v1.0.1
io.github.bch1212/queryshield Checked 7 hours ago Published 7 months ago

Secure SQL proxy for AI agents — NL→SQL, AST safety, per-agent RLS, audit log.

Values you need

VariableWhat it is
QUERYSHIELD_API_KEYrequired secret Agent API key issued by QueryShield.
QUERYSHIELD_BASE_URLoptional Override the default endpoint.

PyPI (uvx) discovery passed

Requires uv (https://docs.astral.sh/uv/)

Run in a terminal
claude mcp add queryshield -e 'QUERYSHIELD_API_KEY=<QUERYSHIELD_API_KEY>' -- uvx queryshield-mcp==1.0.1
Add to claude_desktop_config.json
{
  "mcpServers": {
    "queryshield": {
      "args": [
        "queryshield-mcp==1.0.1"
      ],
      "command": "uvx",
      "env": {
        "QUERYSHIELD_API_KEY": "<QUERYSHIELD_API_KEY>"
      }
    }
  }
}
Add to ~/.cursor/mcp.json
{
  "mcpServers": {
    "queryshield": {
      "args": [
        "queryshield-mcp==1.0.1"
      ],
      "command": "uvx",
      "env": {
        "QUERYSHIELD_API_KEY": "<QUERYSHIELD_API_KEY>"
      }
    }
  }
}
Add to .vscode/mcp.json
{
  "inputs": [
    {
      "description": "QUERYSHIELD_API_KEY",
      "id": "queryshield-api-key",
      "password": true,
      "type": "promptString"
    }
  ],
  "servers": {
    "queryshield": {
      "args": [
        "queryshield-mcp==1.0.1"
      ],
      "command": "uvx",
      "env": {
        "QUERYSHIELD_API_KEY": "${input:queryshield-api-key}"
      },
      "type": "stdio"
    }
  }
}
Add to ~/.codex/config.toml
[mcp_servers.queryshield]
command = "uvx"
args = ["queryshield-mcp==1.0.1"]
env = { "QUERYSHIELD_API_KEY" = "<QUERYSHIELD_API_KEY>" }

For AI agents

  1. Ask the user for: QUERYSHIELD_API_KEY. Never invent or guess these values; secrets go into the client config, not into chat logs.
  2. Pick the user's MCP client and apply the matching config from the first install method (it is the one verified by the smoke test when available).
  3. Restart or reload the client so it starts the server.
  4. Verify: the server should expose these tools: query_database, query_database_sql, get_audit_log.
  5. If it fails, check that the required runtime is installed (uv (https://docs.astral.sh/uv/)) and that the values above are set.

Machine-readable: install.md · manifest.json