先日、Microsoft の公式ドキュメントを検索するためのオフィシャル MCP サーバー (Microsoft Docs MCP Server) が公開されました。自分のような Azure ユーザーには大変嬉しい発表です。
ただ、具体的な実装とアーキテクチャは公開されておらず、どんな動作をするのか未知な部分があります。そこで、本記事では Microsoft Docs MCP Server を使ってみてわかったことを少しまとめてみました。
なお、読者には MCP の基礎知識があることを前提にしています。MCP について知りたい場合は、次のような文献をあたってみてください。
また、Microsoft が提供している MCP サーバーは、Microsoft Docs MCP Server だけではありません。Azure MCP Server など、他のオフィシャル実装も気になる場合は、以下をチェックしてみてください。
設定方法
Microsoft Docs MCP Server を使用するには、Streamable HTTP に対応する MCP クライアントで、エンドポイントに https://learn.microsoft.com/api/mcp
を指定します。
VS Code (GitHub Copilot) では、次のような構成に相当します。
settings.json
"mcp": {
"inputs": [],
"servers": {
"msdocsmicrosoft.docs.mcp": {
"type": "http",
"url": "https://learn.microsoft.com/api/mcp"
}
}
},
今回は MCP サーバーの動作確認が主な目的なので、クライアントに MCP Inspector を使いました。MCP サーバーに発行するリクエスト (e.g. 検索キーワード) を設定したり、MCP サーバーからのレスポンス (e.g. 検索にヒットした公式ドキュメント) を閲覧する機能があるため、ツールを操る LLM の非決定的な振る舞いに邪魔されずに検証できます。
提供される機能
2025/6/15 現在、Microsoft Docs MCP Server が提供する機能 (リソース/プロンプト/ツール) は、microsoft_docs_search
ツールのみです。
このツールは、検索キーワードを入力に受取、それに関連する公式ドキュメントのコンテンツと 英語版のドキュメント URL を返却します。
以下は、List Tools 実行時に返却される (LLM/エージェントが参照する) ツールの説明文です。
Search official Microsoft/Azure documentation to find the most relevant and trustworthy content for a user’s query. This tool returns up to 10 high-quality content chunks (each max 500 tokens), extracted from Microsoft Learn and other official sources. Each result includes the article title, URL, and a self-contained content excerpt optimized for fast retrieval and reasoning. Always use this tool to quickly ground your answers in accurate, first-party Microsoft/Azure knowledge.
検索を試してみた結果、キーワード検索とセマンティック検索を混ぜ合わせた検索スタイルのようです:
-
UserErrorGuestAgentStatusUnavailable
のようなエラーコードを直接検索キーワードにすると、そのエラーコードが記述されているドキュメントをしっかり拾ってくれます。 -
Microsoft 365 Copilot のデータ保持ポリシーについて知りたい
のような自然言語によるファジーな検索にも対応しています。入力文に関しては、日本語でも英語でも問題ないようなので、最近の言語モデルを使ったセマンティック検索が実装されていると予想されます。
microsoft_docs_search の特徴
レスポンス
MCP サーバーからのレスポンスは、 最大 10 個のコンテンツ (公式ドキュメントのチャンク) のリストです。以下は、実際のレスポンスの例です。
「UserErrorGuestAgentStatusUnavailable」に対するレスポンス
[
{
"title": "Troubleshoot Azure Backup failures caused by agent or extension issues",
"content": "# Troubleshoot Azure Backup failures caused by agent or extension issues\n## Step-by-step guide to troubleshoot backup failures\n5. **Ensure the VSS writer service is up and running**: Follow these steps To [Troubleshoot VSS writer issues](https://learn.microsoft.com/en-us/azure/backup/backup-azure-vms-troubleshoot#extensionfailedvsswriterinbadstate---snapshot-operation-failed-because-vss-writers-were-in-a-bad-state).\n6. **Follow backup best practice guidelines**: Review the [best practices to enable Azure VM backup](https://learn.microsoft.com/en-us/azure/backup/backup-azure-vms-introduction#best-practices).\n7. **Review guidelines for encrypted disks**: If you're enabling backup for VMs with encrypted disk, ensure you've provided all the required permissions. To learn more, see [Back up and restore encrypted Azure VM](https://learn.microsoft.com/en-us/azure/backup/backup-azure-vms-encryption).\n## UserErrorGuestAgentStatusUnavailable - VM agent unable to communicate with Azure Backup\n**Error code**: UserErrorGuestAgentStatusUnavailable **Error message**: VM Agent unable to communicate with Azure Backup\nThe Azure VM agent might be stopped, outdated, in an inconsistent state, or not installed. These states prevent the Azure Backup service from triggering snapshots.\n1. **Open Azure portal > VM > Settings > Properties pane** > ensure VM **Status** is **Running** and **Agent status** is **Ready**. If the VM agent is stopped or is in an inconsistent state, restart the agent\n1.1. For Windows VMs, follow these steps to restart the Guest Agent.\n1.2. For Linux VMs, follow these steps to restart the Guest Agent.\n2. **Open Azure portal > VM > Settings > Extensions** > Ensure all extensions are in **provisioning succeeded** state. If not, follow these steps to resolve the issue.",
"contentUrl": "https://learn.microsoft.com/en-us/azure/backup/backup-azure-troubleshoot-vm-backup-fails-snapshot-timeout#step-by-step-guide-to-troubleshoot-backup-failures"
},
{
"title": "Troubleshoot Azure Windows VM Agent issues",
"content": "# Troubleshoot Azure Windows VM Agent issues\n## Troubleshooting checklist\nFor any VM extension to be able to run, Azure VM Guest Agent must be installed and working successfully. If you see that Guest Agent is reported as **Not ready**, or if an extension is failing and returning an error message such as `VMAgentStatusCommunicationError`, follow these steps to begin troubleshooting Guest Agent.\n### Step 1: Check whether the VM is started\nTo verify that the VM is started, follow these steps:\n1. In the [Azure portal](https://portal.azure.com), search for and select **Virtual machines**.\n2. In the list of VMs, select the name of your Azure VM.\n3. In the navigation pane of your Azure VM, select **Overview**.\n4. If the VM isn't turned on already, locate the list of actions at the top of the **Overview** page, and then select the **Start** link.\nAlso, verify that the operating system (OS) is started and running successfully.\n### Step 2: Check whether Guest Agent is ready\nWhile you're still on the VM overview page of the Azure portal, select the **Properties** tab. If the **Agent status** field has a value of **Ready**, verify that the **Agent version** field value satisfies the [minimum supported version](https://learn.microsoft.com/en-us/troubleshoot/azure/virtual-machines/windows/support-extensions-agent-version). The following screenshot shows where you can find these fields.\nIf the Guest Agent status is **Ready** but you have an issue that involves a VM extension, see [Azure virtual machine extensions and features](https://learn.microsoft.com/en-us/azure/virtual-machines/extensions/overview) to review troubleshooting suggestions.\nIf the Guest Agent status is **Not ready** or blank, then either Guest Agent isn't installed or it isn't working correctly.\n### Step 3: Check whether the Guest Agent services are running\n1. [Use Remote Desktop Protocol (RDP) to connect to your VM](https://learn.microsoft.com/en-us/azure/virtual-machines/windows/connect-rdp).\n Note\n The Guest Agent isn't necessary for RDP connectivity to work successfully. If you experience issues that affect RDP connectivity to your VM, see [Troubleshoot Remote Desktop connections to an Azure virtual machine](https://learn.microsoft.com/en-us/troubleshoot/azure/virtual-machines/windows/troubleshoot-rdp-connection).\n2. On your VM, select **Start**, search for *services.msc*, and then select the **Services** app.\n3. In the **Services** window, select the **RdAgent** service.",
"contentUrl": "https://learn.microsoft.com/en-us/troubleshoot/azure/virtual-machines/windows/windows-azure-guest-agent#troubleshooting-checklist"
},
{
"title": "Troubleshoot Azure Windows VM Agent issues",
"content": "# Troubleshoot Azure Windows VM Agent issues\n## Troubleshooting checklist\n4. Select the **Action** menu, and then select **Properties**.\n5. On the **General** tab of the **Properties** dialog box, make sure that the following conditions are true, and then select the **OK** or **Cancel** button:\n5.1. The **Startup type** drop-down list is set to **Automatic**.\n5.2. The **Service status** field has a value of **Running**.\n6. In the **Services** window, select the **WindowsAzureGuestAgent** service.\n7. Repeat steps 4 and 5.\nIf the services don't exist, the Guest Agent probably isn't installed. In this case, you can [manually install the Guest Agent](https://learn.microsoft.com/en-us/azure/virtual-machines/extensions/agent-windows#manual-installation). Before you do a manual installation, [check the installation prerequisites](https://learn.microsoft.com/en-us/azure/virtual-machines/extensions/agent-windows#prerequisites).\n### Step 4: Test WireServer connectivity\nTo run successfully, Guest Agent requires connectivity to the WireServer IP (host IP) address `168.63.129.16` on ports `80` and `32526`. For instructions about how to test connectivity to this IP address, see the [Troubleshoot connectivity](https://learn.microsoft.com/en-us/azure/virtual-network/what-is-ip-address-168-63-129-16#troubleshoot-connectivity) section of [What is IP address 168.63.129.16?](https://learn.microsoft.com/en-us/azure/virtual-network/what-is-ip-address-168-63-129-16)\nIf any of the tests in that section don't connect, check for issues that might cause any of the following components to block access to IP address `168.63.129.16`:\n1. A firewall\n2. A proxy\n3. An application\n### Step 5: Review log files\nCheck the following log locations for any notable errors:\n1. *C:\\WindowsAzure\\Logs\\WaAppAgent.log*\n2. *C:\\WindowsAzure\\Logs\\TransparentInstaller.log*\nCompare any errors that you find to the following common scenarios that can cause the Azure VM Agent to show a **Not ready** status or stop working as expected.",
"contentUrl": "https://learn.microsoft.com/en-us/troubleshoot/azure/virtual-machines/windows/windows-azure-guest-agent#troubleshooting-checklist"
},
{
"title": "Troubleshoot Azure Windows VM Agent issues",
"content": "# Troubleshoot Azure Windows VM Agent issues\n## Cause 9: Windows Guest Agent doesn't start because of a ConfigurationErrorsException or TypeInitializationException error\nWindows Guest Agent stops responding upon startup, and the following Application log entries are displayed:\nThis issue might occur if the *C:\\Windows\\Microsoft.NET\\Framework64\\v4.0.30319\\Config\\machine.config* file is missing or corrupted.\n### Solution 9: Copy a working machine.config file to the VM, and then restart the Guest Agent services\nTo resolve the issue, follow these steps:\n1. Copy the *machine.config* file from a working VM, and then paste the file into the *C:\\Windows\\Microsoft.NET\\Framework64\\v4.0.30319\\Config* folder on the problematic VM.\n2. Restart the Guest Agent services by running the `net stop` and `net start` commands:\n```cmd\n net stop RdAgent\n net stop WindowsAzureGuestAgent\n\n net start RdAgent\n net start WindowsAzureGuestAgent\n```",
"contentUrl": "https://learn.microsoft.com/en-us/troubleshoot/azure/virtual-machines/windows/windows-azure-guest-agent#cause-9-windows-guest-agent-doesn't-start-because-of-a-configurationerrorsexception-or-typeinitializationexception-error"
},
{
"title": "Troubleshoot Azure Backup failures caused by agent or extension issues",
"content": "# Troubleshoot Azure Backup failures caused by agent or extension issues\n## GuestAgentSnapshotTaskStatusError - Could not communicate with the VM agent for snapshot status\n**Error code**: GuestAgentSnapshotTaskStatusError **Error message**: Could not communicate with the VM agent for snapshot status \nAfter you register and schedule a VM for the Azure Backup service, Backup starts the job by communicating with the VM backup extension to take a point-in-time snapshot. Any of the following conditions might prevent the snapshot from being triggered. If the snapshot isn't triggered, a backup failure might occur. Complete the following troubleshooting steps in the order listed, and then retry your operation:\n**Cause 1: The agent is installed in the VM, but it's unresponsive (for Windows VMs)**\n**Cause 2: The agent installed in the VM is out of date (for Linux VMs)**\n**Cause 3: The snapshot status can't be retrieved, or a snapshot can't be taken**\n**Cause 4: VM-Agent configuration options are not set (for Linux VMs)**\n**Cause 5: Application control solution is blocking IaaSBcdrExtension.exe**\n## UserErrorVmProvisioningStateFailed - The VM is in failed provisioning state\n**Error code**: UserErrorVmProvisioningStateFailed **Error message**: The VM is in failed provisioning state\nThis error occurs when one of the extension failures puts the VM into provisioning failed state.**Open Azure portal > VM > Settings > Extensions > Extensions status** and check if all extensions are in **provisioning succeeded** state. To learn more, see [Provisioning states](https://learn.microsoft.com/en-us/azure/virtual-machines/states-billing).\n1. If any extension is in a failed state, then it can interfere with the backup. Ensure those extension issues are resolved and retry the backup operation.\n2. If the VM provisioning state is in an updating state, it can interfere with the backup. Ensure that it's healthy and retry the backup operation.",
"contentUrl": "https://learn.microsoft.com/en-us/azure/backup/backup-azure-troubleshoot-vm-backup-fails-snapshot-timeout#guestagentsnapshottaskstatuserror---could-not-communicate-with-the-vm-agent-for-snapshot-status"
},
{
"title": "Troubleshoot Azure VM extension issues",
"content": "# Troubleshoot Azure VM extension issues\n## Protection fails because the VM agent is unresponsive\nError message: \"Task execution has timed out while tracking for extension operation to be started.\" Error code: \"151099\"\nThis error can happen if the Azure guest agent in the virtual machine isn't in the ready state.\nYou can check the status of Azure guest agent in the [Azure portal](https://portal.azure.com/). Go to the virtual machine you're trying to protect and check the status in **VM** > **Settings** > **Properties** > **Agent status**. Most of the time, the status of the agent is ready after rebooting the virtual machine. However, if you can't reboot or you're still facing the issue, then complete the following troubleshooting steps:\n1. The agent is installed in the VM, but it's unresponsive (for Windows VMs)\n2. The agent installed in the VM is out of date (for Linux VMs)\nError message: \"Task execution has timed out while tracking for extension operation to be started.\" Error code: \"151095\"\nThis error occurs when the agent version on the Linux machine is out of date. Complete the following troubleshooting step:\n1. The agent installed in the VM is out of date (for Linux VMs)",
"contentUrl": "https://learn.microsoft.com/en-us/azure/site-recovery/site-recovery-extension-troubleshoot#protection-fails-because-the-vm-agent-is-unresponsive"
},
{
"title": "Troubleshoot session host virtual machine configuration",
"content": "# Troubleshoot session host virtual machine configuration\n## Azure Virtual Desktop Agent isn't registering with the Azure Virtual Desktop service\nWhen the Azure Virtual Desktop Agent is first installed on session host VMs (either manually or through the Azure Resource Manager template and PowerShell DSC), it provides a registration token. The following section covers troubleshooting issues that apply to the Azure Virtual Desktop Agent and the token.\n### Error: The status filed in Get-AzWvdSessionHost cmdlet shows status as Unavailable\n#### Cause\nThe agent isn't able to update itself to a new version.\n#### Resolution\nFollow these instructions to manually update the agent:\n1. Download a new version of the agent on the session host VM.\n2. Launch Task Manager. In the **Service** tab, stop the **RDAgentBootLoader** service.\n3. Run the installer for the new version of the Azure Virtual Desktop Agent.\n4. When prompted for the registration token, remove the entry **INVALID\\_TOKEN** and press next (a new token isn't required).\n5. Complete the installation Wizard.\n6. Open Task Manager and start the **RDAgentBootLoader** service.",
"contentUrl": "https://learn.microsoft.com/en-us/troubleshoot/azure/virtual-desktop/troubleshoot-vm-configuration#azure-virtual-desktop-agent-isn't-registering-with-the-azure-virtual-desktop-service"
},
{
"title": "Error AADSTS500571 - Guest user account is disabled",
"content": "# Error AADSTS500571 - Guest user account is disabled\nThis article discusses how to resolve an `AADSTS500571` error that occurs when a user tries to sign in to an application that can be used together with Microsoft Entra ID.\n## Symptoms\nWhen a guest user tries to sign in to an application that's integrated into Microsoft Entra ID, they receive an \"AADSTS500571\" error message (\"The guest user account is disabled\").\n## Cause\nThe guest user object is disabled on the resource tenant.\n## Solution\nEngage the resource tenant owners or sponsor to determine the reason that the guest account is disabled. Then, take the corresponding action, as shown in the following table.\n| Scenario | Action| \n| --- | --- |\n| The guest account is supposed to be disabled. | No actions should be performed. Access is expectedly blocked. |\n| The guest account isn't supposed to be disabled, or it was disabled by mistake. | Resource tenant owners should re-enable the account. One of the options to re-enable the account is by using PowerShell to set the `-AccountEnabled` parameter to `$true`, as described in the [Set-AzureADUser](https://learn.microsoft.com/en-us/powershell/module/azuread/set-azureaduser#parameters) cmdlet reference. |\n\n## More information\nFor a full list of authentication and authorization error codes, see [Microsoft Entra authentication and authorization error codes](https://learn.microsoft.com/en-us/azure/active-directory/develop/reference-error-codes).\nTo investigate individual errors, go to https://login.microsoftonline.com/error.\n## Contact us for help\nIf you have questions or need help, [create a support request](https://ms.portal.azure.com/#blade/Microsoft_Azure_Support/HelpAndSupportBlade/overview?DMC=troubleshoot), or ask [Azure community support](https://learn.microsoft.com/en-us/answers/products/azure?product=all). You can also submit product feedback to [Azure feedback community](https://feedback.azure.com/d365community).",
"contentUrl": "https://learn.microsoft.com/en-us/troubleshoot/entra/entra-id/app-integration/error-code-aadsts500571-guest-user-account-is-disabled"
},
{
"title": "Troubleshoot Azure Windows VM Agent issues",
"content": "# Troubleshoot Azure Windows VM Agent issues\n## Cause 8: System.BadImageFormatException: An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)\nYou notice the following error entries in the *WaAppAgent.log* file that indicate that Guest Agent isn't responding:\nMost likely, these error entries occur because a third-party application was installed on the VM, and it modified the behavior of 32-bit or 64-bit .NET applications.\nA `BadImageFormatException` error occurs when a 64-bit application is loading a 32-bit DLL.\n### Solution 8: Set the Enable64Bit registry entry for .NET Framework and restart the VM\nImportant\nThis section, method, or task contains steps that tell you how to modify the registry. However, serious problems might occur if you modify the registry incorrectly. Therefore, make sure that you follow these steps carefully. For protection, back up the registry before you modify it so that you can restore it if a problem occurs. For more information about how to back up and restore the registry, see [How to back up and restore the registry in Windows](https://support.microsoft.com/help/322756).\nOpen the registry, locate the **HKEY\\_LOCAL\\_MACHINE\\SOFTWARE\\Microsoft\\.NETFramework** registry subkey, and then view the **Enable64Bit** registry entry.\nIf the **Enable64Bit** registry entry is set to **0**, then 64-bit .NET applications are considered as 32-bit applications. Therefore, Azure VM Agent doesn't work.\nThe solution is to set the **Enable64Bit** key to **1**, and then restart the VM.",
"contentUrl": "https://learn.microsoft.com/en-us/troubleshoot/azure/virtual-machines/windows/windows-azure-guest-agent#cause-8-systembadimageformatexception-an-attempt-was-made-to-load-a-program-with-an-incorrect-format-exception-from-hresult-0x8007000b"
},
{
"title": "An agent-related error code occurs when running an attended or unattended desktop flow",
"content": "# An agent-related error code occurs when running an attended or unattended desktop flow\n## Error codes\n| Error code | Description | Cause | Mitigation steps| \n| --- | --- | --- | --- |\n| AgentNotReachable | The agent running the desktop flow isn't reachable. | This error code occurs when the Power Automate service running on your machine can no longer communicate with the agent in the user session executing your flow. It's typically caused by suboptimal machine performance, such as high CPU usage, and might temporarily block the communication between the service and the agent. For more information about all the prerequisites and limitations you should consider before installing and using Power Automate on your desktop, see [Prerequisites and limitations](https://learn.microsoft.com/en-us/power-automate/desktop-flows/requirements). | - Ensure that no other users connect to the machine while automations run.
- Verify that the machine has sufficient compute and memory resources.
- Check if the machine restarts during the execution.
- If you still have the problem, you can try increasing the time-out the Power Automate service uses to communicate with the agent. By default, the value is set to 10 seconds. |\n| UnresponsiveAgent | The agent running the desktop flow isn't responsive. | This error code occurs when the Power Automate service running on your machine can no longer communicate with the agent in the user session executing your flow. It's typically caused by suboptimal machine performance, such as high CPU usage, and might temporarily block the communication between the service and the agent. For more information about all the prerequisites and limitations you should consider before installing and using Power Automate on your desktop, see [Prerequisites and limitations](https://learn.microsoft.com/en-us/power-automate/desktop-flows/requirements). | - Verify that the machine has sufficient compute and memory resources.
- If you still have the problem, you can try increasing the time-out the Power Automate service uses to communicate with the agent. By default, the value is set to 10 seconds. |",
"contentUrl": "https://learn.microsoft.com/en-us/troubleshoot/power-platform/power-automate/desktop-flows/agent-connectivity-issues-pad#error-codes"
}
]
返却されたコンテンツがクライアント (LLM/エージェント) で取り扱いやすいように、次のような工夫が施されています。
- ドキュメントのタイトルと URL が必ず含まれる。
- Markdown 形式で記述されている (ドキュメントの構造が保持される)。
- コンテンツが見出し (h1 や h2) から始まるように分割されている。
コンテンツは、関連度順 (最も関連するものが先頭に来るよう) にソートされています。どの記事をどの順番で使用するかクライアントで調整できる場合は、関連度順の想定で実装すると良いかもしれません。
検索スコープ
GitHub ページでは、検索対象のコンテンツは Microsoft Learn、Azure ドキュメント、M365 ドキュメント、その他の Microsoft のリソースと記述されています。
Microsoft Learn, Azure documentation, Microsoft 365 documentation, and other official Microsoft sources.
https://github.com/MicrosoftDocs/mcp?tab=readme-ov-file#-key-capabilities
そこで、実際にどの程度カバーできてるのか、簡単に実験してみます。Product directory の製品一覧 から、サービスをいくつかピックアップして検証しました。
具体的には、サービスごとに適当な公式ドキュメント ページを選定し、サービス名とページ タイトルを query
に設定して microsoft_docs_search
を実行します。そして、レスポンスにその製品の URL が含まれていれば、サービスが検索に対応していると判断します。
query の例
{ "query": "Dynamics 365: Integration overview for Business Central (for architects and developers)" }
結果は、次の通りです。
試したサービスはすべて検索可能だったので、かなり広域なコンテンツがカバーされているだろうと考えられます。
Azure 関連で言えば、アーキテクチャセンター、Well-Architected Framework (WAF)、Could Adoption Framework (CAF) が対象に含まれているのが嬉しいです。例えば、ミッションクリティカルな Azure システムのベストプラクティス
のように雑にクエリを投げても、次のような URL からコンテンツを取って来てくれます。
最新情報の検索反映スピード
GitHub のページでは、「最新の情報が取得できる」と記述されています。
- Real-time Updates: Access the latest Microsoft documentation as it’s published.
一般に、検索エンジンは前処理したコンテンツのみを検索対象とするため、真に最新のコンテンツが検索できるとは限りません。たとえば、流行りの文書埋め込みによるセマンティック検索なんかでは、検索対象のチャンク化とインデックス化の前処理が必要です。
そこで、どこまで最新の情報が取れるのか確認してみます。GitHub 上の更新履歴を見ると、ドキュメントでの反映が確認できた最新の更新が以下のコミットでした。これは、確認の 14 時間前 に加わったドキュメント更新です。
OpenPBS Integration: OpenPBS scheduler configuration in Azure CycleCloud
で検索すると、ディスクサイズが 20g にハードコーディングされている旨の内容が含まれていました。
これは、14 時間前に更新されたコンテンツと一致しています。
したがって、少なくとも 14 時間前の更新であれば、検索に反映されていることがわかりました。厳密なインデックス更新のレイテンシは分からないものの、実用上十分短いレイテンシであるものと考えられます。
動作例: GitHub Copilot
GitHub Copilot のエージェントモードで microsoft_docs_search
を使用した場合の動作例を紹介します。
Bicep コードが含まれるレポジトリ上で、Bicep のベストプラクティスを調べてみます。この質問をした後、Bicep コードを記述するための GitHub Copilot インストラクション (.github/instructions/…) を作ってもらう想定です。
まずは、素の GitHub Copilot を使った際の回答です。
使用したモデル GPT-4.1
は、カットオフ日が 2024/6 と比較的新しいため、それなりの回答を作ってくれました。ですが、インストラクションに変換したいかと言われると微妙です。
続いて、GitHub Copilot for Azure を使って回答を生成してみます。GitHub Copilot for Azure は、自分の Azure リソースにアクセスしてコンテキストを付与するための GitHub Copilot 向け拡張機能ですが、簡易的に Azure ドキュメントを検索する azure_query_learn
ツールを備えます。ここでは、そのツールを呼び出して同じ質問をします。
グランディングできている点は先程よりも一歩前進ですが、自分が期待する回答とほど遠い結果となりました。サーバーとのやり取りを見ると、レスポンスに含まれるコンテンツ ページが一つだけだったので、取得できる情報の少なさがボトルネックのようです。
azure_query_learn で返却されたレスポンス
最後に、microsoft_docs_search
を使用して回答を生成してみます。
見切れてしまっていますが、10 件の関連ドキュメントによる回答なので詳細な部分まで踏み込んだ説明になっています。試したシナリオの中では最も期待する回答に近いものが得られました。
まとめ
本記事では、Microsoft Docs の公式 MCP サーバー (Microsoft Docs MCP Server) が提供する microsoft_docs_search
ツールの検証を通して、次のような特徴があることを確認しました。
- 高精度な検索能力: エラーコードのような具体的なキーワードから、「Microsoft 365 Copilot のデータ保持ポリシーについて知りたい」といった自然言語によるファジーなクエリまで、どちらも高い精度で関連性の高いドキュメントを抽出できました。キーワード検索とセマンティック検索を組み合わせた、最新の検索エンジンに近い挙動をしていると考えられます。
- LLM に最適化されたコンテンツ形式: 検索結果は、タイトルと URL を含む Markdown 形式のコンテンツ チャンクとして提供されます。各チャンクはドキュメントの見出しから始まり、LLM が扱いやすいように工夫されています。返却されるコンテンツは関連度順にソートされているように見え、これは RAG システムにおける情報の利用効率を高めるのに役立つでしょう。
- 広範なドキュメントの網羅: Azure、Microsoft 365、Windows、.NET、Dynamics 365 など、Microsoft の主要な公式ドキュメントが幅広く検索対象に含まれていることを確認しました。特に Azure のアーキテクチャ関連ドキュメント(Azure Architecture Center, Well-Architected Framework, Cloud Adoption Framework)がカバーされているのは、Azure ユーザーにとって大きなメリットです。
- 迅速な情報反映: GitHub でのドキュメント更新から少なくとも 14 時間後には、その内容が MCP サーバーの検索結果に反映されていることを確認しました。これにより、常に最新の公式情報を参照できることが期待できます。
M365 Copilot エージェントも Streamable HTTP に対応していますし、Microsoft Docs MCP Server を手軽に使えるクライアントは増えてきています。これからどんな活用事例が生まれてくるのか、非常に楽しみです。
Views: 0