Token导航 LogoToken导航TokenDH.com
Azops MCP logo
运维云端stdio官方级别未说明来源级核验

Azops MCP

MCP Server

一个用于通过AI助手直接管理Azure基础设施的模型上下文协议(MCP)服务器,支持订阅管理、资源控制、应用配置等功能。

工具数

93

提示词数

0

GitHub Stars

2

资源数

0
PythonClaude云计算Claude DesktopClaudeCursorWindsurfVS Code

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

artemkozlenkov

提供方

artemkozlenkov

最后核验

2026/5/17 20:21

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

命令预览

pip install azops-mcp

详细介绍

Azure基础架构MCP服务器

模型上下文协议(MCP)服务器,用于直接从AI助手(如Cursor中的Claude、VS Code、Claude Desktop或任何兼容MCP的客户端)管理Azure基础设施。

你能做什么

  • 管理订阅 --列出Azure订阅并在它们之间切换
  • 检查帐户 --查看订阅详细信息,获取访问令牌,清除缓存凭据
  • 组织资源 --列出和管理资源组、标签、锁
  • 控制虚拟机 --启动、停止、重新启动、取消分配虚拟机和扩展VMSS
  • 管理存储 --列出并检查存储帐户
  • 应用程序配置 --管理应用程序配置存储和键值
  • 应用服务 --列出和管理应用服务计划和web应用程序
  • 部署Web应用程序 --使用Docker/Podman为容器创建和管理Web应用程序
  • 集装箱登记处 --列出、创建和管理ACR实例、映像、任务和网络规则
  • 虚拟网络 --创建和管理虚拟主机、子网和对等网络
  • 身份和访问 --管理Azure AD用户、组、应用程序和RBAC权限
  • 治理 --使用管理组、资源锁和标记
  • 审计 --查看活动日志并跟踪更改
  • Docker运行时 --列出、检查日志并重新启动本地Docker容器
  • 监控 --系统指标、服务健康状况和基础设施状态

快速开始

1.先决条件

  • Python 3.10+
  • Azure CLI已安装并登录(az login)
  • 紫外线 包管理器(推荐)--或纯pip

2.安装

选项A——从PyPI安装(推荐):

pip install azops-mcp
# or
uv pip install azops-mcp

选项B——使用uvx运行(零安装):

uvx azops-mcp

uvx 将包下载到缓存的隔离环境中并运行服务器——不会永久安装任何东西。

选项C——来源:

git clone https://github.com/artemkozlenkov/azops-mcp.git
cd azops-mcp
./quickstart.sh

3.配置您的AI客户端

克劳德桌面 --添加到 ~/Library/Application Support/Claude/claude_desktop_config.json (macOS)或 %APPDATA%\Claude\claude_desktop_config.json (Windows):

重要提示: 克劳德桌面 继承你的shell PATH。您必须使用 完全绝对路径uvx (或任何其他命令)。找到它 which uvx.

使用 uvx (推荐--无需安装):

{
  "mcpServers": {
    "azops-mcp": {
      "command": "/Users/YOUR_USERNAME/.local/bin/uvx",
      "args": ["azops-mcp"]
    }
  }
}

使用一个 pip已安装 包裹:

{
  "mcpServers": {
    "azops-mcp": {
      "command": "/Users/YOUR_USERNAME/.local/bin/azops-mcp"
    }
  }
}

使用一个 本地克隆 (开发):

{
  "mcpServers": {
    "azops-mcp": {
      "command": "/Users/YOUR_USERNAME/.local/bin/uv",
      "args": ["--directory", "/full/path/to/azops-mcp", "run", "python", "-m", "azops_mcp"]
    }
  }
}

Troubleshooting: "Failed to spawn process: No such file or directory"

此错误发生在 ~/Library/Logs/Claude/mcp-server-azops-mcp.log 意味着Claude Desktop找不到二进制文件。Claude Desktop仅搜索系统路径(/usr/local/bin, /opt/homebrew/bin, /usr/bin, /bin)确实如此 搜索 ~/.local/bin 或者来自shell配置文件的路径。

