CA

chanezon/azure-cli-mcp

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

0 stars 15 forks 质量 55 趋势 0MIT

Talk with Azure using MCP

概览

This is an MCP Server that wraps the Azure CLI, adds a nice prompt to improve how it works, and exposes it. It has access to the full Azure CLI, so it can do anything the Azure CLI can do. Here are a few scenarios: - Listing your resources and checking their configuration. For example, you can get the rate limits of a model deployed to Azure OpenAI. - Fixing some configuration or security issues. For example, you can ask it to secure a Blob Storage account. - Creating resources. For example, you can ask it to create an Azure Container Apps instance, an Azure Container Registry, and connect them using managed identity. As the MCP server is driven by an LLM, we would recommend to be careful and validate the commands it generates. Then, if you're using a good LLM like Claude 3.7 or GPT-4o, which has excellent training data on Azure, our experience has been very good.

README

以下为原文 README 节选,完整内容请查看原文。

Azure CLI MCP

This is an MCP Server that wraps the Azure CLI, adds a nice prompt to improve how it works, and exposes it.

Demos

Short 2-minute demo with Claude Desktop

Complete 18-minute demo with VS Code

What can it do?

It has access to the full Azure CLI, so it can do anything the Azure CLI can do. Here are a few scenarios:

  • Listing your resources and checking their configuration. For example, you can get the rate limits of a model deployed to Azure OpenAI.
  • Fixing some configuration or security issues. For example, you can ask it to secure a Blob Storage account.
  • Creating resources. For example, you can ask it to create an Azure Container Apps instance, an Azure Container Registry, and connect them using managed identity.

Is it safe to use?

As the MCP server is driven by an LLM, we would recommend to be careful and validate the commands it generates. Then, if you’re using a good LLM like Claude 3.7 or GPT-4o, which has excellent training data on Azure, our experience has been very good.

Please read our License which states that “THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND”, so you use this MCP server at your own risk.

Is it secured, and should I run this on a remote server?

Short answer: NO.

This MCP server runs az commands for you, and could be hacked by an attacker to run any other command. The current implementation, as with most MCP servers at the moment, only works with the stio transport: it’s supposed to run locally on your machine, using your Azure CLI credentials, as you would do by yourself.

In the future, it’s totally possible to have this MCP server support the http transport, and an Azure token authentication, so that it could be used remotely by different persons. It’s a second step, that will be done once the MCP specification and SDK are more stable.

How do I install it?

This MCP server currently only works with the stdio transport, so it should run locally on your machine, using your Azure CLI credentials.

Prerequisites

  • Install the Azure CLI: you can do this by following the instructions here.
  • Authenticate to your Azure account. You can do this by running az login in your terminal.

Installing the MCP server

You can run azure-cli-mcp as a Java executable

To run the Java archive, you need to have a Java Virtual Machine (version 17 or higher) installed.

Binaries are available on the GitHub Release page, here’s how you can download the latest one with the GitHub CLI:

在 GitHub 查看完整 README

安装

This server does not publish a one-line install command.

Open the repository installation guide 新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "azure-cli": { "command": "java", "args": [ "-jar", "~/Downloads/azure-cli-mcp.jar" ] } } }