Skip to content
Grok

Grain for Grok

io.github.pattrnlabs/grain

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

client:Grok transport:stdio runtime:npm

Install Grain in Grok

.mcp.json (in your project root)

Held in this page only — never stored, logged, or sent anywhere but back to your screen.

{
  "mcpServers": {
    "grain": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "grain-tools"
      ],
      "env": {
        "GRAIN_CONNECTIONS": "<GRAIN_CONNECTIONS>",
        "GRAIN_MCP_SAFE_MODE": "<GRAIN_MCP_SAFE_MODE>",
        "GRAIN_MAX_ROWS": "<GRAIN_MAX_ROWS>"
      }
    }
  }
}

Grok Build reads Claude Code's .mcp.json and Claude Desktop's config unchanged, so a server you have already set up there needs nothing new. The Grok web app and X integration do not take custom servers. Grok docs

Grain in other clients