修复: 替换 "command": "uvx" 完整的路径从 which uvx (例如。 /Users/yourname/.local/bin/uvx).

光标 --添加到 ~/.cursor/mcp.json:

{
  "mcpServers": {
    "azops-mcp": {
      "command": "uvx",
      "args": ["azops-mcp"]
    }
  }
}

帆板运动 --添加到 ~/.codeium/windsurf/mcp_config.json:

{
  "mcpServers": {
    "azops-mcp": {
      "command": "uvx",
      "args": ["azops-mcp"]
    }
  }
}

VS代码(GitHub副本) --添加到 .vscode/mcp.json 在您的工作空间中:

{
  "servers": {
    "azops-mcp": {
      "command": "uvx",
      "args": ["azops-mcp"]
    }
  }
}

泽德 --添加到Zed设置文件中:

{
  "context_servers": {
    "azops-mcp": {
      "command": {
        "path": "uvx",
        "args": ["azops-mcp"]
      }
    }
  }
}

继续(VS代码/JetBrains) --添加到 ~/.continue/config.yaml:

mcpServers:
  - name: azops-mcp
    command: uvx
    args:
      - azops-mcp
注: Cursor、Windsurf、VS Code和Zed继承了你的shell PATH,所以 uvx 通常按原样工作。如果不是,请使用来自的完整路径 which uvx。请参阅 完整文档 了解详情。

要传递环境变量(例如Azure凭据),请添加 "env" 按键:

{
  "mcpServers": {
    "azops-mcp": {
      "command": "uvx",
      "args": ["azops-mcp"],
      "env": {
        "AZURE_SUBSCRIPTION_ID": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
      }
    }
  }
}

保存配置后重新启动AI客户端。

4.开始使用

User: List my Azure subscriptions
User: Show resource groups in subscription xxx-xxx-xxx
User: Start the VM "web-server" in resource group "production"
User: What VMs are running in my dev resource group?

认证

优先级方法何时
1服务主体AZURE_CLIENT_ID + SECRET + TENANT_ID 全部设置完毕 .env
2Azure命令行界面之后 az login (建议开发)
3管理身份在Azure中运行时

身份验证文档 完整的演练。

可用工具(90+)

类别工具
健康health_check
订阅和身份验证list_subscriptions, set_subscription, auth_status, account_show, account_clear, account_get_access_token, list_locations, list_tenants
管理团队list_management_groups, get_management_group
RBAClist_role_definitions, create_role_assignment, delete_role_assignment, list_role_assignments_for_principal
治理list_resource_locks, list_tags, get_activity_log
资源组list_resource_groups, list_resources
虚拟机和VMSSlist_vms, get_vm_status, start_vm, stop_vm, restart_vm, deallocate_vm, scale_vmss
存储list_storage_accounts, get_storage_status
应用程序配置appconfig_list, appconfig_show, appconfig_kv_list, appconfig_kv_show, appconfig_kv_set, appconfig_kv_delete
应用服务appservice_plan_list, appservice_plan_show, webapp_list, webapp_show, webapp_start, webapp_stop, webapp_restart
容器Web应用程序webapp_create_for_container, webapp_grant_cr_access, webapp_configure_vnet_integration, webapp_assign_identity, webapp_view_logs, webapp_set_container_registry_credentials, webapp_delete
集装箱登记处acr_list_registries, acr_show_registry, acr_create_registry, acr_delete_registry, acr_update_registry, acr_get_credentials, acr_get_login_server, acr_list_repositories, acr_list_tags, acr_show_task, acr_list_tasks, acr_create_task, acr_delete_task, acr_run_task, acr_list_builds, acr_show_quotas, acr_show_usage, acr_list_network_rules, acr_update_network_rules, acr_reset_client
虚拟网络vnet_list, vnet_show, vnet_create, vnet_delete, vnet_subnet_list, vnet_subnet_show, vnet_subnet_create, vnet_subnet_delete, vnet_peering_list
Azure AD(登录 ID) aad_list_users, aad_show_user, aad_create_user, aad_delete_user, aad_list_applications, aad_create_application, aad_list_groups, aad_verify_tenant, aad_reset_client
Docker运行时list_containers, get_container_logs, restart_container
监测get_system_metrics, check_service_health, get_infrastructure_status

