Back to Home
microsoft icon

MCP-Server-and-PostgreSQL-Sample-Retail

by microsoft

Overview

Provides AI assistants with secure, intelligent access to retail sales data through PostgreSQL for sales analytics and product discovery.

Installation

Run Command
docker compose up -d

Environment Variables

  • POSTGRES_DB_HOST
  • POSTGRES_DB_PORT
  • POSTGRES_DB
  • POSTGRES_USER
  • POSTGRES_PASSWORD
  • AZURE_OPENAI_ENDPOINT
  • EMBEDDING_MODEL_DEPLOYMENT_NAME
  • APPLICATIONINSIGHTS_CONNECTION_STRING
  • AZURE_CLIENT_ID
  • AZURE_CLIENT_SECRET
  • AZURE_TENANT_ID
  • PROJECT_ENDPOINT

Security Notes

The `scripts/run-mcp-server.sh` script contains hardcoded PostgreSQL credentials (password 'change-me') and an Application Insights connection string, posing a significant security risk if used directly in production. While the `docker-compose.yml` and Azure deployment (Bicep) use environment variables and managed identities, the presence of this script with hardcoded secrets is a critical vulnerability. Other security features like Row Level Security (RLS) for multi-tenancy, Azure Entra ID integration, input validation (SQL injection prevention), and comprehensive audit logging are well-implemented, but the script flaw lowers the overall score.

Similar Servers

Stats

Interest Score37
Security Score4
Cost ClassMedium
Avg Tokens50
Stars6
Forks10
Last Update2025-12-06

Tags

MCP ServerRetail AnalyticsPostgreSQLAI IntegrationSemantic Search