Skip to content
MCP server

QueryPilot

Safe SQL gateway for AI agents: SELECT-only validation, access policies, masking, audit…

Runs locallyStatus and history
Install
Pricing
Open source
Runs
Locally
Version
0.1.1
Listing updated
5 days ago

About QueryPilot

QueryPilot is an open-source MCP server. It runs locally on your machine and is started by your AI client.

Safe SQL gateway for AI agents: SELECT-only validation, access policies, masking, audit trail, evals

Install

Run in a terminal

claude mcp add querypilot --env QUERYPILOT_DATABASE_URL='<QUERYPILOT_DATABASE_URL>' -- uvx querypilot

Add to claude_desktop_config.json

{
  "mcpServers": {
    "querypilot": {
      "command": "uvx",
      "args": [
        "querypilot"
      ],
      "env": {
        "QUERYPILOT_DATABASE_URL": "<QUERYPILOT_DATABASE_URL>"
      }
    }
  }
}

Add to ~/.cursor/mcp.json

{
  "mcpServers": {
    "querypilot": {
      "command": "uvx",
      "args": [
        "querypilot"
      ],
      "env": {
        "QUERYPILOT_DATABASE_URL": "<QUERYPILOT_DATABASE_URL>"
      }
    }
  }
}

Add to .vscode/mcp.json

{
  "servers": {
    "querypilot": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "querypilot"
      ],
      "env": {
        "QUERYPILOT_DATABASE_URL": "<QUERYPILOT_DATABASE_URL>"
      }
    }
  }
}

Add to ~/.codeium/windsurf/mcp_config.json

{
  "mcpServers": {
    "querypilot": {
      "command": "uvx",
      "args": [
        "querypilot"
      ],
      "env": {
        "QUERYPILOT_DATABASE_URL": "<QUERYPILOT_DATABASE_URL>"
      }
    }
  }
}

Add to your client's MCP settings (most use this shape)

{
  "mcpServers": {
    "querypilot": {
      "command": "uvx",
      "args": [
        "querypilot"
      ],
      "env": {
        "QUERYPILOT_DATABASE_URL": "<QUERYPILOT_DATABASE_URL>"
      }
    }
  }
}

Using several servers? Build one config file with the MCP config generator.

Configuration

  • QUERYPILOT_DATABASE_URLSQLAlchemy-style database connection URL, e.g. sqlite:///demo.db or postgresql://user:pass@host:5432/db. Equivalent to --database-url.Required
  • QUERYPILOT_DIALECTSQL dialect for the connector. Equivalent to --dialect.
  • QUERYPILOT_MAX_ROWSMaximum rows returned per query. Equivalent to --max-rows.
  • QUERYPILOT_TIMEOUT_SECONDSQuery execution timeout in seconds. Equivalent to --timeout-seconds.
  • QUERYPILOT_ACCESS_POLICY_JSONJSON-encoded AccessPolicy (blocked_columns, allowed_columns, row_filters, masking_rules) enforced before execution. Equivalent to --access-policy-json.
  • QUERYPILOT_MCP_TRANSPORTMCP transport used by `querypilot mcp`. Equivalent to --transport. Most MCP clients should leave this at stdio; streamable-http is for clients that speak Streamable HTTP directly.

Pricing

Open source

QueryPilot FAQ

Is QueryPilot free?

Yes. QueryPilot is open source, so you can use and self-host it for free.

How do I add QueryPilot to Claude Code?

Run this command in your terminal: claude mcp add querypilot --env QUERYPILOT_DATABASE_URL='<QUERYPILOT_DATABASE_URL>' -- uvx querypilot

Where this comes from

  • Description: from the official MCP Registry entry.
  • Install steps: from the official MCP Registry entry.

How AIPoweredBot checks servers