使用说明
ARM连接MCP服务器
用于通过Azure资源管理器(ARM)管理Azure API连接的MCP(模型上下文协议)服务器。
Azure连接器 提供了一种跨数百个Microsoft和第三方应用程序(包括Office 365、Teams、SQL Server等)访问数据、服务和操作的方法。该服务器将这些连接器管理功能公开为MCP工具,使AI助手能够代表您创建、配置和验证API连接。
特性
- 列出托管API -枚举某个区域的可用API连接器(Office 365、Teams、SQL等)
- 创建/更新连接 -在资源组中设置API连接资源
- 列出连接 -查看资源组中的所有API连接
- 获取同意链接 --为需要用户身份验证的连接生成OAuth同意URL
先决条件
- Node.js 18+
- 具有资源组的Azure订阅
- 适当的RBAC权限(资源组上的参与者)
安装
npm install
npm run build
用法
直接执行
node dist/index.js --subscriptionId <sub-id> --resourceGroup <rg-name>
通过npx(之后 npm link)
npm link
npx mcp-connections --subscriptionId <sub-id> --resourceGroup <rg-name>
CLI选项
| 选项 | 别名 | 必填 | 默认 | 描述 |
|---|---|---|---|---|
--subscriptionId |
-s |
是 | -- | Azure订阅ID |
--resourceGroup |
-g |
是 | -- | Azure资源组名称 |
--location |
-l |
没有 | westus |
Azure区域 |
--authentication |
-a |
没有 | interactive |
身份验证模式: interactive, azcli, env, envvar |
--tenant |
-t |
没有 | — | 输入 ID 持有人 ID |
身份验证模式
| 模式 | 描述 |
|---|---|
interactive |
基于浏览器的SWTAOAuth登录(默认) |
azcli |
Azure CLI凭据(在代码空间中自动检测到) |
env |
DefaultAzureCredential (尊重环境变量) |
envvar |
原始令牌来自 ARM_MCP_AUTH_TOKEN 有人是。 |
VS代码MCP配置
添加到您的项目 mcp.json:
{
"inputs": [
{ "id": "azure_subscription", "type": "promptString", "description": "Azure subscription ID" },
{ "id": "azure_rg", "type": "promptString", "description": "Azure resource group name" }
],
"servers": {
"armConnections": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@galin.iliev/mcp-connections", "--subscriptionId", "${input:azure_subscription}", "--resourceGroup", "${input:azure_rg}"],
"env": { "LOG_LEVEL": "debug" }
}
}
}
MCP工具
| 工具 | 说明 |
|---|---|
list_managed_apis |
列出某个区域可用的托管API连接器 |
put_connection |
创建或更新API连接资源 |
list_connections |
列出资源组中的所有API连接 |
get_consent_link |
获取连接的OAuth同意链接 |
发展
npm run dev # Run with tsx (no build needed)
npm run build # Compile TypeScript
npm run watch # Incremental compilation
npm test # Run tests with coverage
npm run inspect # Launch MCP Inspector
许可证
麻省理工学院
