AS

azure-samples/remote-mcp-apim-functions-python

Developer tools

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기

131 stars 79 forks 품질 69 트렌드 30MIT

azure-samples/remote-mcp-apim-functions-python은 [[T0]에서 임포트된 MCP 서버 후보입니다.

개요

azure-samples/remote-mcp-apim-functions-python은 [[T0]에서 임포트된 MCP 서버 후보입니다.

개요(AI 번역)

Azure API Management는 MCP 서버의 AI 게이트웨이 역할을 합니다.

이 샘플은 최신 MCP 인증 명세를 구현합니다

이것은 흐름을 이해하기 위한 시퀀스다이어그램입니다.

Deploy Remote MCP Server to Azure에

  1. 자원 제공자를 등록합니다.
  • Azure CLI를 사용 중이라면 az provider register --namespace Microsoft.App --wait를 실행하세요.
  • Azure PowerShell을 사용 중이라면 Register-AzResourceProvider -ProviderNamespace Microsoft.App를 실행하세요. 일정 시간 후에 (Get-AzResourceProvider -ProviderNamespace Microsoft.App).RegistrationState를 실행하여 등록이 완료되었는지 확인하세요.
  1. api 관리 서비스, 함수 앱(코드와 함께) 및 기타 필요한 Azure 리소스를 프로비저닝하기 위해 azd 명령을 실행하세요

MCP 검사관과의 시험

  1. 새 터미널 창에서 MCP 인스펙터를 설치하고 실행하세요

  2. CTRL 버튼을 누르면 앱에서 표시되는 URL에서 MCP 인스펙터 웹 앱을 불러오기 위해서(예: http://127.0.0.1:6274/#resources)

  3. 전송 유형을 [[T5]로 설정하세요.

  4. azd up 및 Connect 후에 표시되는 실행 중인 API 관리 SSE 엔드포인트의 URL을 설정하세요:

  5. 도구 목록. 도구를 클릭하고 도구 실행.

기술 아키텍처 개요

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요.

README

원문 README의 일부입니다. 원문 보기.

Secure Remote MCP Servers using Azure API Management (Experimental)

Azure API Management acts as the AI Gateway for MCP servers.

This sample implements the latest MCP Authorization specification

This is a sequence diagram to understand the flow.

Deploy Remote MCP Server to Azure

  1. Register Microsoft.App resource provider.

    • If you are using Azure CLI, run az provider register --namespace Microsoft.App --wait.
    • If you are using Azure PowerShell, run Register-AzResourceProvider -ProviderNamespace Microsoft.App. Then run (Get-AzResourceProvider -ProviderNamespace Microsoft.App).RegistrationState after some time to check if the registration is complete.
  2. Run this azd command to provision the api management service, function app(with code) and all other required Azure resources

    azd up
    

Test with MCP Inspector

  1. In a new terminal window, install and run MCP Inspector

    npx @modelcontextprotocol/inspector
    
  2. CTRL click to load the MCP Inspector web app from the URL displayed by the app (e.g. http://127.0.0.1:6274/#resources)

  3. Set the transport type to SSE

  4. Set the URL to your running API Management SSE endpoint displayed after azd up and Connect:

    https://.azure-api.net/mcp/sse
    
  5. List Tools. Click on a tool and Run Tool.

Technical Architecture Overview

This solution deploys a secure MCP (Model Context Protocol) server infrastructure on Azure. The architecture implements a multi-layered security model with Azure API Management serving as an intelligent gateway that handles authentication, authorization, and request routing.

Deployed Azure Resources

The infrastructure provisions the following Azure resources:

Core Gateway Infrastructure

  • Azure API Management (APIM) - The central security gateway that exposes both OAuth and MCP APIs
    • SKU: BasicV2 (configurable)
    • Identity: System-assigned and user-assigned managed identities
    • Purpose: Handles authentication flows, request validation, and secure proxying to backend services

Backend Compute

  • Azure Function App - Hosts the MCP server implementation
    • Runtime: Python 3.11 on Flex Consumption plan
GitHub에서 전체 README 보기

설치

npx @modelcontextprotocol/inspector
MCP 초보자라면? mcpskill.org 가이드부터 시작하세요 →