What does it mean to extend Azure SRE Agent with MCP servers, Azure Monitor and Application Insights?
Imagine it is 2 a.m. and your web app starts returning HTTP 500. Azure Monitor fires an alert, an email lands in a shared mailbox, and nobody reads it until morning. By then the logs have rolled, the person who knows the app is on leave, and the first hour of the day goes on working out what happened.
Now imagine the same alert lands in front of an AI agent that already knows your app. It picks the alert up within a minute, reads the right runbook, checks the code and the metrics, and is waiting for you with a summary and one question when you wake up. That is what this article builds.
In Articles 1 to 3 the agent only worked when someone opened a chat. In this article we give az-sre-agent three new things, all from Microsoft:
- An MCP server connector – the Microsoft Learn MCP server, so the agent can search and quote official Microsoft documentation while it investigates.
- An Application Insights connector – a managed, read-only telemetry connector for the demo app’s requests, exceptions and dependencies.
- Azure Monitor as the incident platform – so a metric alert on the app starts an investigation on its own, routed to the
app-service-healthcustom agent from Article 3.
Everything is done in the sre.azure.com portal and the Azure portal, on the same sre-demo-counter-pks demo app as before. I kept to Microsoft services only; third-party connectors such as Datadog, PagerDuty or ServiceNow appear in the catalogue but are out of scope here.
What the agent can already do without any connector
It is worth knowing this before you add anything. With its managed identity and the resource group scope added in Article 2, the agent can already query Application Insights, Log Analytics, Azure Monitor metrics, Azure Resource Graph and run read-only Azure CLI commands. Connectors are for three cases:
| Case | Example | Connector type |
|---|---|---|
| Data or tools outside the agent’s default reach | Microsoft Learn docs, a team’s own internal API | MCP server |
| A specific telemetry source you want pinned and named | One Application Insights resource or Log Analytics workspace | Telemetry (managed) |
| Starting work automatically from alerts | Azure Monitor alerts on your resources | Incident platform |
Where things stand (December 2026)
Connectors, MCP servers and the Azure Monitor incident platform are part of the generally available portal. The managed telemetry connectors (Application Insights, Log Analytics) are marked preview. A few things in my portal differed from Microsoft Learn:
- The docs say connecting Azure Monitor creates a default Sev3 response plan. In my portal no default plan was created – the Triggers & response plans tab was empty until I made one.
- The docs mention a limit of 80 tools across all connectors. The portal’s tool picker instead warns that the runtime and selected model may limit which tools are available, without giving a number.
Step 1 – Open the connector catalogue
Open sre.azure.com, select your agent and go to Build + configure → Extensions → Connectors. Select Add connector. The wizard has four steps: Choose a connector → Set up connector → Review + test connection → Select tools. The catalogue has six tabs: Telemetry, Notification, MCP, Incidents, Deployment and Other.
The Telemetry tab lists the Microsoft options first: Azure Data Explorer (via the Azure MCP server), Log Analytics Workspace and Application Insights (both read-only), and Azure Managed Grafana (through Grafana’s own MCP endpoint, using the agent’s managed identity).

Figure 1: The Telemetry tab of the connector catalogue
The MCP tab has two cards: MCP server (“User provided connector” – any MCP server you point it at) and GitHub (the GitHub MCP server we met in Article 2).

Figure 2: The MCP tab – bring your own MCP server, or use GitHub
Who can do this: only users with the SRE Agent Administrator role can add or change connectors. Standard User and Reader can see them but not edit them.
Step 2 – Add the Microsoft Learn MCP server
The Microsoft Learn MCP server is a free, public, read-only MCP endpoint over Microsoft’s official documentation. It is a good first connector because it needs no secret and can’t change anything.
2.1 Set up the connector
Select MCP server and fill in the form:
| Field | Value |
|---|---|
| Name | microsoft-learn |
| Connection type | Streamable-HTTP (the other option, Stdio, runs a local command) |
| URL | https://learn.microsoft.com/api/mcp |
| Authentication method | No authentication (other choices: Bearer token, Managed identity, OAuth) |
| Custom headers | Leave empty |

