Skip to content

Documentation

Overview

Grain is a set of analytics tools for agents and humans. You can query your databases from VS Code, from the terminal, or through an AI agent that supports the Model Context Protocol (MCP), and every query goes through one local Grain service on your own machine.

The Grain service holds your database connections and credentials. Your editor, the grain command and your agents all talk to that service, so a query an agent runs shows up in the same results panel as your own queries. Grain has no hosted server and no bundled AI model, so your queries, schemas and passwords stay on your machine.

What you can do with Grain

Where to go next

  • Installation explains how to install the Grain CLI, then the VS Code extension if you want it.
  • Connect your agent explains grain connect and the manual setup for each agent.
  • Connectors lists the nine databases Grain supports and what each one needs.
  • Safe mode explains what an agent is allowed to run, and where Grain enforces that limit.
  • Privacy and telemetry explains what anonymous usage data Grain sends and how to turn it off.
Documentation