mcpbeat Sign in

Grain SQL MCP Server

by pattrnlabs Your server? Claim it
local only

Grain SQL runs on your own machine — the client starts it, so there is no endpoint to ping. 1 468 installs a week from npm. Last commit 2 Nov 2026.

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

Installs per day peak 731 · avg 129 · -2% w/w
a month agotoday
1 468
Installs / week
npm · grain-tools
3
Stars
0 open issues
2 Nov 2026
Last commit
44 releases in 90 days
MIT
License
Batchfile

Nothing serious here today

Today is the operative word: we check Grain SQL every 15 minutes and re-read its code on every release. Watch it and you find out the day that stops being true.

Three servers free · no card

Connect this server

This server runs on your own machine — install it with the package manager and the client starts it for you. Package name taken from the official registry entry.

run in your terminal
claude mcp add grain -- npx -y grain-tools
~/Library/Application Support/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "grain": {
      "command": "npx",
      "args": [
        "-y",
        "grain-tools"
      ]
    }
  }
}
~/.codex/config.toml
[mcp_servers.grain]
command = "npx"
args = ["-y", "grain-tools"]
.cursor/mcp.json
{
  "mcpServers": {
    "grain": {
      "command": "npx",
      "args": [
        "-y",
        "grain-tools"
      ]
    }
  }
}
.vscode/mcp.json
{
  "servers": {
    "grain": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "grain-tools"
      ]
    }
  }
}

Optional settings from the registry entry, left out of the block above: 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).

Alternatives to Grain SQL

same job, measured the same way
SQL Preview
by fadnavismehul

Run governed SQL queries and inspect database schemas from MCP agents.

172 installs/wk local only
Sqlite
by ofershap

SQLite MCP — query databases, inspect schemas, explain queries, export data.

143 installs/wk local only
Postgres
by ofershap

PostgreSQL MCP — query databases, inspect schemas, explain queries.

42 installs/wk local only
LINQ to DB
by linq2db

Inspect database schemas and execute SQL queries across multiple database providers with LINQ to DB.

local only
Databridge Kit
by cloudcorprecords

Execute SQL and inspect tables, views, schemas and more on a configured database.

local only
MCP Local WP
by verygoodplugins

WordPress database access via Local by Flywheel. Execute read-only MySQL queries and inspect schema.

96 installs/wk local only
Database Admin
by cybeleri

Database admin MCP: schema inspection, query optimization for PostgreSQL and MySQL

43 installs/wk local only
AdoMcp
by john0king

Database MCP server for schema discovery, comments, and SQL queries.

local only

Grain SQL — questions

Answers built from our own checks of this server.

Why is there no uptime for Grain SQL?
Grain SQL runs on your own machine over stdio — there is no network address to reach, so uptime cannot be measured for it by anyone. What can be measured is adoption: the npm package grain-tools was installed 1 468 times last week.
How do I connect Grain SQL?
Copy the ready config from this page. We generate it for Claude Code, Claude Desktop, Codex, Cursor and VS Code, each in the form that client actually reads. It runs locally, so the command pulls grain-tools straight from npm; nothing to host, nothing to sign up for.
How many people use Grain SQL?
The npm package grain-tools was installed 1 468 times in the last week. Week over week that is -2%. We show installs rather than GitHub stars on purpose: a star is a bookmark, an install is someone actually running it.
Is Grain SQL open source?
Yes — it is published under the MIT licence, written in Batchfile and 3 stars on GitHub. The source link is on this page, so you can read exactly what it does with your data before you connect it.