Skip to main content

85 posts tagged with "stackql"

View All Tags

From finding to fix: cloud auto-remediation with AI and StackQL

· 7 min read
Technologist and Cloud Consultant

A cloud audit tells you what is wrong. The work starts when you have to fix it. Most tooling stops at the findings list and hands a spreadsheet to an engineer, and the findings sit there until someone has a quiet afternoon.

This post walks through the other half: a remediation loop that turns each finding into a reviewable pull request, verifies live state before it changes anything, and applies the fix on merge. It runs entirely in GitHub Actions, authenticates with OIDC, and uses StackQL to talk to cloud control planes. The repo is public at stackql-labs/stackql-ai-remediation, and the example throughout is FinOps waste (unattached disks, idle IPs, zero-VM projects), though the shape is the same for posture and security checks.

Run the StackQL MCP Server Anywhere Your Agent Does

· 5 min read
Technologist and Cloud Consultant

The StackQL MCP server is now available through every runtime an agent is likely to live in: prebuilt Claude Desktop bundles, npm, PyPI, Docker, a GitHub Action, and the Official MCP Registry. It is the same server in each case - one binary, pulled and launched the way your environment prefers.

What the StackQL MCP server is

StackQL exposes cloud and SaaS providers - AWS, Google Cloud, Azure, GitHub, Kubernetes, Snowflake, Databricks and more - as a single SQL surface. The MCP server puts that surface in front of an AI agent: the agent discovers providers, services, resources and methods, then runs SELECT queries to read state and (when you allow it) INSERT / UPDATE / DELETE to change it. Reads and writes are gated by a server mode and recorded to an audit log, so "what the agent did" is always answerable.

For background on the protocol itself, see the original StackQL MCP Server Now Available post and the MCP command reference.

One server, every runtime

Every channel runs the same stackql binary. Pick the one that matches your client:

ChannelGet itBest for
Claude Desktop bundlestackql-mcp-<platform>.mcpb from the release pageOne-click install, no separate StackQL on PATH
npmnpx -y @stackql/mcp-serverNode environments, no global install
PyPIuvx stackql-mcp-server or pip install stackql-mcp-serverPython environments
Dockerdocker run -i --rm stackql/stackql-mcpContainerised / isolated runtimes (amd64 + arm64)
GitHub Actionstackql/setup-stackql-mcp@v1CI and agentic workflows
MCP Registryio.github.stackql/stackql-mcpDirectory-driven discovery and install

A typical stdio client config is three lines. For npx:

{ "mcpServers": { "stackql": { "command": "npx", "args": ["-y", "@stackql/mcp-server"] } } }

Swap npx for uvx stackql-mcp-server or docker run -i --rm stackql/stackql-mcp and you have the Python or Docker form. The npm and PyPI launchers download the signed stackql binary on first run, verify its checksum, and share a single cache. The full matrix - including the manual claude_desktop_config.json form for an existing binary - is in Installing the MCP server.

The approvable MCP server

Letting an agent touch your cloud is a trust decision, so the supply chain is built to be checkable:

  • The embedded stackql binary is Authenticode-signed (Windows) and Apple-notarised (macOS).
  • Every .mcpb bundle ships with a published SHA-256 checksum on the release page.
  • The npm and PyPI launchers verify the downloaded binary's SHA-256 before first use.
  • The MCP Registry entry attests the per-platform hashes, so a directory or marketplace can confirm what it is shipping.

On top of the supply chain, the server defaults to mode: safe - reads run freely, mutations and lifecycle operations need approval through the MCP elicitation flow. Pin read_only for inventory agents that should never write, or full_access for trusted automation. See Server modes.

A worked example: cloud audit in CI

The GitHub Action is where the multi-vector story pays off. stackql/setup-stackql-mcp@v1 installs the binary and writes an MCP config (defaulting to read_only), and anthropics/claude-code-action consumes it through claude_args. The result is an agent that audits your AWS account on every run and files an issue with the SQL it used as evidence:

- id: stackql
uses: stackql/setup-stackql-mcp@v1
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
with:
mode: read_only

- uses: anthropics/claude-code-action@v1
with:
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
prompt: |
Using the stackql tools, audit our AWS account for: S3 buckets without
encryption or with public access, security groups open to 0.0.0.0/0 on
sensitive ports, and IAM users without MFA. Open a GitHub issue
"Cloud audit <date>" summarising findings WITH the SQL you ran as
evidence. If nothing is found, do not open an issue.
claude_args: |
--mcp-config ${{ steps.stackql.outputs.mcp-config-file }}
--allowedTools 'mcp__stackql__*'

Because the config is pinned to read_only, the audit can read everything and change nothing - the safety contract is enforced by the server, not by trust in the prompt. The action README has more recipes, including cost estimates on a pull request and a credential-free GitHub inventory.

What the agent actually sees

Under the hood the agent works the StackQL hierarchy with the same tools whatever the runtime. Pulling the GitHub provider and listing its services looks like this:

> pull_provider {"provider": "github"}
github provider, version 'v26.05.00393' successfully installed

> list_services {"provider": "github"}
actions, activity, apps, billing, checks, code_scanning, codespaces,
copilot, dependabot, gists, git, issues, orgs, packages, projects,
pulls, repos, search, secret_scanning, teams, users, ...

From there the agent can call list_resources and list_methods to discover the required WHERE parameters, then run_select_query to answer a question like "how many public repositories does the stackql org have?" - all without anyone hand-writing SQL.

Get started

⭐ Star us on GitHub and tell us what your agents build.