Figure 3: Set up MCP server connector – four authentication methods are available
Which authentication method to pick for your own servers:
| Method | Use when |
|---|---|
| No authentication | Public, read-only servers such as Microsoft Learn |
| Bearer token | The server takes an API key or PAT (for example GitHub). The token is stored in the connector |
| Managed identity | The server is protected by Microsoft Entra ID and you want no secret at all – the best choice for your own Azure-hosted MCP servers |
| OAuth | The server needs a user sign-in flow |
2.2 Test the connection and pick tools
Review + test connection calls the server and lists its tools. My first test returned a 504; selecting test again worked. On Select tools the server offered three tools, all selected by default:
microsoft-learn_microsoft_docs_search– search Learn and return up to 10 content chunksmicrosoft-learn_microsoft_code_sample_search– find official code samplesmicrosoft-learn_microsoft_docs_fetch– fetch a full Learn page as markdown

Figure 4: Select tools – the three Microsoft Learn MCP tools
Select Add connector. The connector shows Connected with “3 tools selected for the default agent”.

Figure 5: The Microsoft Learn MCP server, connected
2.3 If saving fails with an MFA error
My first save failed with this message:
Resource 'microsoft-learn' was disallowed by Azure: ... without authenticating through MFA
My tenant has a policy that requires MFA for write operations, and the sre.azure.com sign-in didn’t carry the MFA claim. What fixed it for me:
- Open portal.azure.com in a second tab. The Azure portal asks for MFA – approve it in Microsoft Authenticator.
- Back in sre.azure.com, open the account menu, choose Sign in with a different account and pick the same account. This refreshes the token, now with MFA.
- Check the directory is still the right one (mine had switched back to another tenant), then retry the save.
Some “missing permission” notices on the Connectors and Incidents pages were stale UI hints – the writes worked after the token refresh.
Step 3 – Add the Application Insights connector
Back on the catalogue, select Telemetry → Application Insights. This is a managed connector: no URL or token, just pick the resource.
| Field | Value |
|---|---|
| Name | appinsights-sre-demo-counter |
| Subscription / Resource group | The demo subscription and rg-sre-agent-demo |
| Application Insights resource | sre-demo-counter-pks (or use Enter a resource ID) |
| Managed identity | The agent’s own identity |
Read the notice under the resource before saving: “When you save, the agent is granted the Reader role on” the resource group. The connector assigns that role for you.

Figure 6: Set up Application Insights connector – saving grants the agent Reader on the resource group
After saving, the Connectors page groups connectors by category. Mine now showed one Telemetry and one MCP connector, both Connected.

Figure 7: Both connectors connected
Why add it if the agent can already query App Insights? The connector pins one named resource, so the agent doesn’t have to discover it, and it is read-only by design. In a subscription with many App Insights resources this saves the agent time and tokens, and you can see in one place which telemetry the agent is meant to use.
Step 4 – Connect Azure Monitor as the incident platform
Connectors give the agent more to work with. The incident platform decides when it works. Go to Incidents → Connect an incident platform. The choices are PagerDuty, ServiceNow and Azure Monitor. Azure Monitor needs no fields: “Azure Monitor will be configured automatically based on your agent’s scope.” Select it and Save.

