bch1212 avatar

Queryshield

bch1212/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 tools

Public 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*secret

Agent API key issued by QueryShield.

QUERYSHIELD_BASE_URL

Override the default endpoint.

Readme

QueryShield

tests

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:

  1. Translates natural language → SQL via Claude with prompt caching.
  2. Validates every query at the AST level — only SELECT is allowed, no stacked statements, no forbidden functions, LIMIT required.
  3. Applies per-agent row-level security: schema/table whitelists and WHERE clause injection.
  4. Executes against the customer DB and returns rows.
  5. Logs every attempt to an append-only audit table — metadata only, never row contents.

Agents never see connection strings.


View the full README on GitHub

Details

Repository
github.com/bch1212/queryshield
Categories
Databases, AI & LLM Tools, Monitoring & Observability
Package
queryshield-mcp
Transport
STDIO
Auth
Required
Registry
MCP registry, active

More from bch1212

Related Databases MCP servers

View all
1boyce-io avatarBoyceboyce-io/boyceDeterministic SQL compiler for AI agents. Your agent stops guessing SQL.1stars
2gluip avatarChart Canvasgluip/chart-canvasCreate interactive visualizations and query data sources (SQLite, CSV, Parquet, JSON)1stars
3kioie avatarmemexkioie/memexLocal MCP memory for coding agents. SQLite on your machine — preferences persist across chats.1stars
4ysydhc avatarTeamMemoryysydhc/team_memoryTeam experience database - let AI accumulate, retrieve and apply team knowledge across chats.1stars
5annasmazhar avatarPySpark MCPannasmazhar/pyspark_mcpSQL migration, AWS Glue job generation, and PySpark optimization as an MCP server.0stars
6arpe-io avatarMigratorxpress Mcparpe-io/migratorxpress-mcpMCP server for MigratorXpress — cross-platform database migration with parallel transfer0stars