
Queryshield
A secure SQL proxy that sits between Claude and your production databases. It translates natural language questions into SQL using Claude with prompt caching, then validates every query at the AST level to block anything that isn't a SELECT. You get per-agent row-level security with table whitelists and injected WHERE clauses, plus an append-only audit log that stores metadata but never actual row data. The MCP integration exposes three tools: query_database for natural language, query_database_sql for raw SELECT statements, and get_audit_log. Reach for this when you want agents querying enterprise databases without handing them connection strings or trusting them to write safe SQL on their own.
- GitHub stars
- 1
- tools
- 5
- auth
- Secret needed
- transport
- STDIO
- env vars
- 2
- last updated
- May 4, 2026
Tools
5 toolsPublic tool metadata for what this MCP can expose to an agent.
query_databaseNatural-language query against a registered database alias.
Natural-language query against a registered database alias.
No parameter schema in public metadata yet.
query_database_sqlRun a pre-built SELECT query against a registered database alias.
Run a pre-built SELECT query against a registered database alias.
No parameter schema in public metadata yet.
list_credentialsList the credential names this agent may read.
List the credential names this agent may read.
No parameter schema in public metadata yet.
get_credentialRead one permitted secret using the same API key.
Read one permitted secret using the same API key.
No parameter schema in public metadata yet.
get_audit_logReturn recent query attempts for the calling agent.
Return recent query attempts for the calling agent.
No parameter schema in public metadata yet.
Sponsors
Configuration
QUERYSHIELD_API_KEY*secretAgent API key issued by QueryShield.
QUERYSHIELD_BASE_URLOverride the default endpoint.
Readme
QueryShield
Agent security suite. QueryShield is the lead product: a secure SQL proxy and a named credential vault, one qs_ API key, one Stripe customer, and this docs site.
Agents call a single endpoint in plain English (or structured SQL). QueryShield:
- Translates natural language → SQL via Claude with prompt caching.
- Validates every query at the AST level — only
SELECTis allowed, no stacked statements, no forbidden functions, LIMIT required. - Applies per-agent row-level security: schema/table whitelists and
WHEREclause injection. - Executes against the customer DB and returns rows.
- Logs every attempt to an append-only audit table — metadata only, never row contents.
Agents never see connection strings.
Details
- Repository
- github.com/bch1212/queryshield
- Categories
- Databases, AI & LLM Tools, Monitoring & Observability
- Package
queryshield-mcp- Transport
- STDIO
- Auth
- Required
- Registry
- MCP registry, active