Today, we are excited to announce that the Azure MCP Server has extended its capabilities to include support for Azure Database for PostgreSQL. The Azure MCP Server, introduced in Public Preview last month, leverages the Model Context Protocol (MCP) to allow AI agents to seamlessly interact with various Azure services (including Azure AI Search, Azure Cosmos DB, Azure Storage, and Azure Monitor) to perform context-aware operations such as querying databases and managing cloud resources.
Building on this foundation, the Azure MCP Server now offers a set of tools that AI agents and apps can invoke to interact with Azure Database for PostgreSQL - enabling them to list and query databases, retrieve schema details of tables, and access server configurations and parameters. These capabilities are delivered through the same standardized interface used for other Azure services, making it easier to the adopt the MCP standard for leveraging AI to work with your business data and operations across the Azure ecosystem.
Before we delve into these new tools and explore how to get started with them, let’s take a moment to refresh our understanding of MCP and the Azure MCP Server - what they are, how they work, and why they matter.
MCP architecture and key components
The Model Context Protocol (MCP) is an emerging open protocol designed to integrate AI models with external data sources and services in a scalable, standardized, and secure manner. MCP dictates a client-server architecture with four key components: MCP Host, MCP Client, MCP Server and external data sources, services and APIs that provide the data context required to enhance AI models. To explain briefly, an MCP Host (AI apps and agents) includes an MCP client component that connects to one or more MCP Servers. These servers are lightweight programs that securely interface with external data sources, services and APIs and exposes them to MCP clients in the form of standardized capabilities called tools, resources and prompts.
Learn more: MCP Documentation
What is Azure MCP Server (Preview)?
Azure offers a multitude of cloud services that help developers build robust applications and AI solutions to address business needs. The Azure MCP Server aims to expose these powerful services for agentic usage, allowing AI systems to perform operations that are context-aware of your Azure resources and your business data within them, while ensuring adherence to the Model Context Protocol. It supports a wide range of Azure services and tools including Azure AI Search, Azure Cosmos DB, Azure Storage, Azure Monitor, Azure CLI and Developer CLI extensions. This means that you can empower AI agents, apps and tools to:
- Explore your Azure resources, such as listing and retrieving details on your Azure subscriptions, resource groups, services, databases, and tables.
- Search, query and analyse your data and logs.
- Execute CLI and Azure Developer CLI commands directly, and more!
Learn more: Azure MCP Server GitHub Repository
Introducing new Azure MCP Server tools to interact with Azure Database for PostgreSQL
The Azure MCP Server now includes the following tools that allow AI agents to interact with Azure Database for PostgreSQL flexible servers and your valuable business data residing in these servers, in accordance with the MCP standard:
- List all the Azure Database for PostgreSQL flexible servers in your resource group.
- Retrieve server configurations, including PostgreSQL version, compute, storage and backup settings.
- Access specific server parameter values.
- List databases in your server instance.
- List tables in a database.
- Obtain schema information for tables in your database.
- Execute read queries to retrieve data from your database.
These interactions are secured using Microsoft Entra authentication, which enables seamless, identity-based access to Azure Database for PostgreSQL - eliminating the need for password storage and enhancing overall security.
How are these new tools in the Azure MCP Server different from the standalone MCP Server for Azure Database for PostgreSQL? We have integrated the key capabilities of the Azure Database for PostgreSQL MCP server into the Azure MCP Server, making it easier to connect your agentic apps not only to Azure Database for PostgreSQL but also to other Azure services through one unified and secure interface!
How to get started
Installing and running the Azure MCP Server is quick and easy! In this blog, we’ll guide you through the process using GitHub Copilot in Visual Studio Code to gain meaningful insights from your business data in Azure Database for PostgreSQL.
Pre-requisites
- Install Visual Studio Code.
- Install GitHub Copilot and GitHub Copilot Chat extensions.
- An Azure Database for PostgreSQL flexible server with Microsoft Entra authentication enabled. Ensure that the MCP Server is installed on a system with network connectivity and credentials to connect to Azure Database for PostgreSQL.
Installation and Testing
Watch the following animated graphic or read on for detailed steps!
1. Use this installation link to install the Azure MCP Server for Visual Studio Code.
2. Select “Install Server”.
3. The following configuration is automatically added to the settings.json file.
{
"mcp": {
"inputs": [],
"servers": {
"Azure MCP Server": {
"command": "npx",
"args": [
"-y",
"@azure/mcp@latest",
"server",
"start"
]
}
}
}
}
4. Select the “Copilot” icon in the upper-right corner to open the GitHub Copilot Chat window.
5. Next, choose “Agent mode” from the dropdown at the bottom of the chat input box.
6. Click on “Select Tools” to view the 30+ Tools exposed by the Azure MCP Server.
7. You are now all set to start using the Azure MCP Server tools to interact with your Azure services and data using natural language queries!
Alternatively, you can connect any of your custom MCP clients and agents to the Azure MCP Server by simply configuring it to run the following command to install and execute the server.
npx -y /mcp@latest server start
For more information, see the Azure MCP Server GitHub Repository.
Try it out and share your feedback!
The Azure MCP Server simplifies the process for any AI agent that follows MCP to take advantage of the capabilities of powerful Azure services, now including Azure Database for PostgreSQL. As the Azure MCP Server is currently in Preview, it is continuously evolving with support for new Azure services and tools being added regularly.
We invite you to start using MCP and the Azure MCP server with the new Azure Database for PostgreSQL tools today. Your feedback is invaluable to us, so please share your experience and suggestions. Stay tuned for updates as we continue to enhance the server's capabilities!
Feel free to comment below or write to us with your feedback and queries at AskAzureDBforPostgreSQL@service.microsoft.com.
Updated May 19, 2025
Version 1.0ShreyaAithal
Microsoft
Joined May 24, 2021
Azure Database for PostgreSQL Blog
Follow this blog board to get notified when there's new activity