SS

stackql/stackql

Developer tools
861 stars 0 forks 品質 94 トレンド 94

[logo]: https://stackql.io/img/stackql-logo-bold.png "stackql logo" [homepage]: https://stackql.io/ [docs]: https://stackql.io/docs [blog]: https://stackql.io/blog [registry]: https://github.

概要

[logo]: https://stackql.io/img/stackql-logo-bold.png "stackql logo" [homepage]: https://stackql.io/ [docs]: https://stackql.io/docs [blog]: https://stackql.io/blog [registry]: https://github.

README

About The Project

StackQL is an open-source project built with Golang that allows you to create, modify and query the state of services and resources across different local and remote interfaces, using SQL semantics. Such interfaces canonically include, but are not limited to, cloud and SaaS providers (Google, AWS, Azure, Okta, GitHub, etc.).

How it works

StackQL is a standalone application that can be used in client mode (via exec or shell) or accessed via a Postgres wire protocol client (psycopg2, etc.) using server mode (srv).

StackQL parses SQL statements and transpiles them into API requests to the (cloud) resource provider. The API calls are then executed and the results are returned to the user.

StackQL provider interfaces are canonically defined in OpenAPI extensions to the providers’ specification. These definitions are then used to generate the SQL schema and the API client. The source for the provider definitions are stored in the StackQL Registry. The semantics of provider interactions are defined in our any-sdk library. For more detail on nuts and bolts, please see the local AGENTS.md file and that of any-sdk.

MCP Server

StackQL is an MCP server - SQL over 40+ cloud and SaaS providers for AI agents. Point any MCP-capable client (Claude, VS Code, Cursor, etc.) at StackQL and it can query and provision cloud resources using SQL.

Run it over stdio:

stackql mcp --mcp.server.type=stdio

StackQL MCP is published to the Official MCP Registry as io.github.stackql/stackql-mcp and distributed via npm, PyPI, Docker, a GitHub Action and .mcpb bundles. Pick an install vector and add the matching block to your MCP client config:

For client-specific setup, authentication and server modes, see the full MCP install and usage docs.

Installation

StackQL is available for Windows, MacOS, Linux, Docker, GitHub Actions and more. See the installation instructions below for your platform.

Usage

StackQL can be used via the interactive REPL shell, or via the exec command or ran as a server using the Postgres wire protocol.

ℹ️ StackQL does not require or install a database.

  • Interactive Shell

    # run interactive stackql queries
    stackql shell --auth="${AUTH}"
    
  • Execute a statement or file

    stackql exec --auth="${AUTH}" -i myscript.iql --iqldata vars.jsonnet --output json
    
    # or
    
    stackql exec --auth="${AUTH}" "SELECT id, status FROM aws.ec2.instances WHERE region = 'us-east-1'"
    

    ℹ️ output options of json, csv, table and text are available for the exec command using the --output flag

    ℹ️ StackQL supports passing parameters using jsonnet or json, see Using Variables

  • Server

    # serve client requests over the Postgres wire protocol (psycopg2, etc.) 
    stackql srv --auth="${AUTH}"
    

For more examples, please check our Blog

Contributing

Contributions are welcome and encouraged. For more information on how to contribute, please see our contributing guide.

License

Distributed under the MIT License. See LICENSE for more information. Licenses for third party software we are using are included in the /docs/licenses directory.

Contact

Get in touch with us via Twitter at @stackql, email us at [email protected] or start a conversation using discussions.

Acknowledgements

Forks of the following support our work:

We gratefully acknowledge these pieces of work.

View this README on GitHub

インストール

npx -y @stackql/mcp-server

設定

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