{"id":26896388,"url":"https://github.com/jdubois/azure-cli-mcp","last_synced_at":"2025-07-29T10:07:57.217Z","repository":{"id":285411259,"uuid":"956672559","full_name":"jdubois/azure-cli-mcp","owner":"jdubois","description":"Talk with Azure using MCP","archived":false,"fork":false,"pushed_at":"2025-05-02T11:09:42.000Z","size":39188,"stargazers_count":62,"open_issues_count":0,"forks_count":8,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-02T12:23:41.566Z","etag":null,"topics":["azure","mcp","mcp-server"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jdubois.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-03-28T16:51:51.000Z","updated_at":"2025-05-02T11:09:43.000Z","dependencies_parsed_at":null,"dependency_job_id":"98239de2-a8b1-4d2d-9634-879e1a077138","html_url":"https://github.com/jdubois/azure-cli-mcp","commit_stats":null,"previous_names":["jdubois/azure-cli-mcp"],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdubois%2Fazure-cli-mcp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdubois%2Fazure-cli-mcp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdubois%2Fazure-cli-mcp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdubois%2Fazure-cli-mcp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jdubois","download_url":"https://codeload.github.com/jdubois/azure-cli-mcp/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253824518,"owners_count":21970037,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["azure","mcp","mcp-server"],"created_at":"2025-04-01T03:44:00.858Z","updated_at":"2025-07-29T10:07:57.199Z","avatar_url":"https://github.com/jdubois.png","language":"Java","funding_links":[],"categories":["Cloud Infrastructure","Cloud \u0026 DevOps MCP Servers","MCP 服务器精选列表","Cloud Platforms","⚙️ DevOps","Infrastructure as Code","サーバー実装","Cloud Services","☁️ Cloud Platforms","Table of Contents"],"sub_categories":["☁️ Cloud Providers","☁️ 云平台与服务集成 (AWS, Cloudflare, Azure, K8s, etc.)","☁️ \u003ca name=\"cloud-platforms\"\u003e\u003c/a\u003eクラウドプラットフォーム","How to Submit","Cloud Platforms"],"readme":"# Azure CLI MCP Server\n\nThe Azure CLI MCP Server is an [MCP Server](https://modelcontextprotocol.io) that wraps the [Azure CLI](https://learn.microsoft.com/en-us/cli/azure/), adds a nice prompt to improve how it works, and exposes it.\n\n\u003e [!IMPORTANT]\n\u003e The @Azure organization offers an official Azure MCP server, which uses the code from this Azure CLI MCP server. As it's an official server, maintained by Microsoft, we recommend to use it unless you have specific resource contraints (the Azure CLI MCP Server uses less resources as it does less, and as it can be packaged with GraalVM), or if you're a Java developer and want to tweak the prompts. You can find more details at its [Getting started documentation](https://learn.microsoft.com/en-us/azure/developer/azure-mcp-server/get-started) or at the [Azure MCP Server repository](https://github.com/Azure/azure-mcp).\n\n[![smithery badge](https://smithery.ai/badge/@jdubois/azure-cli-mcp)](https://smithery.ai/server/@jdubois/azure-cli-mcp)\n\n## Demos\n\n### Short 2-minute demo with Claude Desktop\n\n[![Short Demo](https://img.youtube.com/vi/y_OexCcfhW0/0.jpg)](https://www.youtube.com/watch?v=y_OexCcfhW0)\n\n### Complete 18-minute demo with VS Code\n\n[![Complete Demo](https://img.youtube.com/vi/NZxTr32A9lY/0.jpg)](https://www.youtube.com/watch?v=NZxTr32A9lY)\n\n## What can it do?\n\nIt has access to the full Azure CLI, so it can do anything the Azure CLI can do. Here are a few scenarios:\n\n- Listing your resources and checking their configuration. For example, you can get the rate limits of a model deployed\n  to Azure OpenAI.\n- Fixing some configuration or security issues. For example, you can ask it to secure a Blob Storage account.\n- 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.\n\n## Is it safe to use?\n\nAs the MCP server is driven by an LLM, we would recommend to be careful and validate the commands it generates. Then, if\nyou're using a good LLM like Claude 3.7 or GPT-4o, which has\nexcellent training data on Azure, our experience has been very good.\n\nPlease read our [License](LICENSE) which states that \"THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND\",\nso you use this MCP server at your own risk.\n\n## Is it secured, and should I run this on a remote server?\n\nShort answer: **NO**.\n\nThis MCP server runs `az` commands for you, and could be hacked by an attacker to run any other command. The current\nimplementation, as with most MCP servers at the moment, only works with the `stio` transport:\nit's supposed to run locally on your machine, using your Azure CLI credentials, as you would do by yourself.\n\nIn the future, it's totally possible to have this MCP server support the `http` transport, and an Azure token\nauthentication, so that it could be used remotely by different persons. It's a second step, that will be done once the\nMCP specification and SDK are more stable.\n\n## How do I install it?\n\n_This server can run inside a Docker container or as a Java executable JAR file._\n\nFor both options, only the `stio` transport is available. The `http` transport will be available later.\n\n### Install and configure the server with Docker\n\nCreate an Azure Service Principal and set the `AZURE_CREDENTIALS` environment variable. You can do this by running the\nfollowing command in your terminal:\n\n```bash\naz ad sp create-for-rbac --name \"azure-cli-mcp\" --role contributor --scopes /subscriptions/\u003cyour-subscription-id\u003e/resourceGroups/\u003cyour-resource-group\u003e --json-auth\n```\n\nThis will create a new Service Principal with the specified name and role, and output the credentials in JSON format.\n\nYou can then run the server using Docker with the following command. To authenticate, set the `AZURE_CREDENTIALS` with\nthe output of the previous command.\n\n```bash\ndocker run --rm -p 6273:6273 -e AZURE_CREDENTIALS=\"{\"clientId\":\"....\",\"clientSecret\":\"....\",...}\" -i ghcr.io/jdubois/azure-cli-mcp:latest\n```\n\n#### Using VS Code\n\nTo use the server from VS Code:\n\n- Install GitHub Copilot\n- Install this MCP Server using the command palette: `MCP: Add Server...`\n  - The configuration connects to the server using the `stio` transport\n  - The command to run is `docker run -i --rm -e AZURE_CREDENTIALS ghcr.io/jdubois/azure-cli-mcp:latest`. You'll need to\n    set the `AZURE_CREDENTIALS` environment variable to the JSON output from the Service Principal creation, with the\n    quotes escaped: have a look below for a complete and secure example.\n- Configure GitHub Copilot to run in `Agent` mode, by clicking on the arrow at the bottom of the the chat window\n- On top of the chat window, you should see the `azure-cli-mcp` server configured as a tool\n\nYou can secure the `AZURE_CREDENTIALS` environment using the methode\ndescribed [in the documentation](https://code.visualstudio.com/docs/copilot/chat/mcp-servers#_configuration-example),\nhere is a complete example:\n\n```json\n{\n  \"inputs\": [\n    {\n      \"type\": \"promptString\",\n      \"id\": \"azure-credentials\",\n      \"description\": \"Azure Credentials\",\n      \"password\": true\n    }\n  ],\n  \"servers\": {\n    \"azure-cli\": {\n      \"command\": \"docker\",\n      \"args\": [\n        \"run\",\n        \"-i\",\n        \"--rm\",\n        \"-e\",\n        \"AZURE_CREDENTIALS\",\n        \"ghcr.io/jdubois/azure-cli-mcp:latest\"\n      ],\n      \"env\": {\n        \"AZURE_CREDENTIALS\": \"${input:azure-credentials}\"\n      }\n    }\n  }\n}\n```\n\n#### Using Claude Desktop\n\nTo use the server from Claude Desktop, add the server to your `claude_desktop_config.json` file.\nThe `AZURE_CREDENTIALS` environment variable should be set to the JSON output from the Service Principal creation, with\nthe quotes escaped.\n\n```json\n{\n  \"mcpServers\": {\n    \"azure-cli\": {\n      \"command\": \"docker\",\n      \"args\": [\n        \"run\",\n        \"-i\",\n        \"--rm\",\n        \"-e\",\n        \"AZURE_CREDENTIALS\",\n        \"ghcr.io/jdubois/azure-cli-mcp:latest\"\n      ],\n      \"env\": {\n        \"AZURE_CREDENTIALS\": \"{\\\"clientId\\\":\\\"...\\\",\\\"clientSecret\\\":\\\"...\\\",...\"\n      }\n    }\n  }\n}\n```\n\n### Installation with Smithery.ai\n\nYou can install the MCP server through Smithery.ai:\n\n[![smithery badge](https://smithery.ai/badge/@jdubois/azure-cli-mcp)](https://smithery.ai/server/@jdubois/azure-cli-mcp)\n\nThis is similar to our Docker container installation above, but runs on Smithery.ai's servers. While this installation\nis initially the easiest, please note that:\n\n- You will need an `AZURE_CREDENTIALS` key, as described below in the Docker installation section, and this key\n  will be sent to Smithery.ai.\n- Smithery.ai is a third-party service, and you need to trust them to build this MCP server for you (it uses the same\n  Dockerfile as our Docker image, but isn't built by us).\n- This is still an early preview service, so we can't guarantee how it will evolve.\n\n### Install and configure the server with Java\n\nThis configuration is running the server locally. It's easier to set up than with Docker,\nbut it's less secured as it uses directly your credentials using the Azure CLI configured on your machine.\n\n- Install the Azure CLI: you can do this by following the instructions [here](https://learn.microsoft.com/en-us/cli/azure/install-azure-cli).\n- Authenticate to your Azure account. You can do this by running `az login` in your terminal.\n- Make sure you have Java 17 or higher installed. You can check this by running `java -version` in your terminal.\n\nBinaries are available on the [GitHub Release page](https://github.com/jdubois/azure-cli-mcp/releases), here's how you\ncan download the latest one with the GitHub CLI:\n\n- Download the latest release: `gh release download --repo jdubois/azure-cli-mcp --pattern='azure-cli-mcp.jar'`\n\n#### Using VS Code\n\n- Install GitHub Copilot\n- Install this MCP Server using the command palette: `MCP: Add Server...`\n  - The configuration connects to the server using the `stio` transport\n  - The command to run is `java -jar ~/Downloads/azure-cli-mcp.jar` (you need to point to the location where you\n    downloaded the `azure-cli-mcp.jar` file)\n- Configure GitHub Copilot to run in `Agent` mode, by clicking on the arrow at the bottom of the the chat window\n- On top of the chat window, you should see the `azure-cli-mcp` server configured as a tool\n\n#### Using Claude Desktop\n\nTo use the server from Claude Desktop, add the server to your `claude_desktop_config.json` file. Please note that you\nneed to point to the location where you downloaded the `azure-cli-mcp.jar` file.\n\n```json\n{\n    \"mcpServers\": {\n        \"azure-cli\": {\n            \"command\": \"java\",\n            \"args\": [\n                \"-jar\",\n              \"~/Downloads/azure-cli-mcp.jar\"\n            ]\n        }\n    }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjdubois%2Fazure-cli-mcp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjdubois%2Fazure-cli-mcp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjdubois%2Fazure-cli-mcp/lists"}