
elbruno/aspire.mcp.sample
Developer toolsЭта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал
elbruno/aspire.mcp.sample - кандидат на сервер MCP, импортированный из https://github.com/elbruno/aspire.mcp.sample.
Обзор
elbruno/aspire.mcp.sample - кандидат на сервер MCP, импортированный из https://github.com/elbruno/aspire.mcp.sample.
Обзор (машинный перевод)
Образец MCP Сервер и MCP-клиент с использованием Aspire.
Обзор
Этот образец демонстрирует настройку сервера и клиента Model Context Protocol (MCP) с использованием Aspire. Он демонстрирует, как наладить и управлять связью MCP, используя C# в структурированной среде Aspire.
Быстрая демонстрация
Посмотрите этот 5-минутный обзор видео, чтобы увидеть проект в действии.
Посмотрите этот 5-минутный обзор видео, чтобы узнать, как развернуть решение для Azure и как использовать развернутый MCP-сервер в Azure из Visual Studio Code.
Особенности
**Aspire Integration: ** Использует Aspire для управления контейнерными оркестровками и сервисами. **MCP Server: ** Внедряет MCP-сервер для управления клиентской связью. ** Клиент MCP: ** Клиент Sample Blazor Chat, демонстрирующий, как подключаться и общаться с сервером MCP. ** Выбор модели: ** Клиент чата может использовать LLM из моделей Azure AI Foundry, Ollama или GitHub. Выбранная модель должна поддерживать вызов функции, чтобы иметь возможность вызывать функции сервера MCP. Функциональный звонок: Демонстрирует, как вызывать функции с MCP-сервера по выбранной модели. Результат инструмента: Отображает результат вызова функции в интерфейсе чата.
Эта страница переведена автоматически. Технические детали смотрите в оригинале.
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
azdcommands.
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
-
Clone the repository:
-
Navigate to the Aspire project directory:
cd .\src\McpSample.AppHost\ -
Run the project:
dotnet run -
In the Aspire Dashboard, navigate to the Blazor Chat client project.
-
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)
-
Now you can chat with the model. Everytime that one of the functions of the MCP server is called, the
Tool Resultsection will be displayed in the chat.
Architecture Diagram
GitHub Codespaces
(WIP)
- Codespaces configuration will be added soon.
Deployment
Установка
This server does not publish a one-line install command.
Open the repository installation guide Новичок в MCP? Начните с руководства на mcpskill.org →
