Skip to main content
Glama
tim10002

Azure Resource MCP Server

by tim10002

Azure 资源 MCP 服务器

该 MCP 服务器提供从任何 MCP 客户端直接列出和查询 Azure 资源的工具,让您无需离开工作流程即可高效浏览 Azure 基础架构并分析成本。

这是如何查询 Azure 资源的示例:

这是如何查询 Azure 成本的示例:

特征

  • 📊资源发现- 列出 Azure 订阅中的所有资源

  • 🔍过滤- 按资源组名称过滤资源

  • 💰成本分析- 检索 Azure 订阅的成本信息

  • 🔐安全- 使用您的 Azure 服务主体凭据

  • 🏷️详细视图- 查看所有资源的位置、类型和标签

Related MCP server: Azure FinOps MCP Server

工具

  • 列出 azure 资源

    • 使用服务主体身份验证列出 Azure 资源组和资源

    • 输入:

      • subscription_id (字符串,可选):要查询的具体订阅 ID。如果未提供,则使用环境变量中的默认订阅。

      • resource_group_filter (字符串,可选):按名称过滤资源组(不区分大小写包含匹配)。

    • 返回:资源组及其资源的格式化 markdown 列表,其中包含位置、类型和标签等详细信息。

  • 获取 Azure 成本

    • 使用 REST API 获取 Azure 订阅的成本分析数据

    • 输入:

      • subscription_id (字符串,可选):要查询的具体订阅 ID。如果未提供,则使用环境变量中的默认订阅。

      • timeframe (字符串,可选):成本分析的时间段。默认值为“MonthToDate”。

    • 返回:带有成本分析数据的格式化降价,包括每日成本和总计。

配置

设置 Azure

  1. 创建用于身份验证的 Azure 服务主体:

   az ad sp create-for-rbac --name {service principal name}
  1. 为服务主体分配适当的读取权限

  2. 记下你的 Azure 订阅 ID、租户 ID、客户端 ID 和客户端密钥

  3. 设置所需的环境变量

环境变量

此服务器需要以下环境变量:

# Required Azure authentication
AZURE_TENANT_ID=your-tenant-id
AZURE_CLIENT_ID=your-client-id
AZURE_CLIENT_SECRET=your-client-secret
AZURE_SUBSCRIPTION_ID=your-subscription-id

安装

先决条件

  • Python 3.10+

  • 具有适当权限的 Azure 订阅

  • 具有资源读取器访问权限的服务主体

设置

如果您更喜欢使用 uv:

# Setup environment with uv
uv venv
.venv\Scripts\activate  # On Windows
source .venv/bin/activate  # On macOS/Linux

# Install dependencies
uv add mcp[cli] azure-identity python-dotenv azure-mgmt-resource aiohttp

# Run server
uv run -m azure_resource_mcp_server

与 Claude Desktop 一起使用

要与 Claude Desktop 一起使用,请将以下内容添加到您的配置文件中:

{
  "mcpServers": {
    "azure-resource": {
      "command": "uv",
      "args": [
        "--directory",
        "/ABSOLUTE/PATH/TO/PARENT/FOLDER",
        "run",
        "-m",
        "azure_resource_mcp_server"
      ],
      "env": {
        "AZURE_TENANT_ID": "your-tenant-id",
        "AZURE_CLIENT_ID": "your-client-id",
        "AZURE_CLIENT_SECRET": "your-client-secret",
        "AZURE_SUBSCRIPTION_ID": "your-subscription-id"
      }
    }
  }
}
F
license - not found
Not graded
quality - not tested
D
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • -
    license
    Not graded
    quality
    Not graded
    maintenance
    An MCP server that wraps the Azure CLI. As LLMs are very good at generating Azure CLI commands, this server allows your LLM to list resources, update/create/delete them, fix errors (by looking at the logs), fix security issues...
    81
  • A
    license
    Not graded
    quality
    C
    maintenance
    An MCP server that exposes core Azure services as read-mostly tools any MCP client can call, including Blob Storage, Key Vault, Service Bus, and Resource Manager.
    1
    MIT
  • F
    license
    A
    quality
    D
    maintenance
    Integrates Azure Cost Management APIs via MCP, enabling cost queries, forecasts, budgets, and Advisor recommendations through natural language in compatible clients.
    9

View all related MCP servers

Related MCP Connectors

  • Official Microsoft MCP Server to query Microsoft Entra data using natural language

  • Search your AI chat history (ChatGPT, Claude, Codex) from any MCP client. Remote, private, read-only

  • The MCP server for Azure DevOps, bringing the power of Azure DevOps directly to your agents.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/tim10002/mcp-azresource'

If you have feedback or need assistance with the MCP directory API, please join our Discord server