MCPServers
PostgreSQL Database Manager - MCP server logo

PostgreSQL Database Manager

18
0

Summary

PostgreSQL MCP Server provides a comprehensive set of tools for PostgreSQL database management through the Model Context Protocol. It enables analyzing database configurations, debugging issues, managing schemas, migrating data, and monitoring performance metrics. The server implements connection pooling for efficient resource management, supports various PostgreSQL operations including table creation, data export/import, function management, and Row-Level Security policies. Built with TypeScript and Node.js, it offers platform-specific setup instructions and detailed documentation, making it valuable for developers who need to interact with PostgreSQL databases directly within AI assistant workflows without requiring separate database management tools.

Available Actions(25)

analyze_database

Analyzes PostgreSQL database configuration and performance metrics. Parameters: analysisType (optional string: 'configuration' | 'performance' | 'security')

get_setup_instructions

Provides step-by-step PostgreSQL installation and configuration guidance. Parameters: platform (required string: 'linux' | 'macos' | 'windows'), version (optional string), useCase (optional string: 'development' | 'production')

debug_database

Debug common PostgreSQL issues. Parameters: issue (required string: 'connection' | 'performance' | 'locks' | 'replication'), logLevel (optional string: 'info' | 'debug' | 'trace')

get_schema_info

Get detailed schema information for a database or specific table. Parameters: tableName (optional string: specific table to get info for)

create_table

Create a new table with specified columns. Parameters: tableName (required string), columns (required array of objects)

alter_table

Modify existing tables. Parameters: tableName (required string), operations (required array of objects)

get_enums

Get information about PostgreSQL ENUM types. Parameters: schema (optional string), enumName (optional string)

create_enum

Create a new ENUM type in the database. Parameters: enumName (required string), values (required array of strings), schema (optional string), ifNotExists (optional boolean)

export_table_data

Export table data to JSON or CSV format. Parameters: tableName (required string), outputPath (required string), where (optional string), limit (optional number), format (optional string: 'json' | 'csv')

import_table_data

Import data from JSON or CSV files. Parameters: tableName (required string), inputPath (required string), truncateFirst (optional boolean), format (optional string: 'json' | 'csv'), delimiter (optional string)

copy_between_databases

Copy data between two PostgreSQL databases. Parameters: sourceConnectionString (required string), targetConnectionString (required string), tableName (required string), where (optional string), truncateTarget (optional boolean)

monitor_database

Real-time monitoring of PostgreSQL database. Parameters: includeTables (optional boolean), includeQueries (optional boolean), includeLocks (optional boolean), includeReplication (optional boolean), alertThresholds (optional object)

get_functions

Get information about PostgreSQL functions. Parameters: functionName (optional string), schema (optional string)

create_function

Create or replace a PostgreSQL function. Parameters: functionName (required string), parameters (required string), returnType (required string), functionBody (required string), language (optional string), volatility (optional string), schema (optional string), security (optional string), replace (optional boolean)

drop_function

Drop a PostgreSQL function. Parameters: functionName (required string), parameters (optional string), schema (optional string), ifExists (optional boolean), cascade (optional boolean)

enable_rls

Enable Row-Level Security on a table. Parameters: tableName (required string), schema (optional string)

disable_rls

Disable Row-Level Security on a table. Parameters: tableName (required string), schema (optional string)

create_rls_policy

Create a Row-Level Security policy. Parameters: tableName (required string), policyName (required string), using (required string), check (optional string), schema (optional string), command (optional string), role (optional string), replace (optional boolean)

edit_rls_policy

Edit an existing Row-Level Security policy. Parameters: tableName (required string), policyName (required string), schema (optional string), roles (optional array of strings), using (optional string), check (optional string)

drop_rls_policy

Drop a Row-Level Security policy. Parameters: tableName (required string), policyName (required string), schema (optional string), ifExists (optional boolean)

get_rls_policies

Get Row-Level Security policies. Parameters: tableName (optional string), schema (optional string)

get_triggers

Get information about PostgreSQL triggers. Parameters: tableName (optional string), schema (optional string)

create_trigger

Create a PostgreSQL trigger. Parameters: triggerName (required string), tableName (required string), functionName (required string), schema (optional string), timing (optional string), events (optional array of strings), when (optional string), forEach (optional string), replace (optional boolean)

drop_trigger

Drop a PostgreSQL trigger. Parameters: triggerName (required string), tableName (required string), schema (optional string), ifExists (optional boolean), cascade (optional boolean)

set_trigger_state

Enable or disable a PostgreSQL trigger. Parameters: triggerName (required string), tableName (required string), enable (required boolean), schema (optional string)

Last Updated: April 25, 2025

커뮤니티 리뷰

0.0
0 리뷰
5
0
4
0
3
0
2
0
1
0

아직 리뷰가 없습니다. 첫 번째 리뷰를 작성해 보세요!

대화에 참여하려면 로그인하세요

Coming soon to
HighlightHighlight AI

언어

TypeScript

카테고리

태그