Grain SQL

io.github.pattrnlabs/grain

About Grain SQL

Grain SQL is an MCP server published by the GitHub account pattrnlabs. Run SQL queries and inspect database schemas through safe, visible MCP tools.

It runs on your own machine: your AI client starts it from the npm package grain-tools at version 0.10.39.

It asks for one secret: GRAIN_CONNECTIONS. Give it a key with the least access that still works.

Version 0.10.39 was published on 27 October 2026, and the source code is public, so you can read it before installing.

Written from the registry entry. 9 automated checks on the registry entry and the package code: 7 pass, 0 warn, 0 fail, 2 info. How we check.

What it asks for

VariableRequiredSecretDescription
GRAIN_CONNECTIONSNoYesJSON array of Grain connection profiles for headless use.
GRAIN_MCP_SAFE_MODENoNoSet to false to allow mutating SQL. Defaults to true.
GRAIN_MAX_ROWSNoNoMaximum rows returned by query tools. Defaults to 10000.

Checks

CheckResultDetail
Source repository linkedPasshttps://github.com/pattrnlabs/grain
Version pinnedPassEvery package has an explicit version
Secrets requestedInfoAsks for 1 secret: GRAIN_CONNECTIONS
Known package registryPassAll packages come from npm, PyPI, OCI, NuGet or MCPB
Namespace ownershipInfoName verified via GitHub account pattrnlabs
Registry text aimed at the AIPassDescription and settings contain no hidden characters or instructions to the AI
Install scriptsPassgrain-tools@0.10.39 runs nothing at install
Code red flagsPassRead 3 files in grain-tools@0.10.39: no obfuscation, encoded execution, credential reads or data-collection endpoints found
Text aimed at the AIPassNo hidden characters or instructions to the AI in 3 files, including comments and the README

Popularity & health: 57 / 100

Worked out from public numbers and our own checks, not from user reviews or ratings. It says how used and how looked-after a server is, not whether it is safe.

Popularity15 / 40

3 GitHub stars, 1,468 downloads last week, no Hacker News posts found. Best two of the three, each on a log scale.

Activity15 / 25

Last push 2026-10-29, last release 2026-10-30, 0 commits in 90 days.

Issue health8 / 15

0 closed of 0 issues, too few to judge. No data, so half marks.

Our checks20 / 20

0 warnings, each costing a fifth.

1 forks, 1 merged pull requests. Sources: GitHub, npm, PyPI (pypistats.org) and Hacker News (Algolia), fetched 2026-10-31.

What people say

No Hacker News threads link to its source code.

Look further: search Reddit, search Hacker News, read its GitHub issues. These are not reviews we checked.

Facts

Registry nameio.github.pattrnlabs/grain
PublisherGitHub account pattrnlabs
How the name is verifiedName verified via GitHub account pattrnlabs. The registry ties the name prefix to that account or domain; it does not check the code.
TypeLocal: runs on your machine from a package
Packagesnpm grain-tools 0.10.39 (stdio)
Version0.10.39
Published
Last updated
Source repositoryhttps://github.com/pattrnlabs/grain
Websitehttps://grain.tools
CategoryDatabases & data (assigned by keyword rule, not by hand)

Related servers in Databases & data