Skip to main content
Glama

Postgres MCP Server

permissions

Manage PostgreSQL database permissions by creating users and roles, granting or revoking privileges, and modifying access controls for databases, schemas, and tables.

Instructions

Database permissions management: users, roles, grants, privileges

Input Schema

NameRequiredDescriptionDefault
attributesNoUser/role attributes
databaseNoDatabase name for grants
grantOptionNoGrant with GRANT OPTION
operationYesPermission operation to perform
passwordNoPassword for user creation/modification
privilegesNoPrivileges to grant/revoke
rolenameNoRole name for role operations
schemaNoSchema name for grants
tableNoTable name for grants
usernameNoUsername for user operations

Input Schema (JSON Schema)

{ "properties": { "attributes": { "description": "User/role attributes", "properties": { "bypassrls": { "description": "Bypass row level security", "type": "boolean" }, "createdb": { "description": "Create database privilege", "type": "boolean" }, "createrole": { "description": "Create role privilege", "type": "boolean" }, "inherit": { "description": "Inherit privileges", "type": "boolean" }, "login": { "description": "Login privilege", "type": "boolean" }, "replication": { "description": "Replication privilege", "type": "boolean" }, "superuser": { "description": "Superuser privilege", "type": "boolean" } }, "type": "object" }, "database": { "description": "Database name for grants", "type": "string" }, "grantOption": { "default": false, "description": "Grant with GRANT OPTION", "type": "boolean" }, "operation": { "description": "Permission operation to perform", "enum": [ "list_users", "list_roles", "list_grants", "list_privileges", "create_user", "create_role", "drop_user", "drop_role", "grant_role", "revoke_role", "grant_privilege", "revoke_privilege", "alter_user", "alter_role", "check_permissions", "grant_all_privileges" ], "type": "string" }, "password": { "description": "Password for user creation/modification", "type": "string" }, "privileges": { "description": "Privileges to grant/revoke", "items": { "enum": [ "SELECT", "INSERT", "UPDATE", "DELETE", "TRUNCATE", "REFERENCES", "TRIGGER", "CREATE", "CONNECT", "TEMPORARY", "EXECUTE", "USAGE", "ALL" ], "type": "string" }, "type": "array" }, "rolename": { "description": "Role name for role operations", "type": "string" }, "schema": { "description": "Schema name for grants", "type": "string" }, "table": { "description": "Table name for grants", "type": "string" }, "username": { "description": "Username for user operations", "type": "string" } }, "required": [ "operation" ], "type": "object" }

Other Tools from Postgres 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/itsalfredakku/postgres-mcp'

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