码头工人

将MCP服务器作为容器运行:

# Build the image
docker compose build

# Run the MCP server interactively (stdio transport)
docker compose run --rm mcp-server

看 获取完整说明。

项目结构

azops-mcp/
├── src/azops_mcp/
│   ├── __main__.py               # Module entry point
│   ├── server.py                 # MCP server — 93 tool definitions
│   ├── config.py                 # Configuration management
│   ├── tools/                    # Azure SDK integrations (by category)
│   │   ├── _clients.py           # Shared auth & Azure SDK client factories
│   │   ├── subscription.py       # Subscriptions, auth, tenants, locations
│   │   ├── resource_groups.py    # Resource groups, tags, locks, activity log
│   │   ├── compute.py            # VMs, VMSS, resource listing
│   │   ├── networking.py         # VNets, subnets, peerings
│   │   ├── authorization.py      # RBAC roles & assignments
│   │   ├── management_groups.py  # Management group hierarchy
│   │   ├── app_configuration.py  # App Configuration stores & key-values
│   │   ├── app_service.py        # App Service plans & web apps
│   │   ├── container_registry.py # Azure Container Registry (ACR)
│   │   ├── active_directory.py   # Azure AD / Entra ID
│   │   ├── webapp_deployment.py  # Web App for Containers deployment
│   │   ├── docker.py             # Local Docker container runtime
│   │   └── monitoring.py         # System metrics & health
│   └── utils/
│       └── helpers.py            # HTTP client, error formatting
├── tests/                        # Unit tests (per integration)
│   ├── test_subscription.py
│   ├── test_resource_groups.py
│   ├── test_compute.py
│   ├── test_networking.py
│   ├── test_authorization.py
│   ├── test_container_registry.py
│   ├── test_active_directory.py
│   ├── test_webapp_deployment.py
│   ├── test_docker.py
│   ├── test_monitoring.py
│   ├── test_health.py
│   └── test_config.py
├── docs/                          # GitHub Pages documentation
├── Dockerfile                     # MCP server container image
├── docker-compose.yml             # Docker Compose for the MCP server
├── pyproject.toml                 # Dependencies & metadata
├── quickstart.sh                  # Setup script
└── .env.example                   # Configuration template

配置

变量默认值描述
AZURE_SUBSCRIPTION_ID--默认订阅
AZURE_DEFAULT_LOCATIONeastus新资源的默认区域
LOG_LEVELINFODEBUG, INFO, WARNING, ERROR
RATE_LIMIT_ENABLEDtrue启用速率限制
RATE_LIMIT_REQUESTS_PER_MINUTE60最大请求数/分钟

.env.example 查看完整列表。

发展

# Install with dev dependencies
uv pip install -e ".[dev]"

# Run tests
pytest

# Code quality
black src/ tests/
ruff check src/ tests/
mypy src/

# Run server manually
uv run python -m azops_mcp

文档

完整文档可在 azops.softawebit.com.

许可证

麻省理工学院

目录标签

目录标签

PythonClaude云计算Azure管理本地部署基础设施即服务AI助手集成自动化运维

支持客户端

Claude DesktopClaudeCursorWindsurfVS Code

接入字段

传输方式(transport,传输协议)

stdio

鉴权方式(authType,认证方式)

session

工具数量(toolCount,工具数)

93

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

stdiosession部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

来源信息

继续浏览同类 MCP