Autonomous Edge Defense with AI Agents and SQL

· 6 min read
Technologist and Cloud Consultant

Edge defense is a natural fit for an agentic loop: traffic patterns shift constantly, rate-limit thresholds need to follow, and every adjustment should leave an auditable trail. The hard part is usually the plumbing - one API for analytics, another for the rate-limit control plane, another for the durable log.

edgepilot collapses all of that to SQL. Two Claude agents - a recon agent and an action agent - observe a live Cloudflare zone, tighten its rate-limit rule when traffic warrants, and write a decision record to a Confluent Kafka topic. Neither agent knows anything about Cloudflare's GraphQL Analytics API, Cloudflare's rulesets engine, or Confluent's Kafka REST proxy. They know SQL. The StackQL MCP server does the rest.

Cloudflare Provider - May 2026

· 2 min read
Technologist and Cloud Consultant

We've released the latest version of the StackQL Cloudflare provider, including the full Cloudflare V4 API surface under SQL with 108 services, 1259 resources, and 2840 operations.

Service highlights

Key services in this release include:

ServiceResourcesOperationsWhat it covers
zero_trust155427Access apps, gateway, tunnels, identity providers, device posture
radar266273Internet measurement: BGP, traffic, attacks, AS info, quality
cloudforce_one56130Threat intel: requests, priorities, scans, threat events
ai114116Workers AI inference across 100+ models
workers39107Scripts, deployments, KV, Durable Objects, queues, cron triggers
magic_transit2190Magic WAN: sites, connectors, GRE/IPsec tunnels, routes
zones2664Zone lifecycle, settings, SSL/TLS, page rules, custom hostnames
realtime_kit2763RealtimeKit meetings, sessions, recordings, presets
dns1958DNS records, zone transfers, firewall, analytics
load_balancers1254Pools, monitors, regions, search
aisearch2048AI Search indexes, ingest jobs, models
email_security1547Area 1: alerts, allow/block policies, investigation
firewall1047WAF rules, packages, lockdowns, access rules, UA rules
streams1347Stream video uploads, live inputs, signed URLs, captions
api_gateway1743API discovery, schemas, operations, settings
r21742Buckets, lifecycle, CORS, custom domains, event notifications

Authentication

Authenticate with a Cloudflare API token via the CLOUDFLARE_API_TOKEN environment variable:

export CLOUDFLARE_API_TOKEN=...

Example queries

List your zones:

SELECT id, name, status, plan
FROM cloudflare.zones.zones
WHERE account_id = '<account_id>';

Inspect Workers scripts in an account:

SELECT id, modified_on, usage_model
FROM cloudflare.workers.scripts
WHERE account_id = '<account_id>';

List DNS records for a zone:

SELECT name, type, content, ttl, proxied
FROM cloudflare.dns.records
WHERE zone_id = '<zone_id>';

Pull a Radar BGP summary:

SELECT *
FROM cloudflare.radar.bgp_routes_stats;

Binary and non-JSON responses

A number of Cloudflare endpoints return binary or plain-text payloads - PDF LOAs, PNG screenshots, raw script source, CSV exports. The provider wraps these as a one-row table with a contents column so they're still SELECT-able:

SELECT contents
FROM cloudflare.browser_rendering.screenshot
WHERE account_id = '<account_id>' AND data__url = 'https://example.com';

Get started

Pull the provider from the public registry:

registry pull cloudflare

Then start querying. Let us know what you build. Star us on GitHub.

Confluent Provider Update - May 2026

· 2 min read
Technologist and Cloud Consultant

We've released an update to the StackQL Confluent provider adding eight new services and 40 additional resources across existing services.

New Services

The eight new services added in this update are:

ServiceDescription
cclCustom Code Logging - manage log topics that capture stdout/stderr and worker process logs from custom connectors running in Confluent Cloud
ccpmCustom Connect Plugin Management - upload, version, and manage custom connector plugins at the environment level, including plugin version resources for JAR/ZIP artifacts
endpointsManage PrivateLink access points and private network endpoints used to reach Confluent Cloud clusters and serverless products over private networking
pipelinesManage Stream Designer pipelines - the visual SQL/ksqlDB pipeline builder for connecting sources, transforms, and sinks across Kafka topics
share_groupManage Kafka share groups (KIP-932 / Queues for Kafka), which provide queue-like consumption semantics with per-message acknowledgement and consumer parallelism beyond partition count
streams_groupManage Kafka Streams groups - the broker-side coordination resource for Kafka Streams applications introduced alongside the next-generation consumer rebalance protocol
tableflowMaterialize Kafka topics as Apache Iceberg or Delta Lake tables, including catalog integrations, storage configuration, and table maintenance settings
usmUnified Stream Manager - register and govern self-managed Confluent Platform clusters from Confluent Cloud, including agent deployment and hybrid cluster monitoring

Updates

This release also adds 40 additional resources across existing services, expanding coverage for:

  • kafka - additional cluster configuration and topic-level resources
  • connect - new connector status, offset, and task management resources
  • flink - expanded coverage for Flink statements, compute pools, and artifacts
  • iam - new resources for service accounts, identity providers, and role bindings
  • networking - additional resources for transit gateways, peerings, and DNS forwarders
  • schema_registry - new resources for schema exporters, modes, and compatibility
  • billing - new cost and usage resources
  • metrics - additional query and descriptor resources

Get Started

Pull the latest Confluent provider:

stackql registry pull confluent

Visit us on GitHub and let us know how you're using it.