项目简介
Azure蓝桥 (Blue Bridge) 是一个实现了 Model Context Protocol (MCP) 的服务器,专注于简化 LLM (大型语言模型) 应用与 Azure 云服务的集成。它充当桥梁,让 LLM 客户端能够安全地访问和操作 Azure 资源,而无需复杂的身份验证配置或密钥管理。通过标准化的 MCP 协议,Azure蓝桥为 LLM 提供了统一的上下文数据访问和功能扩展方式。
主要功能点
- Azure资源访问: 支持多种常用的 Azure 服务,包括 Azure Managed Grafana、Azure Data Explorer (Kusto)、Azure Resource Graph 和 Azure Resource Manager。这意味着 LLM 可以通过 Azure 蓝桥获取 Grafana 仪表盘数据、查询 Kusto 数据分析结果、检索 Azure 资源信息以及管理 Azure 资源。
- 零密钥身份验证: 采用 Azure CLI 账户或托管身份进行身份验证,无需在任何地方存储密码或密钥,提升安全性。
- MCP协议标准: 遵循 MCP 协议,确保与各种 MCP 客户端的兼容性,并提供标准化的资源、工具和 Prompt 模板管理能力。
- 易于部署: 通过 Docker 容器镜像进行部署,方便快捷,并支持通过环境变量进行灵活配置。
安装步骤
-
安装 Docker: 确保您的机器上已安装 Docker 环境。
-
运行 Docker 容器: 使用提供的 'docker run' 命令拉取并运行 Azure 蓝桥的 Docker 镜像。您可以根据需要配置环境变量来连接到您的 Azure 服务。
- 连接 Azure Managed Grafana 和 Azure Data Explorer (Kusto):
docker run --name bluebridge -p 6688:6688 \ -e BlueBridgeOptions__AzureManagedGrafanaEndpoint=https://<your-grafana-endpoint>.grafana.azure.com \ -e BlueBridgeOptions__AzureDataExplorerUri=https://<your-kusto-cluster>.kusto.windows.net \ bluebridge.azurecr.io/bluebridge:latest - 仅连接 Azure Data Explorer (Kusto):
docker run --name bluebridge -p 6688:6688 \ -e BlueBridgeOptions__AzureDataExplorerUri=https://<your-kusto-cluster>.kusto.windows.net \ bluebridge.azurecr.io/bluebridge:latest - 不连接外部服务 (仅使用基本功能):
docker run --name bluebridge -p 6688:6688 \ bluebridge.azurecr.io/bluebridge:latest
- 连接 Azure Managed Grafana 和 Azure Data Explorer (Kusto):
-
设备码认证: 首次运行时,容器会输出设备码认证提示。按照提示打开链接 'https://microsoft.com/devicelogin',输入提供的代码完成 Azure 账户认证。认证成功后,Azure 蓝桥服务器将在 'http://localhost:6688' 启动。
服务器配置 (MCP 客户端)
对于 MCP 客户端,您需要配置连接到 Azure 蓝桥服务器的信息。以下是一个典型的 JSON 配置示例,您需要将其添加到您的 MCP 客户端配置中 (例如 'mcpServers' 字段):
{ "blue-bridge": { // 服务器名称,客户端内唯一标识 "url": "http://localhost:6688/sse", // Azure蓝桥服务器的 SSE 接口地址 "transportType": "sse", // 使用 SSE (Server-Sent Events) 传输协议 "timeout": 60, // 请求超时时间,单位秒 "disabled": false, // 是否禁用该服务器,false 表示启用 "autoApprove": [] // 自动批准的工具列表,如果为空则每次调用工具都需要用户批准 } }
基本使用方法
配置完成后,您可以在您的 MCP 客户端中使用 Azure 蓝桥提供的工具。例如,使用 'blue_bridge_query_azure_resource_graph' 工具查询 Azure Resource Graph:
Use the 'blue_bridge_query_azure_resource_graph' tool to execute: resources | limit 2
这表示指示 LLM 使用名为 'blue_bridge_query_azure_resource_graph' 的工具,并传递参数 'resources | limit 2' 来执行 Azure Resource Graph 查询。具体的工具名称和参数请参考 Azure 蓝桥的文档或能力声明。
信息
分类
开发者工具