Model Context Protocol (MCP) 服务器充当外部服务(为大语言模型 [LLM] 或 AI 应用提供上下文、数据或功能)与 LLM 或 AI 应用之间的代理。MCP 服务器将 AI 应用连接到数据库和 Web 服务等外部系统,并将这些系统的响应转换为 AI 应用可理解的格式。
服务器设置
您必须先启用 MCP 服务器并设置身份验证,然后才能使用。如需详细了解如何使用 Google 和 Google Cloud 远程 MCP 服务器,请参阅 Google Cloud MCP 服务器概览。
提供用于管理 Android 设备、应用和企业政策的工具。
服务器端点
MCP 服务端点是 MCP 服务器的网络地址和通信接口(通常是网址),AI 应用(MCP 客户端的宿主)使用该端点来建立安全、标准化的连接。它是 LLM 请求上下文、调用工具或访问资源的交互点。Google MCP 端点可以是全球性的,也可以是区域性的。
Android 设备管理 MCP 服务器具有以下 MCP 端点:
- https://androidmanagement.googleapis.com/mcp
MCP 工具
MCP 工具是 MCP 服务器向 LLM 或 AI 应用公开的函数或可执行功能,用于在现实世界中执行操作。
Android 设备管理 MCP 服务器具有以下工具:
| MCP 工具 | |
|---|---|
| get_enterprise | 获取给定企业 ID 的企业。需要在名称字段中提供企业 ID(例如 enterprises/{enterpriseId})。 |
| list_enterprises | 列出调用者可访问的企业。 |
| get_application | 获取指定企业和应用 ID 的应用详细信息。需要采用以下格式的资源名称:enterprises/{enterpriseId}/applications/{applicationId}。 |
| get_device | 获取指定企业和设备 ID 的设备详细信息。需要采用以下格式的资源名称:enterprises/{enterpriseId}/devices/{deviceId}。 |
| list_devices | 列出指定企业的设备。需要在父字段中提供企业 ID(例如 enterprises/{enterpriseId})。 |
| get_policy | 获取指定企业和政策 ID 的政策。需要采用以下格式的资源名称:enterprises/{enterpriseId}/policies/{policyId}。 |
| list_policies | 列出指定企业的政策。需要在父字段中提供企业资源名称(例如 enterprises/{enterpriseId})。 |
| get_web_app | 获取 Web 应用。需要采用以下格式的资源名称:enterprises/{enterpriseId}/webApps/{webAppId}。 |
| list_web_apps | 列出指定企业的 Web 应用。需要在父字段中提供企业资源名称(例如 enterprises/{enterpriseId})。 |
获取 MCP 工具规范
如需获取 MCP 服务器中所有工具的 MCP 工具规范,请使用 tools/list 方法。下面的示例演示了如何使用 curl 列出 MCP 服务器中当前可用的所有工具及其规范。
| Curl 请求 |
|---|
curl --location 'https://androidmanagement.googleapis.com/mcp' \ --header 'content-type: application/json' \ --header 'accept: application/json, text/event-stream' \ --data '{ "method": "tools/list", "jsonrpc": "2.0", "id": 1 }' |