Skip to main content

4 posts tagged with "anthropic"

View All Tags

Anthropic Providers Update - July 2026

· 3 min read
Technologist and Cloud Consultant

We've released an update to the StackQL providers for the Anthropic platform:

  • anthropic - the Claude API surface: messages, models, batches, files, agents, deployments, environments, sessions, skills, memory stores, user profiles, and vaults (11 services, 26 resources, 103 operations)
  • anthropic_admin [new] - the Admin API surface: organization, users, invites, workspaces, API keys, usage and cost reports, rate limits, and Claude Code analytics (6 services, 11 resources)

Both providers expose a SQL-first surface: authentication is handled automatically, Push down support using the LIMIT clause and built in pagination handling.

Inference as a query

Inference using Claude is accessible via SELECT for instance:

SELECT
id,
model,
stop_reason,
JSON_EXTRACT(content, '$[0].text') AS assistant_message,
JSON_EXTRACT(usage, '$.output_tokens') AS output_tokens
FROM anthropic.messages.messages
WHERE model = 'claude-sonnet-5'
AND max_tokens = 2048
AND messages = '[
{
"role": "user",
"content": "how does stackql work?"
}
]'
AND system = 'You are a technical assistant. Answer in one short paragraph.'
AND thinking = '{"type": "disabled"}';

Token counting works the same way via anthropic.messages.token_counts - free of charge.

Model capabilities view

The provider ships a convenience view that fans the per-model capability matrix out of the capabilities JSON column into flat columns:

SELECT id, display_name, thinking, adaptive, xhigh, max_input_tokens, max_tokens
FROM anthropic.models.vw_model_capabilities;

One row per model with boolean flags for batch, citations, code execution, context management, effort tiers (low through xhigh), image and PDF input, structured outputs, and thinking modes - useful for picking a model programmatically instead of reading release notes.

The admin provider - your Anthropic org as data

The anthropic_admin provider presents the organization management surface as SQL.

Enumerate workspaces and who's in them:

SELECT id, name, created_at, data_residency
FROM anthropic_admin.workspaces.workspaces;

SELECT user_id, workspace_id, workspace_role
FROM anthropic_admin.workspaces.members
WHERE workspace_id = '<workspace_id>';

Audit users and API keys across the org:

SELECT id, email, name, role
FROM anthropic_admin.organization.users;

SELECT id, name, status, workspace_id, partial_key_hint
FROM anthropic_admin.api_keys.api_keys;

Pull usage reports as time-bucketed rows - results is a JSON column you can break down with JSON_EACH, and reports can be grouped and filtered by model, workspace, API key, service tier, and more:

SELECT starting_at, ending_at, results
FROM anthropic_admin.usage.usage_reports
WHERE starting_at = '2026-07-01T00:00:00Z'
AND "group_by[]" = 'model';

Cost reporting and Claude Code adoption analytics work the same way:

SELECT starting_at, ending_at, results
FROM anthropic_admin.cost.cost_reports
WHERE starting_at = '2026-07-01T00:00:00Z';

SELECT starting_at, ending_at, results
FROM anthropic_admin.usage.claude_code_reports
WHERE starting_at = '2026-07-01T00:00:00Z';

Because it's all SQL, you can join usage to workspaces, materialize daily cost snapshots into a database, or point a BI tool at StackQL's Postgres wire protocol server and build an org-wide Claude spend dashboard without writing a line of integration code.

Authentication

The two providers use different key types, which are disjoint by design:

# anthropic - workspace-scoped Claude API key
export ANTHROPIC_API_KEY=sk-ant-api...

# anthropic_admin - org-scoped Admin API key (created by org admins)
export ANTHROPIC_ADMIN_KEY=sk-ant-admin...

Admin keys are available to organization accounts only and can be provisioned by users with the admin role in the Console.

Get started

Pull the providers from the public registry:

registry pull anthropic
registry pull anthropic_admin

Provider docs are at anthropic-provider.stackql.io and anthropic-admin-provider.stackql.io. Let us know what you build. Star us on GitHub.

StackQL MCP server now available in the Anthropic MCP Directory

· 2 min read
Technologist and Cloud Consultant

The StackQL MCP server has been reviewed by Anthropic and is now listed in the Anthropic MCP Directory. StackQL is a member of the Claude Partner Network, and the directory listing makes the MCP server discoverable and installable directly from within Claude Desktop - no manual bundle download, no custom connector configuration.

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.

Anthropic Provider for StackQL Available

· 2 min read
Technologist and Cloud Consultant

The anthropic provider for stackql is now available in the dev stackql provider registry. The anthropic provider for stackql includes services for interacting with Claude models via the Messages API. To get started download stackql, set the ANTHROPIC_API_KEY environment variable and use the dev registry as shown here:

export DEV_REG="{ \"url\": \"https://registry-dev.stackql.app/providers\" }"
./stackql --registry="${DEV_REG}" shell

Then pull the anthropic provider using:

REGISTRY PULL anthropic;

Now you can run some queries. Here's a simple example using the high-level claude_35_chat interface:

stackql >>select * from anthropic.messages.claude_35_chat;
|----------------------------|-----------|-------------|---------------|--------------|---------------|--------------------------------|
| model | role | stop_reason | stop_sequence | input_tokens | output_tokens | content |
|----------------------------|-----------|-------------|---------------|--------------|---------------|--------------------------------|
| claude-3-5-sonnet-20240620 | assistant | end_turn | null | 13 | 39 | StackQL is a SQL-like query |
| | | | | | | language and universal API |
| | | | | | | client that allows users to |
| | | | | | | query, analyze, and manage |
| | | | | | | cloud infrastructure and |
| | | | | | | services across multiple |
| | | | | | | providers using familiar SQL |
| | | | | | | syntax. |
|----------------------------|-----------|-------------|---------------|--------------|---------------|--------------------------------|

Or you can use the lower-level messages interface directly:

stackql >>select * from anthropic.messages.message
stackql >>where "anthropic-version" = '2023-06-01'
stackql >>and data__model = 'claude-3-5-sonnet-20240620'
stackql >>and data__max_tokens = 1024
stackql >>and data__messages = '[{"role": "user", "content": "Hello, world"}]';
|--------------------------------|------------------------------|----------------------------|-----------|-------------|---------------|---------|----------------------------------------|
| content | id | model | role | stop_reason | stop_sequence | type | usage |
|--------------------------------|------------------------------|----------------------------|-----------|-------------|---------------|---------|----------------------------------------|
| [{"text":"Hello! How can I | msg_01MLTLVY6XCTT2cNBeFeJzfj | claude-3-5-sonnet-20240620 | assistant | end_turn | null | message | {"input_tokens":10,"output_tokens":30} |
| assist you today? Feel free | | | | | | | |
| to ask me any questions or let | | | | | | | |
| me know if you need help with | | | | | | | |
| anything.","type":"text"}] | | | | | | | |
|--------------------------------|------------------------------|----------------------------|-----------|-------------|---------------|---------|----------------------------------------|

Like other language models, Claude's responses are stochastic, so you'll get slightly different responses each time you query.

Let us know what you think! ⭐ us on GitHub.