MCP Hub › Databases & Data › Grain SQL

Grain SQL MCP server

by pattrnlabs · io.github.pattrnlabs/grain

Run SQL queries and inspect database schemas through safe, visible MCP tools.

🗄 Databases & Datanpmv0.10.49
Open in MCP HubGitHub repository ↗Website ↗

How to install Grain SQL

npm

claude mcp add grain -- npx -y [email protected]

Or add it to your MCP config (Claude Desktop, Cursor, VS Code):

{
  "mcpServers": {
    "grain": {
      "command": "npx",
      "args": [
        "-y",
        "[email protected]"
      ]
    }
  }
}

Environment variables:
GRAIN_CONNECTIONS – JSON array of Grain connection profiles for headless use.
GRAIN_MCP_SAFE_MODE – Set to false to allow mutating SQL. Defaults to true.
GRAIN_MAX_ROWS – Maximum rows returned by query tools. Defaults to 10000.

Replace placeholders in <angle brackets> with your own values. Review what a server can access before you enable it.

Details

Version
0.10.49
Published
2026-11-04
Updated
2026-11-04
Namespace
io.github.pattrnlabs
Source
pattrnlabs/grain

Similar databases & data servers