Skip to main content
Glama

PostgreSQL MCP Server

by melihbirim

execute_query

Run read-only SQL queries on PostgreSQL databases to retrieve data, analyze schemas, or explain query execution plans securely.

Instructions

Execute a read-only SQL query (SELECT, SHOW, DESCRIBE, EXPLAIN, WITH statements only)

Input Schema

NameRequiredDescriptionDefault
limitNoMaximum number of rows to return (default: 100)
queryYesSQL query to execute (read-only operations only)

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "limit": { "description": "Maximum number of rows to return (default: 100)", "type": "number" }, "query": { "description": "SQL query to execute (read-only operations only)", "type": "string" } }, "required": [ "query" ], "type": "object" }
Install Server

Other Tools from PostgreSQL MCP Server

Related Tools

    MCP directory API

    We provide all the information about MCP servers via our MCP API.

    curl -X GET 'https://glama.ai/api/mcp/v1/servers/melihbirim/pg-mcp'

    If you have feedback or need assistance with the MCP directory API, please join our Discord server