Figure 8: Connect incident platform – Azure Monitor needs no settings
What happens behind the scenes, according to Microsoft Learn:
- The agent polls Azure Monitor for alerts on its managed resources every 1 minute and acknowledges the ones it picks up.
- Each alert becomes an incident thread with a severity prefix in the title, such as [Sev2].
- A recurring alert is merged into the existing thread instead of starting a new investigation (the reinvestigation cooldown, 3 hours by default).
- The agent’s identity is given Monitoring Contributor so it can acknowledge and close alerts.
- Only one incident platform can be connected at a time. Connecting PagerDuty later would replace Azure Monitor.
Step 5 – Create a response plan
A response plan decides which alerts the agent handles, which custom agent handles them and how much freedom it has. On Incidents → Triggers & response plans, select Create a response plan:
| Field | My value |
|---|---|
| Name | counter-app-http5xx |
| Severity | Sev2 (multi-select Sev0–Sev4) |
| Title contains / does not contain | Optional keyword filters – left empty |
| Response subagent | app-service-health (the custom agent from Article 3; the default is the main agent) |
| Agent autonomy level | Review (the default is Autonomous) |
| Alert reinvestigation cooldown | Enabled, 3 hours |

Figure 9: Response plan – custom agent, Review mode and a 3-hour cooldown
The second step, Incidents preview, shows which existing alerts would match. Select Create, and the plan appears with status On.

Figure 10: Azure Monitor is connected and the response plan is on
Review vs Autonomous: in Review mode the agent investigates and proposes, but anything that changes a resource waits for a human. Autonomous lets it act on its own within its permissions. Start every plan in Review.
Step 6 – Create the Azure Monitor alert
The agent only sees alerts that exist, so the app needs an alert rule. In the Azure portal, open sre-demo-counter-pks → Alerts → Create → Alert rule:
| Setting | Value |
|---|---|
| Signal | Http5xx (metric) |
| Condition | Total greater than 0 |
| Lookback period / Check every | 5 minutes / 1 minute |
| Severity | 2 – Warning (matches the Sev2 response plan) |
| Alert rule name | sre-demo-counter-pks-http5xx |
| Description | Fires when the counter demo app returns any HTTP 5xx response. Picked up by Azure SRE Agent (response plan counter-app-http5xx). |
| Automatically resolve alerts | On |
| Action group | None – the agent polls Azure Monitor itself |
The review page shows the price: US$0.10 per month for one metric condition.

Figure 11: Alert rule review – Http5xx greater than 0, US$0.10/month
The same rule from the Azure CLI, if you prefer:
az monitor metrics alert create \ --name sre-demo-counter-pks-http5xx \ --resource-group rg-sre-agent-demo \ --scopes $(az webapp show -g rg-sre-agent-demo -n sre-demo-counter-pks --query id -o tsv) \ --condition "total Http5xx > 0" \ --window-size 5m --evaluation-frequency 1m \ --severity 2 --auto-mitigate true \ --description "Fires when the counter demo app returns any HTTP 5xx response."
Step 7 – Break the app and watch the agent pick it up
As in Articles 2 and 3, the demo app fails on purpose when the app setting INJECT_ERROR=1 is set: the sixth click on Increment throws an exception and returns HTTP 500. I added the setting under Environment variables → App settings, applied it and clicked Increment until the app returned HTTP 500.
Tip: new App Service apps get a default host name with a random suffix and region, such as <app>-<hash>.centralus-01.azurewebsites.net. The short <app>.azurewebsites.net name didn’t resolve for my app. Copy the Default domain from the app’s Overview page.
7.1 The incident appears
The alert fired at 3:59 PM (UTC). By 4:00 PM the agent had acknowledged it and opened an incident. The Incidents tab shows the alert status, the agent status, the matched response plan and how many times the alert has fired.

Figure 12: The Sev2 alert, matched to counter-app-http5xx and waiting for input
Opening the incident shows the thread [Sev2] sre-demo-counter-pks-http5xx. The first card holds the alert details: platform AzMonitor, response plan counter-app-http5xx, the monitored resource and the description from the alert rule.

