Skip to content
Grain

Analytics tools for Agents and Humans

Query your databases from VS Code, the terminal, or an MCP agent.

Install the CLI

curl -fsSL https://grain.tools/install.sh | sh

Also in your IDE

Install for
  • Cursor
  • Antigravity
  • VS Code

Try it here

query.sql
Agent
I'm connected to the sample data. Ask a question and you'll see the SQL I write to answer it.
Try the experience live

What Grain does

  • The Grain workbench: saved connections on the left, a SQL editor and a results grid on the right.The Grain workbench: saved connections on the left, a SQL editor and a results grid on the right.

    See what your agent actually ran

    Grain workbench, Beta

    Read the exact SQL and explore the rows it returned, next to your own queries.

    Results and sessions →
  • The connection setup page, with fields for database type, host, port, user and password.The connection setup page, with fields for database type, host, port, user and password.

    Your password never enters the chat

    Your agent drafts the connection and you finish it on a setup page on your own machine. Save it once and every connected agent and VS Code can use it.

    Connections →
  • Grain settings with switches for the MCP server, safe mode and write confirmation, all on.Grain settings with switches for the MCP server, safe mode and write confirmation, all on.

    Agents explore. They do not change your data.

    Safe mode refuses agent write statements by default. Turn it off when you want agents to write.

    Safe mode →

Works where you work

  • Claude Desktop
  • Claude Code
  • VS Code
  • Cursor
  • Windsurf
  • Codex

Supported databases

  • Snowflake
  • BigQuery
  • PostgreSQL
  • MySQL
  • SQL Server
  • SQLite
  • DuckDB
  • Trino
  • Elasticsearch

Coming soon

  • ClickHouse
  • Databricks
  • Redshift
  • Oracle