Grain SQL MCP
Grain is a local analytics tool that allows AI agents to run SQL queries and inspect database schemas via MCP. It keeps credentials and data on the user's machine, offering safe mode to prevent write operations by default, and supports integration with editors like VS Code and Cursor.
Package and access
Local package with source-attributed installation metadata. Koskamo does not execute packages during review.
Checks and signals
Each line is separate evidence, not a trust score.
- Popularity 3 GitHub stars
What you can do with it
- Run SQL queries against databases from an AI agent
- Inspect database schemas safely
- View exact SQL statements agents execute
- Connect agents to databases without exposing passwords in chat
Source and maintenance
- Last repository push
- Latest release
- v0.10.46
- Maintenance checked
Packages and installation
Source-provided package data. Koskamo has not executed or live-probed this package.
grain-tools 0.10.45
{
"version": "0.10.45",
"transport": "stdio",
"identifier": "grain-tools",
"runtimeHint": "npx",
"registryType": "npm",
"registryBaseUrl": "https://registry.npmjs.org",
"packageArguments": [
{
"name": "--stdio",
"type": "named",
"description": "Run Grain using stdio transport for local MCP clients."
}
],
"runtimeArguments": [
{
"type": "positional",
"value": "-y"
}
],
"environmentVariables": [
{
"name": "GRAIN_CONNECTIONS",
"format": "string",
"description": "JSON array of Grain connection profiles for headless use."
},
{
"name": "GRAIN_MCP_SAFE_MODE",
"value": "true",
"format": "boolean",
"description": "Set to false to allow mutating SQL. Defaults to true."
},
{
"name": "GRAIN_MAX_ROWS",
"value": "10000",
"format": "number",
"description": "Maximum rows returned by query tools. Defaults to 10000."
}
]
}Tools
Reported by the attributed source; not independently observed by Koskamo.
Maintenance history
Public check and source-refresh events. Editorial and ownership records remain private.
- · repository · passed · metadata changed · updated
- · backfill · recorded · Pre-expansion baseline; unobserved rich metadata remains unknown
Connect from your client
Each snippet configures the same source-provided package; replace placeholders before use.
Cursor
{
"mcpServers": {
"grain-sql-mcp": {
"command": "npx",
"args": [
"-y",
"grain-tools@0.10.45"
],
"env": {
"GRAIN_CONNECTIONS": "<YOUR_GRAIN_CONNECTIONS>",
"GRAIN_MCP_SAFE_MODE": "<YOUR_GRAIN_MCP_SAFE_MODE>",
"GRAIN_MAX_ROWS": "<YOUR_GRAIN_MAX_ROWS>"
}
}
}
}Cline
{
"mcpServers": {
"grain-sql-mcp": {
"command": "npx",
"args": [
"-y",
"grain-tools@0.10.45"
],
"env": {
"GRAIN_CONNECTIONS": "<YOUR_GRAIN_CONNECTIONS>",
"GRAIN_MCP_SAFE_MODE": "<YOUR_GRAIN_MCP_SAFE_MODE>",
"GRAIN_MAX_ROWS": "<YOUR_GRAIN_MAX_ROWS>"
}
}
}
}VS Code
{
"servers": {
"grain-sql-mcp": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"grain-tools@0.10.45"
],
"env": {
"GRAIN_CONNECTIONS": "<YOUR_GRAIN_CONNECTIONS>",
"GRAIN_MCP_SAFE_MODE": "<YOUR_GRAIN_MCP_SAFE_MODE>",
"GRAIN_MAX_ROWS": "<YOUR_GRAIN_MAX_ROWS>"
}
}
}
}Claude Desktop
{
"mcpServers": {
"grain-sql-mcp": {
"command": "npx",
"args": [
"-y",
"grain-tools@0.10.45"
],
"env": {
"GRAIN_CONNECTIONS": "<YOUR_GRAIN_CONNECTIONS>",
"GRAIN_MCP_SAFE_MODE": "<YOUR_GRAIN_MCP_SAFE_MODE>",
"GRAIN_MAX_ROWS": "<YOUR_GRAIN_MAX_ROWS>"
}
}
}
}Let your agent find its tools
Find servers like Grain SQL MCP from your agent. Add Koskamo once to search the index for endpoints, access requirements, and client setup. Public discovery needs no key.