Edit

Manage Azure App Service with Azure MCP Server

Manage web applications and configure database connections using natural language conversations with AI assistants through the Azure MCP Server.

Azure App Service is a fully managed platform for building, deploying, and scaling web applications. It supports multiple programming languages and frameworks with integrated developer tools. While the Azure portal and Azure CLI are powerful, the Azure MCP Server provides a more intuitive way to interact with your App Service resources through conversational AI.

What is the Azure MCP Server?

The Azure MCP Server enables AI agents and assistants to interact with Azure resources through natural language commands using the Model Context Protocol (MCP). Instead of manually navigating portals or writing scripts, you can describe what you want to accomplish, and the AI assistant uses the Azure MCP Server tools to perform the actions.

For Azure App Service developers, this means you can:

  • Add a database connection for an App Service
  • Diagnose web app issues using built-in detectors
  • List available diagnostic detectors for a web app
  • Retrieve detailed information about web app deployments
  • Retrieve detailed information about web apps
  • Retrieve application settings for an App Service web app
  • Update application settings for an App Service web app

Prerequisites

To use the Azure MCP Server with Azure App Service, you need:

Azure requirements

  • Azure subscription: An active Azure subscription. Create one for free.
  • Azure App Service resources: At least one App Service in your subscription, or permissions to create them.
  • Database resource: An existing database resource to connect to your App Service.
  • Azure permissions: Appropriate roles to perform the operations you want. See Azure Built-in Roles.

MCP client requirements

You need an AI assistant or development environment that supports the Model Context Protocol. Choose one:

AI-powered code editors:

Programmatic integration:

For complete setup instructions, see Get started with Azure MCP Server.

Where can you use Azure MCP Server?

The Azure MCP Server works in three primary contexts:

In AI-powered chat and code editors

Use the Azure MCP Server directly within AI assistants and code editors. As you chat about your Azure resources, the AI assistant automatically invokes Azure MCP Server tools to retrieve information, make changes, or answer questions. This is the most common usage pattern.

Get started with:

In programmatic applications

Integrate the Azure MCP Server into your applications using the MCP SDK. Your app acts as an MCP client and invokes Azure MCP Server tools programmatically. This approach is useful for building custom automation, chatbots, or intelligent applications that need Azure integration.

Get started with:

In self-hosted scenarios

Deploy the Azure MCP Server in your own environment for advanced control, security requirements, or custom modifications. You can run it locally, in containers, or integrate it into existing infrastructure. This pattern suits enterprise scenarios requiring air-gapped environments or custom authentication flows.

Learn how to:

Available tools for Azure App Service

Azure MCP Server provides the following tools for Azure App Service operations:

Tool Description
appservice database add Add a database connection for an app using a connection string.
appservice webapp diagnostic diagnose Run a diagnostic detector on a web app and return the results.
appservice webapp diagnostic list List available diagnostic detectors for a web app.
appservice webapp deployment get Retrieve detailed information about web app deployments.
appservice webapp get Retrieve detailed information about Azure App Service web apps.
appservice webapp settings get-appsettings Retrieve application settings for an App Service web app.
appservice webapp settings update-appsettings Update application settings for an App Service web app.

For detailed information about each tool, including parameters and examples, see Azure App Service tools for Azure MCP Server.

Get started

Ready to use Azure MCP Server with your Azure App Service resources?

  1. Set up your environment: Choose an AI assistant or development tool that supports MCP. For setup and authentication instructions, see the links in the Where can you use Azure MCP Server? section above.

  2. Start exploring: Ask your AI assistant questions about your App Service resources or request operations. Try prompts like:

    • "Add a database connection for 'myapp' to a SQL database named 'mydatabase' with Azure SQL server."
    • "Diagnose web app 'myapp' in resource group 'rg-prod' with detector 'Availability'."
    • "List the diagnostic detectors for web app 'myapp' in resource group 'rg-prod'."
    • "Retrieve details for deployment ID '12345' for web app 'myapp'."
    • "Retrieve details for web app 'myapp'."
    • "Retrieve application settings for web app 'myapp'."
    • "Update app setting 'API_URL' for web app 'myapp' to 'https://api.example.com'."
  3. Learn more: Review the Azure App Service tools reference for all available capabilities and detailed parameter information.

Best practices

When using Azure MCP Server with Azure App Service:

  • Use diagnostics to investigate issues: Run detectors like Availability and CpuAnalysis to troubleshoot app health before making configuration changes.
  • Use version control for settings: Track changes to application settings to prevent configuration drift.
  • Verify settings before applying updates: Use get-appsettings to confirm current settings before making changes.