MCP.Market

Queryshield MCP server

by bch1212·io.github.bch1212/queryshield·v1.0.1·1 stars

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

B83/100grade B
What users say
No reviews yet
Be the first
Safety scan
B83/100

full report

Adoption
Growing

1 stars18 downloads/wk

Reviews

Write one

Nobody has reviewed Queryshield yet.

If you have run it, two minutes of your experience saves the next person an afternoon.

Queryshield tools (3, 2 write)

write = sends, deletes, buys or posts

Read from the package source without running it. The installed server may list more.

  • get_audit_log

    Recent audit entries for the calling agent.

  • query_databasewrite action

    Run a natural-language question against a registered database.

  • query_database_sqlwrite action

    Run a structured SELECT statement against a registered database.

Public scan report

scanner v0.1.9 · 2026-09-27 · same rubric, same numbers if you re-run it

no findings
  • Code scan4 source files scanned25/25
  • –Live reliabilityno gateway calls yet and no remote to proben/a
  • –Tool poisoningtools not inspected (local package is not executed); not countedn/a
  • Auth qualitystatic API keys via environment variables6/15
  • Maintenancelast push 13 days ago15/15
  • Maintainer identityregistry namespace matches repository owner; GitHub account older than a year8/10
Overall 83/100. Components that don't apply are left out of the denominator. Any critical finding is an F.RubricAppeal a findingJSON

How Queryshield compares

Against every graded Databases MCP server, from our own scans and uptime checks. Updated after each scan run.

Safety score
83/100
higher than 60% of 802 Databases servers
Tools
3
the typical Databases server has 8
Tools that change things
67%
typical: 9%. Fewer write tools means less an agent can break
GitHub stars
1
more than 45% of 602 Databases servers
Downloads a week
18
more than 5% of 330 Databases servers with a package

What its tools let an agent do: 1 read · 2 change

Install Queryshield in Claude Code, Cursor or VS Code

claude mcp add queryshield -- uvx queryshield-mcp
Add to Cursor

What the publisher says

From the Queryshield repository's README, as published. We do not edit it. Read it on GitHub

QueryShield

Secure SQL proxy between AI agents and enterprise databases.

Agents call a single endpoint in plain English (or structured SQL). QueryShield:

stacked statements, no forbidden functions, LIMIT required.

  1. Translates natural language → SQL via Claude with prompt caching.
  2. Validates every query at the AST level — only SELECT is allowed, no

WHERE clause injection.

  1. Applies per-agent row-level security: schema/table whitelists and

never row contents.

  1. Executes against the customer DB and returns rows.
  2. Logs every attempt to an append-only audit table — metadata only,

Agents never see connection strings.

Quickstart

pip install -r requirements.txt
cp .env.example .env
# Set ANTHROPIC_API_KEY, DATABASE_URL, VAULT_KEY (see below)

python -m queryshield.start

Generate a Fernet key for VAULT_KEY once and never lose it:

python -c "from cryptography.fernet import Fernet; print(Fernet.generate_key().decode())"

End-to-end flow (curl)

# 1) Boot a tenant. Returns the admin API key — copy it.
curl -X POST localhost:8000/v1/tenants?name=Acme

# 2) Register the customer DB. Connection string is encrypted at rest.
curl -X POST localhost:8000/v1/databases \
  -H 'X-Admin-Key: qs_...' \
  -H 'Content-Type: application/json' \
  -d '{
    "alias": "prod",
    "db_type": "postgresql",
    "connection_string": "postgresql://reader:secret@db.acme.internal:5432/app",
    "allowed_tables": ["users", "orders"]
  }'

# 3) Provision a scoped agent (different from admin) for your AI app.
curl -X POST localhost:8000/v1/agents \
  -H 'X-Admin-Key: qs_...' \
  -H 'Content-Type: application/json' \
  -d '{ "name": "reporting", "tenant_id": "<tenant>" }'

# 4) Set the agent's RLS policy.
curl -X POST localhost:8000/v1/policies \
  -H 'X-Admin-Key: qs_...' \
  -H 'Content-Type: application/json' \
  -d '{
    "agent_id": "<agent>",
    "database_alias": "prod",
    "allowed_tables": ["users", "orders"],
    "row_filters": { "users": "tenant_id = 42" }
  }'

# 5) The agent queries.
curl -X POST localhost:8000/v1/query \
  -H 'X-API-Key: qs_...' \
  -H 'Content-Type: application/json' \
  -d '{
    "database_alias": "prod",
    "query":

MCP integration

Listed in the official MCP Registry as io.github.bch1212/queryshield.

Install the client:

pip install queryshield-mcp

Then drop this into your Claude Desktop / Cursor / agent config:

{
  "queryshield": {
    "command": "queryshield-mcp",
    "env": { "QUERYSHIELD_API_KEY": "qs_..." }
  }
}

Source for the standalone PyPI package lives in packages/queryshield-mcp/.

For MCP directory evaluators such as Glama, the repository root also includes a slim Dockerfile that launches the published queryshield-mcp stdio server for tool introspection. The container does not need QUERYSHIELDAPIKEY for MCP initialization/tool discovery; the key is only required when a discovered tool is actually invoked against a QueryShield API tenant.

MCP integration (legacy)

Drop this into any MCP-aware client (Claude Desktop, Cursor, custom agents):

{
  "queryshield": {
    "command": "python",
    "args": ["-m", "queryshield.mcp_server"],
    "env": {
      "QUERYSHIELD_API_KEY": "qs_...",
      "QUERYSHIELD_BASE_URL": "https://api.queryshield.io"
    }
  }
}

Tools exposed:

  • querydatabase(databasealias, question, max_rows) — natural-language
  • querydatabasesql(databasealias, sql, maxrows) — pre-built SELECT
  • getauditlog(limit) — recent attempts for the calling agent

Security model

Shortened. The full README is on GitHub.

Nothing above is checked by us. What we check is on the safety report.

Queryshield: common questions

Is Queryshield MCP server safe?
Mostly: it is graded B (83/100). Read the Queryshield safety report
How do I install Queryshield?
It runs on your machine. Copy the Claude Code, Cursor, VS Code or Claude Desktop config from the install section.
Does Queryshield need an API key?
Yes. The registry entry asks for QUERYSHIELD_API_KEY.
Is Queryshield maintained?
The last commit was 52 days ago (2026-09-14). The latest release is v1.0.1.
What can I use instead of Queryshield?
Servers from other publishers that do the same job: Januscope MCP server, CogniCore MCP server and DBHub MCP server.
How does Queryshield compare with other Databases MCP servers?
safety score 83/100 (higher than 60% of 802 Databases servers); tools 3 (the typical Databases server has 8); tools that change things 67% (typical: 9%. Fewer write tools means less an agent can break). Full comparison.

Alternatives to Queryshield

Same job from other publishers: the closest match first, then the best rated.

  • Januscope
    Local MCP proxy for tool restrictions, response redaction, audit logs, and database schema context.
    A
  • CogniCore
    Memory, reflection and safety for AI agents. Hosted or local, no vector database.
    A
  • DBHub
    Token-efficient database MCP server for PostgreSQL, MySQL, MariaDB, SQL Server, Oracle, SQLite
    A
  • Motherduck
    SQL analytics and data engineering for AI Assistants and IDEs
    A
  • Keboola
    Connect your AI assistants to Keboola and expose your data, transformations, SQL queries, ...
    A

More from bch1212 →