Model Context Protocol (MCP) 伺服器可做為代理伺服器,在外部服務與大型語言模型 (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 | 取得網路應用程式。資源名稱格式必須為:enterprises/{enterpriseId}/webApps/{webAppId}。 |
| list_web_apps | 列出指定企業的網頁應用程式。需要在父項欄位中提供企業資源名稱 (例如: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 }' |