Grain for Cursor
io.github.pattrnlabs/grain
Run SQL queries and inspect database schemas through safe, visible MCP tools.
client:Cursor
transport:stdio
runtime:npm
Install Grain in Cursor
~/.cursor/mcp.json · windows: %USERPROFILE%\.cursor\mcp.json
{
"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>"
}
}
}
}
Use .cursor/mcp.json in a project root instead to scope it to that project. Cursor merges both. Cursor docs