EA

elbruno/aspire.mcp.sample

Developer tools

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

48 stars 20 forks 품질 44 트렌드 13MIT

elbruno/aspire.mcp.sample는 MCP 서버 후보가 https://github.com/elbruno/aspire.mcp.sample.에서 수입됩니다

개요

elbruno/aspire.mcp.sample는 MCP 서버 후보가 https://github.com/elbruno/aspire.mcp.sample.에서 수입됩니다

개요(AI 번역)

샘플 MCP Aspire를 사용하여 서버 및 MCP 클라이언트.

개요

이 샘플은 Aspire를 사용하여 Model Context Protocol (MCP) Server 및 클라이언트 설정을 보여줍니다. 구조화된 Aspire 환경에서 C#를 사용하여 MCP 통신을 수립하고 관리하는 방법을 보여줍니다.

# 빠른 데모

이 5 분의 비디오 개요를 체크 아웃하여 프로젝트의 작업을 볼 수 있습니다.

이 5 분의 비디오 개요를 확인하여 Azure에 솔루션을 배포하는 방법을 확인하고 Visual Studio Code에서 Azure에 배포 된 MCP Server를 사용하는 방법.

특징

  • Aspire Integration: 컨테이너화된 오케스트라 및 서비스 관리에 대한 Aspire를 사용합니다.
  • MCP Server: 클라이언트 통신을 관리하기 위해 MCP 서버를 구현합니다.
  • MCP Client: 샘플 Blazor Chat 클라이언트는 MCP 서버와 연결하고 통신하는 방법을 결정합니다.
  • 모형 선택: Chat Client는 Azure AI Foundry, Ollama 또는 GitHub 모델에서 LLM을 사용할 수 있습니다. 선택된 모델은 MCP 서버 함수를 호출할 수 있어야 합니다.
  • 기능 호출: 선택된 모델을 사용하여 MCP 서버에서 함수를 호출하는 방법을 결정합니다. -Tool 결과: 채팅 인터페이스에서 함수 호출의 결과를 표시합니다.

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

README

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

Aspire.MCP.Sample

Sample MCP Server and MCP client using Aspire.

Overview

This sample demonstrates a Model Context Protocol (MCP) Server and client setup using Aspire. It showcases how to establish and manage MCP communication, using C# in a structured Aspire environment.

Quick Demo

Check out this 5-minute video overview to see the project in action.

Check out this 5-minute video overview to see how to deploy the solution to Azure, and how to consume the deployed MCP Server in Azure from Visual Studio Code.

Features

  • Aspire Integration: Uses Aspire for containerized orchestration and service management.
  • MCP Server: Implements an MCP server to manage client communication.
  • MCP Client: Sample Blazor Chat client demonstrating how to connect and communicate with the MCP server.
  • Model Selection: The Chat Client can use LLMs from Azure AI Foundry, Ollama or GitHub models. The selected model must support function calling to be able to call the MCP server functions.
  • Function Calling: Demonstrates how to call functions from the MCP server using the selected model.
  • Tool Result: Displays the result of the function call in the chat interface.
  • Azure Deployment: The project can be easily deployed to Azure using azd commands.

Getting Started

Prerequisites

  • .NET SDK 9.0 or later
  • Visual Studio 2022 or Visual Studio code
  • LLM or SLM that supports function calling.
    • Azure AI Foundry to run models in the cloud. IE: gpt-4o-mini
    • GitHub Models to run models in the cloud. IE: gpt-4o-mini
    • Ollama for running local models. Suggested: phi4-mini, llama3.2 or Qwq

Run locally

  1. Clone the repository:

  2. Navigate to the Aspire project directory:

    cd .\src\McpSample.AppHost\
    
  3. Run the project:

    dotnet run
    
  4. In the Aspire Dashboard, navigate to the Blazor Chat client project.

  5. In the Chat Settings page, define the model to be used. You choose to use models in Azure AI Foundry (suggested gpt-4o-mini), GitHub Models or locally with ollama (suggested llama3.2)

  6. Now you can chat with the model. Everytime that one of the functions of the MCP server is called, the Tool Result section will be displayed in the chat.

Architecture Diagram

GitHub Codespaces

(WIP)

  • Codespaces configuration will be added soon.

Deployment

GitHub에서 전체 README 보기

설치

This server does not publish a one-line install command.

Open the repository installation guide MCP 초보자라면? mcpskill.org 가이드부터 시작하세요 →