Grain
Rank #6,534io.github.pattrnlabs/grain
Run SQL queries and inspect database schemas through safe, visible MCP tools.
Grain is a Model Context Protocol (MCP) server published by pattrnlabs. It ranks #6,534 of 137,492 servers tracked on MCP Toplist, and its repository has 3 GitHub stars. Grain is listed on Official MCP, with 12 tracked versions. It was first listed on Sep 14, 2026 and most recently updated on Sep 30, 2026.
Ranks ahead of 130,958 of 137,492 servers on MCP Toplist.
Use Grain
No credentials or required configuration declared — add it to your MCP client and go.
claude mcp add grain -e "GRAIN_CONNECTIONS=<your GRAIN_CONNECTIONS>" -e "GRAIN_MCP_SAFE_MODE=<your GRAIN_MCP_SAFE_MODE>" -e "GRAIN_MAX_ROWS=<your GRAIN_MAX_ROWS>" -- npx -y grain-toolsReplace each placeholder with your own value before saving.
[mcp_servers.grain]
command = "npx"
args = ["-y", "grain-tools"]
[mcp_servers.grain.env]
GRAIN_CONNECTIONS = "<your GRAIN_CONNECTIONS>"
GRAIN_MCP_SAFE_MODE = "<your GRAIN_MCP_SAFE_MODE>"
GRAIN_MAX_ROWS = "<your GRAIN_MAX_ROWS>"Add to ~/.codex/config.toml. Replace each placeholder with your own value before saving.
{
"mcpServers": {
"grain": {
"command": "npx",
"args": [
"-y",
"grain-tools"
],
"env": {
"GRAIN_CONNECTIONS": "<your GRAIN_CONNECTIONS>",
"GRAIN_MCP_SAFE_MODE": "<your GRAIN_MCP_SAFE_MODE>",
"GRAIN_MAX_ROWS": "<your GRAIN_MAX_ROWS>"
}
}
}
}Add to claude_desktop_config.json (Settings → Developer → Edit Config). Replace each placeholder with your own value before saving.
{
"mcpServers": {
"grain": {
"command": "npx",
"args": [
"-y",
"grain-tools"
],
"env": {
"GRAIN_CONNECTIONS": "<your GRAIN_CONNECTIONS>",
"GRAIN_MCP_SAFE_MODE": "<your GRAIN_MCP_SAFE_MODE>",
"GRAIN_MAX_ROWS": "<your GRAIN_MAX_ROWS>"
}
}
}
}Add to ~/.cursor/mcp.json (global) or .cursor/mcp.json (per project). Replace each placeholder with your own value before saving.
{
"servers": {
"grain": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"grain-tools"
],
"env": {
"GRAIN_CONNECTIONS": "<your GRAIN_CONNECTIONS>",
"GRAIN_MCP_SAFE_MODE": "<your GRAIN_MCP_SAFE_MODE>",
"GRAIN_MAX_ROWS": "<your GRAIN_MAX_ROWS>"
}
}
}
}Save as .vscode/mcp.json in your workspace. Replace each placeholder with your own value before saving.
{
"mcpServers": {
"grain": {
"command": "npx",
"args": [
"-y",
"grain-tools"
],
"env": {
"GRAIN_CONNECTIONS": "<your GRAIN_CONNECTIONS>",
"GRAIN_MCP_SAFE_MODE": "<your GRAIN_MCP_SAFE_MODE>",
"GRAIN_MAX_ROWS": "<your GRAIN_MAX_ROWS>"
}
}
}
}Add to ~/.codeium/windsurf/mcp_config.json. Replace each placeholder with your own value before saving.
{
"mcpServers": {
"grain": {
"command": "npx",
"args": [
"-y",
"grain-tools"
],
"env": {
"GRAIN_CONNECTIONS": "<your GRAIN_CONNECTIONS>",
"GRAIN_MCP_SAFE_MODE": "<your GRAIN_MCP_SAFE_MODE>",
"GRAIN_MAX_ROWS": "<your GRAIN_MAX_ROWS>"
}
}
}
}Replace each placeholder with your own value before saving.
Show your rank
Maintain this server? Add the live rank badge to your README — it updates automatically as the leaderboard changes.
[](https://mcptoplist.com/server/io.github.pattrnlabs%2Fgrain)<a href="https://mcptoplist.com/server/io.github.pattrnlabs%2Fgrain"><img src="https://mcptoplist.com/badge/io.github.pattrnlabs%2Fgrain.svg" alt="MCP Toplist: Top 5% of 137,492" /></a>Variants: append ?metric=score or ?metric=stars to the image URL.
Listed on 1 registry
pattrnlabs
Available versions (12)
| Version | Published |
|---|---|
| 0.10.18 | Sep 30, 2026 |
| 0.10.17 | Sep 28, 2026 |
| 0.10.16 | Sep 28, 2026 |
| 0.10.15 | Sep 27, 2026 |
| 0.10.14 | Sep 26, 2026 |
| 0.10.13 | Sep 24, 2026 |
| 0.10.12 | Sep 24, 2026 |
| 0.10.11 | Sep 24, 2026 |
| 0.10.7 | Sep 23, 2026 |
| 0.10.4 | Sep 20, 2026 |
| 0.10.1 | Sep 15, 2026 |
| 0.10.0 | Sep 14, 2026 |
Frequently asked questions
- Who maintains Grain?
- Grain is maintained by pattrnlabs, which publishes 1 MCP server (12 total versions) tracked on MCP Toplist.
- Is Grain listed on the Official MCP Registry?
- Yes — Grain is listed on the Official MCP Registry.
- How many versions does Grain have?
- MCP Toplist tracks 12 versions of Grain, most recently published on Sep 30, 2026.
- Where can I find the source code for Grain?
- The source code for Grain is hosted at github.com/pattrnlabs/grain.
Do you run this server?
Community projects list the MCP servers behind real agents and apps. Publish yours and this page will link to it.