PostgreSQL (hardened, read-only) for Grok
io.github.eszetael/postgres-mcp-hardened
Read-only PostgreSQL over MCP. Writes refused at the parsed SQL, plus a READ ONLY transaction.
client:Grok
transport:stdio
runtime:npm
Install PostgreSQL (hardened, read-only) in Grok
.mcp.json (in your project root)
{
"mcpServers": {
"postgres-mcp-hardened": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"postgres-mcp-hardened"
],
"env": {
"DATABASE_URL": "<DATABASE_URL>",
"MCP_STATEMENT_TIMEOUT": "<MCP_STATEMENT_TIMEOUT>",
"MCP_ALLOW_TABLES": "<MCP_ALLOW_TABLES>",
"MCP_AUDIT_LOG": "<MCP_AUDIT_LOG>"
}
}
}
}
Grok Build reads Claude Code's .mcp.json and Claude Desktop's config unchanged, so a server you have already set up there needs nothing new. The Grok web app and X integration do not take custom servers. Grok docs