# StackQL MCP Server

This MCP server exposes StackQL to an agent for SQL-based queries and provisioning across cloud resources and APIs. Use it to inspect or change infrastructure from a coding session.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed · ★ 1068
- Author: stackql
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/stackql/stackql
- Updated: 2026-10-24
- HTML: https://affpapa.org/en/nevibecode/mcp/stackql-mcp-server

## What it does

StackQL MCP Server connects an agent to StackQL, an engine that manages and queries service and resource state through SQL semantics. StackQL parses a statement, turns it into an API request for the selected provider, then returns the result. The project covers cloud and SaaS interfaces such as Google, AWS, Azure, Okta, and GitHub.

The server runs as `@stackql/mcp-server` through `npx`. StackQL itself can run as a standalone application in `exec`, `shell`, or `srv` mode; the latter accepts a PostgreSQL wire protocol client. Because setup starts the package with `npx`, that command must be available in the environment.

## Requirements
- Needs: Node.js (commands run via npx)

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add stackql-mcp -- npx -y @stackql/mcp-server
```

### Codex

**Platform CLI**
```bash
codex mcp add stackql-mcp-server -- npx -y @stackql/mcp-server
```

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "stackql-mcp-server": {
            "command": "npx",
            "args": [
                "-y",
                "@stackql/mcp-server"
            ]
        }
    }
}
```

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "stackql-mcp-server": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "@stackql/mcp-server"
            ]
        }
    }
}
```

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add stackql-mcp-server npx -y @stackql/mcp-server
```

## When to use it
- query cloud resource state with SQL
- create or modify provider resources
- retrieve records from cloud and SaaS APIs
- inspect infrastructure from an agent chat

## Example prompts
- Check AWS resource state and present the result as a table.
- Write a StackQL query that finds Azure resources with a given property.
- Fetch GitHub data through StackQL and explain the records you find.

## Similar
- [terraform-search-import](https://affpapa.org/en/nevibecode/skills/terraform-search-import.md) — skill · 4900 installs
- [modal-serverless-gpu](https://affpapa.org/en/nevibecode/skills/modal-serverless-gpu.md) — skill · 954 installs
- [provider-upgrade](https://affpapa.org/en/nevibecode/skills/provider-upgrade.md) — skill · 848 installs
- [architecture-diagram](https://affpapa.org/en/nevibecode/skills/cocoon-ai-hello-at-cocoon-aico-architecture-diagram.md) — skill · 491 installs
- [prisma-compute](https://affpapa.org/en/nevibecode/skills/prisma-compute.md) — skill · 371800 installs
- [insforge-cli](https://affpapa.org/en/nevibecode/skills/insforge-cli.md) — skill · 60500 installs

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
