
A Model Context Protocol server built on Huawei Cloud services that enables AI assistants to operate Huawei Cloud resources within conversational workflows, supporting ECS, OBS, GaussDB, and other cloud products.

A FastMCP server that retrieves Azure built-in policies as examples and manages custom policy definitions and assignments through the Azure REST API.
AzPolicyMCP Azure Policy Server is cataloged as an MCP server attributed to jitha-afk. A FastMCP server that retrieves Azure built-in policies as examples and manages custom policy definitions and assignments through the Azure REST API. It is categorized under cloud devops. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.
Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.
Catalog license label: Not specified. Check the source repository's current license and terms before using, modifying or distributing this software.
能力定义尚未审核。未核验的采集内容不会作为可信接口展示。
暂无可展示的已审核记录。这不表示上游不支持此能力。
暂无可展示的已审核记录。这不表示上游不支持此能力。
暂无可展示的已审核记录。这不表示上游不支持此能力。
Email delivery is not connected. This page does not collect email addresses or create subscriptions.
Browse the registry for current listings instead.
Reviews for AzPolicyMCP Azure Policy Server are not available yet
Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.
No, the verify_policy_structure tool is temporarily disabled and currently commented out due to runtime errors or validation logic issues.
The server uses the msal library and requires TENANT_ID, CLIENT_ID, and CLIENT_SECRET environment variables for tools like deploy_policy_assignment, query_policy_compliance, delete_policy_assignment, and create_policy_definition.
README.md · e30dc081363c · 采集于 2026-11-13 10:52:28 UTC
保留上游原文,不做 AI 改写。为安全起见过滤脚本、表单和不安全链接。
当前显示最后一次成功采集的文档快照,请以来源页面为准。
Simple MCP server to help create Azure Policies for any resource type.
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 appropriate policy effect based on user intent (audit/deny vs. remediation). The target user is an LLM application (like a chatbot or code assistant) that needs to interact with Azure Policy definitions and assignments. The value lies in providing a standardized, reliable interface for LLMs to create, validate, and deploy accurate and compliant Azure policies based on user requests.
get_builtin_policies Tool (Implemented):
Azure/azure-policy GitHub repository. Can optionally filter categories by name.built-in-policies/policyDefinitions path. Returns a list of category names and their corresponding paths.get_policies_in_category Tool (Implemented):
get_builtin_policies. Can optionally filter policies by filename.get_policy_content Tool (Implemented):
get_policies_in_category.verify_policy_structure Tool (Temporarily Disabled):
schemas/policyDefinition.json) using the jsonschema library. Returns a success message or validation errors. (Currently commented out in server.py due to issues.)deploy_policy_assignment Tool (Implemented):
TENANT_ID, CLIENT_ID, CLIENT_SECRET) to acquire an access token using MSAL. Constructs and executes the appropriate Azure REST API call (PUT) to the providers/Microsoft.Authorization/policyAssignments endpoint.query_policy_compliance Tool (Implemented):
delete_policy_assignment Tool (Implemented):
create_policy_definition Tool (Implemented):
TENANT_ID, CLIENT_ID, CLIENT_SECRET) to acquire an access token using MSAL. Constructs and executes the appropriate Azure REST API call (PUT) to the providers/Microsoft.Authorization/policyDefinitions endpoint.Intent Identification Support (New Requirement):
Audit, Deny) or to remediate existing ones (using effects like DeployIfNotExists, Modify).policyRule.create_policy_prompt (Feature 9) to explicitly ask the LLM to clarify intent with the user.(Optional Enhancement) azure_policy_schema Resource:
* What it does: Exposes the official Azure Policy JSON schema via an MCP resource URI (e.g., schema://azurepolicy).
* Why it's important: Allows the LLM client to fetch the schema definition directly, enabling it to better understand the target structure before attempting generation.
* How it works: This is already implemented in the current version.
(Optional Enhancement) azure_resource_types Resource:
* What it does: Provides a list of common Azure resource provider namespaces and types via an MCP resource URI (e.g., types://azure/resources).
* Why it's important: Helps the LLM use the correct identifiers for resource types within policy rules.
(Optional Enhancement) create_policy_prompt Prompt:
* What it does: Defines a reusable MCP prompt template to guide the LLM in the policy creation process, including intent clarification.
* Why it's important: Standardizes the workflow for the LLM, prompting it to use the available tools and resources effectively (e.g., "Generate a policy for {resource_type} to enforce {requirement}. Clarify if this should audit/block new resources or remediate existing ones. Use the policy fetching tools for examples and verify_policy_structure before finalizing. Use deploy_policy_assignment to deploy.").
(New) azure_resource_graph_query Tool (Planned):
* What it does: Allows the LLM to run arbitrary Azure Resource Graph queries using the Azure REST API, enabling discovery of resources, subscription IDs, resource groups, and more.
* Why it's important: Empowers the LLM to dynamically discover the structure and contents of the Azure environment, including fetching subscription IDs, resource types, and relationships, which is critical for correct policy deployment and assignment.
* How it works: Uses Azure authentication (MSAL) to acquire a token and calls the Resource Graph REST API endpoint (POST https://management.azure.com/providers/Microsoft.ResourceGraph/resources?api-version=2022-10-01) with a user-supplied query. Returns the results as JSON. Example queries include listing all subscriptions, finding all VMs, or summarizing resources by type or location.
The primary "user" of this MCP server is the LLM client application. The interaction flow is as follows:
get_builtin_policies (optionally with a query) to find relevant policy categories.get_policies_in_category for a chosen category path (optionally with a query) to find relevant policy files.get_policy_content using the download URL for one or more policies to get examples.read_resource on schema://azurepolicy (if implemented) to understand the required structure.create_policy_prompt) to clarify intent (audit/block vs. remediate) and determine the appropriate policy effect.verify_policy_structure (once enabled) with the generated JSON.deploy_policy_assignment with the validated policy definition and assignment details.query_policy_compliance.delete_policy_assignment.The MCP server now includes Azure authentication using the msal library. Ensure the following environment variables are set for authentication:
TENANT_ID: Azure Active Directory tenant ID.CLIENT_ID: Azure AD application client ID.CLIENT_SECRET: Client secret for the Azure AD application.These credentials are required for the deploy_policy_assignment, query_policy_compliance, delete_policy_assignment, and create_policy_definition tools to function properly.
mcp-sdk using FastMCP.server.py: Main 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_definition). Loads schema for validation.schemas/policyDefinition.json: Locally stored copy of the official Azure Policy JSON schema file (used by the disabled verify_policy_structure).msal library with environment variables for credentials.server.py).jsonschema in server.py).FastMCP.requests (used by policy fetching tools).httpx (used by deploy_policy_assignment, query_policy_compliance, delete_policy_assignment, and create_policy_definition).mcp[cli], requests, jsonschema, (New) msal, httpx.Phase 1: MVP (Core Functionality)
FastMCP server project structure (server.py).schemas/.verify_policy_structure tool using jsonschema and the stored schema. (Currently blocked/disabled)get_builtin_policies, get_policies_in_category, get_policy_content using the GitHub API (requests).README.md explaining setup and usage.azure_resource_graph_query) to allow LLM to query resources, fetch subscription IDs, and discover environment details.Phase 2: Enhancements & Reliability
azure_policy_schema MCP Resource.azure_resource_types MCP Resource (requires curating this list).create_policy_prompt MCP Prompt, including guidance for intent clarification.Phase 3: Deployment & Advanced Features (New)
azure-identity with Service Principal or Managed Identity).deploy_policy_assignment tool, handling different scopes and parameters.deployIfNotExists/Modify).mcp-sdk.schemas/policyDefinition.json).get_builtin_policies, get_policies_in_category, get_policy_content).verify_policy_structure (depends on schema). (Blocked)deploy_policy_assignment (depends on validation and auth).Focus was initially on getting policy retrieval working via the GitHub API. The next focus is resolving the validation issue, followed by implementing deployment capabilities.
get_builtin_policies), listing policies within categories (get_policies_in_category), fetching policy content (get_policy_content), deploying policy assignments (deploy_policy_assignment), querying compliance (query_policy_compliance), deleting policy assignments (delete_policy_assignment), and creating policy definitions (create_policy_definition) are implemented and functional. Basic error handling and timeouts are included. The verify_policy_structure tool is implemented but currently commented out due to runtime errors/validation logic issues. The schema file (schemas/policyDefinition.json) is present.verify_policy_structure: Uncomment the tool in server.py and diagnose the jsonschema validation errors. Ensure it correctly validates policy JSON against the schemas/policyDefinition.json file.README.md explaining how to set up the environment, run the server, and use the available tools.verify_policy_structure tool proves difficult to fix or requires significant schema adjustments.
jsonschema documentation and the specific validation errors. Compare the downloaded schema against Azure documentation examples. If necessary, seek simpler validation approaches initially.azure-identity. Follow best practices for credential management (environment variables, Key Vault, Managed Identity). Clearly document setup requirements.create_policy_prompt). Provide examples. Log interactions to identify common LLM mistakes. Consider adding explicit checks or a dedicated analysis tool if prompting alone is insufficient.verify_policy_structure step. Implement checks within deploy_policy_assignment for required parameters. Encourage user confirmation before deployment. Advise testing in non-production environments.schemas/policyDefinition.json) up-to-date requires effort.
README.md)Claim this server with your GitHub account to request manual ownership verification.
Link to the catalog listing for AzPolicyMCP Azure Policy Server from your README. This badge does not certify ownership, compatibility or security.
[](https://awesome-mcp.com/servers/azpolicymcp)Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.
来源、范围和时段分别列出;不相加,不代表安装人数、活跃用户或安全审核。
尚无已审核的包 / 镜像标识,暂不展示下载统计。
Alternative and complementary servers in the same category

A Model Context Protocol server built on Huawei Cloud services that enables AI assistants to operate Huawei Cloud resources within conversational workflows, supporting ECS, OBS, GaussDB, and other cloud products.

An MCP server that exposes the Coolify v4.3.1 REST API so AI clients can manage applications, databases, services, servers, deployments, and more.

A deprecated Model Context Protocol server for interacting with Kong Konnect APIs, enabling AI assistants to query and analyze Kong Gateway configurations, traffic, and analytics.