AzPolicyMCP MCP Server

Simple MCP server to help create Azure Policies for any resource type.

Remote serverstreamable-httpPython

What is the AzPolicyMCP MCP Server?

Simple MCP server to help create Azure Policies for any resource type.

What you get

This document outlines the requirements for an Azure Policy Model Context Protocol (MCP) Server. The primary goal of this server is to empower Large Language Models (LLMs) to assist users in generating, validating, and deploying Azure custom policies effectively. It solves the problem of LLMs generating potentially incorrect or non-compliant Azure policy JSON by providing tools to fetch relevant built-in policies as examples, validate the structure of generated policies against the official schema, and manage policy assignments via the Azure REST API. It also aims to assist the LLM in selecting the

More MCP options

Compare MCP servers by category, or browse hosted MCP servers if you prefer an endpoint over a local process.

Maintainer setup documentation.

Recorded tools

Check the linked publisher documentation and your connected client's tool list. Names and availability can vary with the server version and account permissions.

ToolWhat it does
server.pyMain FastMCP application definition, registers tools (get_builtin_policies, get_policies_in_category, get_policy_content, deploy_policy_assignment, query_policy_compliance, delete_policy_assignment, and create_policy_def

Configuration

VariableDescriptionRequired
TENANT_IDConfiguration value read at startup.Optional
CLIENT_IDConfiguration value read at startup.Optional
CLIENT_SECRETCredential the server authenticates with.Yes

Example prompts to try

  • “Use AzPolicyMCP to TENANT ID.”
  • “Use AzPolicyMCP to CLIENT ID.”
  • “Use AzPolicyMCP to CLIENT SECRET.”

Frequently asked questions

It enables LLMs to assist users in generating, validating, and deploying accurate Azure custom policies, preventing incorrect policy JSON.