Secure Remote MCP Server

by Azure-Samples
Verified

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

Integrations

  • Azure Functions support for the MCP implementation, providing serverless compute functionality for the MCP authorization flow.

  • Allows implementation of MCP servers using Python, mentioned as one of the languages used in the sample.

Azure API Management を使用してリモート MCP サーバーを保護する (試験的)

Azure API Management は、MCP サーバーのAI ゲートウェイとして機能します。

このサンプルは最新のMCP認証仕様を実装しています

流れを理解するためのシーケンス図です。

リモート MCP サーバーを Azure にデプロイする

  1. Microsoft.Appリソース プロバイダーを登録します。
    • Azure CLI を使用している場合は、 az provider register --namespace Microsoft.App --wait実行します。
    • Azure PowerShell を使用している場合は、 Register-AzResourceProvider -ProviderNamespace Microsoft.Appを実行します。その後、しばらくしてから(Get-AzResourceProvider -ProviderNamespace Microsoft.App).RegistrationStateを実行して、登録が完了したかどうかを確認します。
  2. このazdコマンドを実行して、API 管理サービス、関数アプリ (コード付き)、およびその他の必要なすべての Azure リソースをプロビジョニングします。
    azd up

MCP検査官

  1. 新しいターミナルウィンドウで、MCP Inspectorをインストールして実行します。
    npx @modelcontextprotocol/inspector
  2. Ctrl キーを押しながらクリックして、アプリによって表示される URL から MCP Inspector Web アプリを読み込みます (例: http://127.0.0.1:6274/#resources )
  3. トランスポートタイプをSSEに設定する
  4. azd upConnectの後に表示される実行中の API Management SSE エンドポイントへの URL を設定します。
    https://<apim-servicename-from-azd-output>.azure-api.net/mcp/sse
  5. ツールの一覧を表示します。ツールをクリックしてツールを実行してください
-
security - not tested
A
license - permissive license
-
quality - not tested

Azure API Management を使用して MCP サーバーの AI ゲートウェイとして機能し、最新の MCP 承認仕様を実装します。

  1. Deploy Remote MCP Server to Azure
    1. MCP Inspector
ID: z6m4culv8z