Grain SQL
by @pattrnlabs · io.github.pattrnlabs/grain
Run SQL queries and inspect database schemas through safe, visible MCP tools.
- Category
- Databases
- Connection
- Local (npm)
- Tools
- Shown after install
- Status
- Runs on your computer
Connect it to your AI
Claude Code (npm)
claude mcp add grain -- npx -y grain-tools@0.10.44Cursor, VS Code and other apps (mcp.json)
{
"mcpServers": {
"grain": {
"command": "npx",
"args": [
"-y",
"grain-tools@0.10.44"
]
}
}
}Questions
What is the Grain SQL MCP server?
Run SQL queries and inspect database schemas through safe, visible MCP tools. It is made by @pattrnlabs and listed in the official MCP Registry as io.github.pattrnlabs/grain. MCP (Model Context Protocol) is the open standard that lets AI apps like Claude, ChatGPT and Cursor use outside tools.
How do I add Grain SQL to Claude?
In Claude Code, run: claude mcp add grain -- npx -y grain-tools@0.10.44
How do I add Grain SQL to ChatGPT?
ChatGPT only connects to remote MCP servers, and Grain SQL runs on your own computer. Use it from Claude, Cursor or another app that runs local servers.
How do I add Grain SQL to Cursor?
Open Cursor settings, go to MCP, choose "Add new MCP server" (or edit ~/.cursor/mcp.json) and add: { "mcpServers": { "grain": { "command": "npx", "args": [ "-y", "grain-tools@0.10.44" ] } } }
Does Grain SQL work right now?
It runs on your own computer, so it works once you install it. There is no remote server for us to check.
Is this your server? Get the badge for your README
Markdown (GitHub README)
[](https://chen.media/mcp/github-pattrnlabs-grain)HTML (switches to dark mode on its own)
<a href="https://chen.media/mcp/github-pattrnlabs-grain"><picture><source media="(prefers-color-scheme: dark)" srcset="https://chen.media/mcp/badge/github-pattrnlabs-grain.svg?theme=dark"><img src="https://chen.media/mcp/badge/github-pattrnlabs-grain.svg" alt="Listed on chen.media/mcp" height="40"></picture></a>More in Databases
See allPrisma Postgres and Prisma ComputeVerified maker
prisma.ioManage Prisma Postgres and existing Prisma Compute apps. Requires sign-in; does not upload code.
SupabaseVerified maker
supabase.comMCP server for interacting with the Supabase platform
NeonVerified maker
neon.comOfficial Neon MCP server for managing Neon projects and Lakebase Postgres databases.
PlanetScaleVerified maker
@planetscaleConnect to PlanetScale databases, branches, schema, query insights, and execute SQL
AirtableVerified maker
airtable.comOfficial Airtable MCP server — database and operations layer for agents.
ClickHouseVerified maker
@ClickHouseOfficial ClickHouse MCP server for querying and exploring ClickHouse clusters and chDB.