Figure 13: The alert as the agent received it
7.2 What the agent did, in order
- Said what it would do: check the alert against the app’s current state, recent deployments and last-hour metrics, read-only, and decide whether the 5xx was expected demo behaviour or a wider outage.
- Loaded the
counter-app-http500skill from Article 3 – the runbook I wrote for exactly this failure. - Read two memory files:
counter-demo-operational-context.md(“INJECT_ERROR=1 is set on purpose during demos”) andoverview.md. - Loaded the built-in
web_app_downskill. - Stated, correctly, that memory alone doesn’t prove the cause, and that it would verify the live setting and deployed code first.
- Ran
az webapp deployment source show(Safe) and readProgram.csfrom the connected GitHub repository. - Called Monitor Metrics Definitions on the built-in
system-mcp-monitorserver to find the app’s metrics.

Figure 14: Skill, memory and a first authorization request in the incident thread
Note the system-mcp-monitor label in Figure 15. The agent’s own Azure Monitor tools are delivered through a built-in MCP server – the same protocol as the Microsoft Learn connector, just managed by Microsoft.

Figure 15: A tool call on the built-in Azure Monitor MCP server
7.3 Review mode stops at the right place
Two commands needed more than the agent’s Reader role: az webapp show (labelled Safe) and az webapp config appsettings list (labelled Medium risk, because app settings can hold secrets). For each, the agent showed an Authorization required card. Grant permissions would re-run that one command with my credentials (on-behalf-of, OBO); Cancel declines it.

