Created
June 14, 2025 01:02
-
-
Save ryanleecode/82198f49a8d119603caa4bdb3b271d47 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# PostgreSQL MCP Server startup script | |
# This script handles Doppler secret injection and Deno execution | |
# Get the directory where this script is located | |
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" | |
# Environment variables that Deno needs access to | |
ALLOWED_ENV="USER,PG*,NODE_PG_FORCE_NATIVE,TIMESCALE_DATABASE_URL" | |
# MCP PostgreSQL server package | |
MCP_PACKAGE="npm:@modelcontextprotocol/server-postgres" | |
# Deno command with permissions | |
DENO_CMD="deno run --quiet --allow-net --allow-env=\"$ALLOWED_ENV\" $MCP_PACKAGE \$TIMESCALE_DATABASE_URL" | |
# Execute with Doppler for secret injection | |
exec doppler run \ | |
--scope="$SCRIPT_DIR" \ | |
--only-secrets=TIMESCALE_DATABASE_URL \ | |
--command="$DENO_CMD" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment