mcpField
B
Blue Bridge

Blue Bridge

本地服务
github.com/Azure开发工具1079 周前更新

关于 Blue Bridge

Blue Bridge 提供通过 MCP 服务查询和管理 Azure 资源的提示词与示例。它默认支持 Azure Resource Graph 和 Resource Manager,也可连接 Grafana 与 Kusto,并使用 Azure CLI 登录或托管标识进行身份验证。

主要功能

  1. 01查询 Azure Resource Graph
  2. 02使用 Azure Resource Manager 管理资源
  3. 03可选连接 Grafana 和 Kusto
  4. 04支持 Azure CLI 或托管标识认证

适用场景

  1. 01查找可关闭的虚拟机
  2. 02查询订阅的 CPU 配额
  3. 03查询 Azure 监控与 Kusto 数据

MCP 相关

它通过 SSE 在 http://localhost:6688/sse 提供 MCP 服务,向 MCP 主机开放 Azure 资源操作。

配置

本地服务的配置在各客户端中通用,复制后粘贴到客户端的 MCP 配置文件即可。

mcp.json · 通用配置
{
"mcpServers": {
"blue-bridge": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"\\"
]
}
}
}
启动命令docker run -i --rm '\'

本地服务需要在你的电脑上安装运行环境(如 Node.js 18+)。各客户端的配置文件位置不同,请参考客户端文档。

安装包
oci\

工具

还没有获取到工具列表

本地服务需要在你的电脑上运行后才能读取工具,维护者暂未提供工具列表。

详细介绍

Blue Bridge

用于通过零密钥身份验证,使用 Model Context Protocol (MCP) 服务查询和管理 Azure 资源的示例提示词和操作指南。
适用场景包括:

  • Azure Managed Grafana
  • Azure Data Explorer (Kusto)
  • Azure Resource Graph
  • Azure Resource Manager

身份验证由已登录的 Azure CLI 帐户或托管标识处理,不会存储密码或密钥。


✨ 演示

  1. 根据 'manual-for-ai.md',向我展示 5 台可以关机以节省开支的虚拟机。

    结果

  2. 根据 'manual-for-ai.md',帮我找出 2 台可以关机以节省开支的虚拟机。也请将它们关机。每台虚拟机执行操作前都请先征求我的许可。

    结果

  3. 根据 'manual-for-ai.md',查询订阅 '3a7edf7d-1488-4017-a908-e50d0a1642a6' 的 CPU 配额。

    结果


🚀 快速开始

0 · 克隆仓库

克隆仓库以获取所需文件,包括 manual-for-ai.md 中的操作指南和用法示例。

git clone https://github.com/Azure/blue-bridge.git
cd blue-bridge

1 · 运行容器

Blue Bridge 开箱即支持 Azure Resource Graph 和 Azure Resource Manager,无需额外配置。

要连接到 Azure Managed Grafana 或 Azure Data Explorer (Kusto),请在运行容器时设置相应的环境变量。

设置所需的可选环境变量,然后启动映像:

docker run --name bluebridge -p 6688:6688 \
  -e AzureManagedGrafanaEndpoint=https://<my‑grafana>.wcus.grafana.azure.com \
  -e KustoUri=https://<my‑kusto>.westus2.kusto.windows.net \
  bluebridge.azurecr.io/bluebridge:latest

如果只需要 Kusto:

docker run --name bluebridge -p 6688:6688 \
  -e KustoUri=https://<my‑kusto>.westus2.kusto.windows.net \
  bluebridge.azurecr.io/bluebridge:latest

或者不使用外部服务:

docker run --name bluebridge -p 6688:6688 \
  bluebridge.azurecr.io/bluebridge:latest

2 · 进行一次身份验证

首次启动时,容器会显示类似以下内容的设备代码提示:

To sign in, use a web browser to open the page https://microsoft.com/devicelogin
and enter the code ABCD‑EFGH to authenticate.

打开链接,输入代码并授予许可。
之后,服务即可通过 http://localhost:6688 使用。

3 · 添加到 MCP 宿主

{
  "mcpServers": {
    "blue-bridge": {
      "url": "http://localhost:6688/sse",
      "transportType": "sse",
      "timeout": 60,
      "disabled": false,
      "autoApprove": []
    }
  }
}

4 · 快速测试

向 MCP 宿主提问:

Given 'manual-for-ai.md', show me 5 VMs that I can turn off machines to save money.

结果


🔧 环境变量

变量用途必需
AzureManagedGrafanaEndpointAzure Managed Grafana 终结点 URL否
KustoUriAzure Data Explorer (Kusto) 群集 URI否
UseManagedIdentity设置为 true 以使用托管标识。否
ManagedIdentityClientId要使用的托管标识的客户端 ID。否

当 UseManagedIdentity 设置为 true 时,Blue Bridge 会尝试使用计算资源上可用的托管标识进行身份验证。如果只有一个托管标识(系统分配或用户分配),则此过程会自动完成。

如果计算资源具有多个托管标识,则必须将 ManagedIdentityClientId 环境变量设为所需托管标识的客户端 ID,以指定要使用的标识。请注意,设置 ManagedIdentityClientId 即表示使用托管标识,因此无需将 UseManagedIdentity 设置为 true。


📚 链接

评论

支持 Markdown

第一次接触 MCP?

从协议是什么,到在客户端里装上第一个服务,这几条回答覆盖了大多数入门问题。

一个开放协议,规定了 AI 应用如何以统一方式连接外部工具与数据源。客户端负责与模型对话,MCP 服务负责提供工具、资源和提示模板,两者通过标准消息通信,同一个服务可以被不同客户端复用。