#!/bin/sh
set -e
# Default values
CONNECTION_STRING=""
TOOLS_CONFIG=""
# Parse environment variables
if [ -n "$POSTGRES_CONNECTION_STRING" ]; then
CONNECTION_STRING="--connection-string $POSTGRES_CONNECTION_STRING"
fi
if [ -n "$POSTGRES_TOOLS_CONFIG" ]; then
TOOLS_CONFIG="--tools-config $POSTGRES_TOOLS_CONFIG"
fi
# Build the command
CMD="node build/index.js"
if [ -n "$CONNECTION_STRING" ]; then
CMD="$CMD $CONNECTION_STRING"
fi
if [ -n "$TOOLS_CONFIG" ]; then
CMD="$CMD $TOOLS_CONFIG"
fi
# Execute the command
exec $CMD "$@"
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/HenkDz/postgresql-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server