pgleash MCP
pgleash is a Postgres proxy that enforces security rules on the wire to protect AI agents from dangerous SQL operations. It operates in read-only mode by default, blocks DROP and TRUNCATE statements, prevents unbounded DELETEs, caps row counts, hides specific columns, and logs every query. It functions as an MCP server, providing tools like query, list_tables, and describe_table while ensuring agents never see real database credentials.
Package and access
Local package with source-attributed installation metadata. Koskamo does not execute packages during review.
What you can do with it
- Execute read-only SQL queries safely for AI agents
- List database tables and describe table structures
- Block dangerous SQL operations like DROP or unbounded DELETE
- Log all database queries for audit purposes
Source and maintenance
- Maintenance checked
Packages and installation
Source-provided package data. Koskamo has not executed or live-probed this package.
pgleash 0.1.1
{
"version": "0.1.1",
"transport": "stdio",
"identifier": "pgleash",
"registryType": "npm",
"packageArguments": [
{
"type": "positional",
"value": "mcp"
}
],
"environmentVariables": [
{
"name": "PGLEASH_UPSTREAM",
"format": "string",
"isRequired": true,
"description": "Connection string of the real database, ideally a least-privilege role"
}
]
}Tools
Reported by the attributed source; not independently observed by Koskamo.
Connect from your client
Each snippet configures the same source-provided package; replace placeholders before use.
Cursor
{
"mcpServers": {
"pgleash-mcp": {
"command": "npx",
"args": [
"-y",
"pgleash@0.1.1",
"mcp"
],
"env": {
"PGLEASH_UPSTREAM": "<YOUR_PGLEASH_UPSTREAM>"
}
}
}
}Cline
{
"mcpServers": {
"pgleash-mcp": {
"command": "npx",
"args": [
"-y",
"pgleash@0.1.1",
"mcp"
],
"env": {
"PGLEASH_UPSTREAM": "<YOUR_PGLEASH_UPSTREAM>"
}
}
}
}VS Code
{
"servers": {
"pgleash-mcp": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"pgleash@0.1.1",
"mcp"
],
"env": {
"PGLEASH_UPSTREAM": "<YOUR_PGLEASH_UPSTREAM>"
}
}
}
}Claude Desktop
{
"mcpServers": {
"pgleash-mcp": {
"command": "npx",
"args": [
"-y",
"pgleash@0.1.1",
"mcp"
],
"env": {
"PGLEASH_UPSTREAM": "<YOUR_PGLEASH_UPSTREAM>"
}
}
}
}Let your agent find its tools
Find servers like pgleash MCP from your agent. Add Koskamo once to search the index for endpoints, access requirements, and client setup. Public discovery needs no key.