Figure 16: The investigation pauses for a human – Grant permissions or Cancel
I left both requests unanswered for this article, so the incident shows Pending user input. That is the behaviour I want from an unattended agent at 2 a.m.: it did everything it could with read-only access, then stopped and waited instead of reading app settings with someone else’s credentials.
7.4 Restore the app
When you’re done, remove INJECT_ERROR under Environment variables → App settings (delete the row, then Apply → Confirm). Because the alert rule auto-resolves, the alert closes on its own once the 5xx count drops back to zero. Or from the CLI:
az webapp config appsettings delete -g rg-sre-agent-demo -n sre-demo-counter-pks --setting-names INJECT_ERROR
Step 8 – Use the connectors in a chat
In this incident the agent went to the code, memory and metrics first, and didn’t need the two new connectors. That is fine – the agent picks tools by relevance. You can point it at a connector explicitly in any chat. Two prompts worth trying:
Search Microsoft Learn for the recommended way to stop an App Serviceapp from returning HTTP 500 after a bad app setting, and cite the page.Using the Application Insights connector, show failed requests andexceptions for sre-demo-counter-pks in the last 24 hours.
The first prompt uses the microsoft-learn_microsoft_docs_search tool and should come back with links to learn.microsoft.com. The second uses the App Insights connector and returns a table or chart. Each chat counts as active usage, so keep test prompts short.
The other direction – drive the agent from your MCP client
Everything above adds MCP servers to the agent. It also works the other way: the Azure MCP Server includes SRE Agent tools (prefixed sreagent_), so you can start an investigation, ask a question or read an incident thread from VS Code with GitHub Copilot, the Copilot CLI, Claude Code or any other MCP client, without opening sre.azure.com.
- Permissions: the signed-in user needs Reader on the agent resource (control plane) and the SRE Agent Administrator role on the agent (data plane).
- Watch out for
investigate_yolo. This command auto-approves every approval gate in the investigation, including the kind of OBO request we saw in Step 7.3. Don’t enable it for an agent with write access, and don’t give it to an MCP client that runs unattended.
Governance and security
- Connectors change RBAC. The Application Insights connector grants the agent Reader on the resource group, and connecting Azure Monitor grants Monitoring Contributor. Check the agent’s identity under Access control (IAM) after setup so there are no surprises in an access review.
- Only SRE Agent Administrators manage connectors. Keep that role to a small group; anyone with it can point the agent at a new MCP server.
- Treat every MCP server as code you run. Tool descriptions and results go into the agent’s context. Add servers you trust, prefer read-only tools, and untick tools you don’t need on the Select tools step.
- Prefer managed identity over bearer tokens. A token stored in a connector works for everyone who can use the agent. For your own Azure-hosted MCP servers, use Entra ID with the agent’s managed identity.
- Start response plans in Review mode. As Step 7 showed, Review mode plus a Reader identity means an alert at 2 a.m. can’t change anything without a person.
- OBO grants run as you. Read the command and its risk label before you select Grant permissions. App settings can contain connection strings.
- Hooks and Teams approvals – for hard rules and approvals in Microsoft Teams, see Article 5.
Pricing and limitations
| Item | Cost |
|---|---|
| Azure SRE Agent – always-on flow | 4 AAU per hour, about US$0.40/hour in Central US. My agent’s trial waives this until 1 January 2027 |
| Azure SRE Agent – active flow | Token-based AAU per chat, task or incident investigation. Each Azure Monitor alert that starts an investigation is active usage |
| Connectors and the Azure Monitor link | No separate charge |
| Microsoft Learn MCP server | Free |
| Azure Monitor metric alert rule | US$0.10 per month for one metric condition |
| Application Insights | Normal ingestion pricing for the app’s telemetry – the connector only reads |
Cost tip: the alert reinvestigation cooldown matters. A flapping alert without it can start many investigations an hour. Keep the 3-hour default, filter response plans by severity and title, and check Build + configure → Monitor → Agent consumption in the first week.
Limitations I hit or noted:
- Only one incident platform per agent – Azure Monitor or PagerDuty or ServiceNow.
- No default response plan was created when I connected Azure Monitor, although the docs say one is.
- Managed telemetry connectors are in preview.
- The number of tools the agent can use at once depends on the runtime and model (the docs mention 80 across connectors), so untick tools you don’t need.
- Writes from sre.azure.com can fail in tenants that require MFA for writes; refresh the token as in Step 2.3.
- The first connection test to an MCP server can time out (504); retry before changing settings.
My recommendation
Add Azure Monitor first. It is the change that turns the agent from a chat tool into something that works while you sleep, and the cost is one metric alert per signal. Route alerts to a custom agent that already has the right skill and memory (that is why Article 3 came first), and keep the plan in Review mode until you’ve read a few of its investigations. Then add connectors where the agent is missing something: Microsoft Learn for documentation, a pinned App Insights or Log Analytics resource when there are many to choose from, and your own MCP servers – with managed identity – for internal tools.
Summary
In this article, we learnt how to extend Azure SRE Agent with the Microsoft Learn MCP server and an Application Insights connector, connect Azure Monitor as the incident platform, and watch a response plan route a real HTTP 5xx alert to a custom agent that investigated it in Review mode.
| Topic | What to Remember |
|---|---|
| Where | sre.azure.com → your agent → Build + configure → Extensions → Connectors |
| Wizard | Choose → Set up → Review + test connection → Select tools |
| MCP server connector | Streamable-HTTP or Stdio; auth: none, bearer token, managed identity or OAuth |
| Microsoft Learn MCP | https://learn.microsoft.com/api/mcp, no auth, three read-only tools |
| App Insights connector | Managed, read-only (preview); saving grants the agent Reader on the resource group |
| Azure Monitor | Incidents → Connect an incident platform; polls every minute; one platform per agent |
| Response plan | Severity and title filters, custom agent, Review or Autonomous, reinvestigation cooldown |
| Alert | Http5xx > 0 metric alert, about US$0.10/month; no action group needed |
| Built-in MCP | The agent’s own Azure Monitor tools run on system-mcp-monitor |
| Reverse direction | Azure MCP Server sreagent_ tools; avoid investigate_yolo |
| Security | Connectors add RBAC roles; SRE Agent Administrator manages connectors; prefer managed identity |
Do you like this article? If you want to get more updates about these kind of articles, you can join my Learning Groups
Discover more from Praveen Kumar Sreeram's Blog
Subscribe to get the latest posts sent to your email.