
azure-samples/azure-postgres-mcp-demo
Developer tools이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기
The Azure Database for PostgreSQL allows you to manage Azure Database for PostgreSQL resources using natural language prompts.
개요
This is a demo repo that will show you how to setup the that enables AI agents to interact with Azure PostgreSQL databases through natural language queries. Supports SQL operations, schema discovery, and data analysis with enterprise-grade security. This server is a part of the . This repo will show you how to enable the Postgres specific features and how to connect it to your project via MCP - 🔍 - Execute queries, manage data, perform analytics - 📊 - Automatic table and column analysis - 🔐 - Azure managed identity and Entra ID authentication - 🎯 - Query databases using conversational AI - 🚀 - One-click Azure deployment with complete infrastructure The system consists of three main components: 1. (Client): Authenticates to the Azure MCP Server using its Managed Identity. 2. (Server): Runs in Azure Container Apps (ACA), using ACA Managed Identity for PostgreSQL access. 3. (Target): Azure Database for PostgreSQL Flexible Server with Entra ID authentication enabled.
README
원문 README의 일부입니다. 원문 보기.
Azure MCP PostgreSQL Server Demo
This is a demo repo that will show you how to setup the Azure Database for Postgres MCP server that enables AI agents to interact with Azure PostgreSQL databases through natural language queries. Supports SQL operations, schema discovery, and data analysis with enterprise-grade security.
This server is a part of the Azure MCP Server. This repo will show you how to enable the Postgres specific features and how to connect it to your Foundry project via MCP
Features
- 🔍 SQL Operations - Execute queries, manage data, perform analytics
- 📊 Schema Discovery - Automatic table and column analysis
- 🔐 Enterprise Security - Azure managed identity and Entra ID authentication
- 🎯 Natural Language - Query databases using conversational AI
- 🚀 Easy Deployment - One-click Azure deployment with complete infrastructure
Components
The system consists of three main components:
-
Foundry Agent (Client): Authenticates to the Azure MCP Server using its Managed Identity.
-
Azure MCP PostgreSQL Server (Server): Runs in Azure Container Apps (ACA), using ACA Managed Identity for PostgreSQL access.
-
PostgreSQL Database (Target): Azure Database for PostgreSQL Flexible Server with Entra ID authentication enabled.
Identity Separation: Two separate managed identities are used - the client MI (Foundry) authenticates to the MCP Server, while the MCP Server uses its own ACA MI to access PostgreSQL, ensuring proper security isolation.
Prerequisites
Quick start deployment
Deploy the complete Azure MCP PostgreSQL Server infrastructure by using Azure Developer CLI (azd):
Step 1: Deploy with azd up
The fastest way to get started is by using the automated deployment script.
-
First, clone the repo:
# Clone the repository git clone https://github.com/Azure-Samples/azure-postgres-mcp-demo cd azure-postgres-mcp-demo -
Open infra/main.parameters.json and update these 2 values
Parameter Description postgresResourceIdResource ID of the Azure Database for PostgreSQL Flexible Server you want to connect to aifProjectResourceIdResource ID of the Azure Foundry project you want to use
설치
This server does not publish a one-line install command.
Open the repository installation guide MCP 초보자라면? mcpskill.org 가이드부터 시작하세요 →