RM

rickcau/mcp

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

0 stars 0 forks 质量 44 趋势 0

This repository contains sample applications demonstrating the use of Model Context Protocol (MCP) with various integration patterns.

概览

This repository contains sample applications demonstrating the use of Model Context Protocol (MCP) with various integration patterns. These examples make use of the new MCP Server (Preview) feature in Azure APIM as well as demostrates how to make use of the tools being exposed via the remove MCP Server in APIM. A simple console application demonstrating basic MCP client functionality to connect to an MCP server and invoke tools. This project demonstrates the integration between Model Context Protocol (MCP) and Microsoft Semantic Kernel, allowing natural language to be used to interact with MCP tools. - .NET 9.0 SDK or later - Access to an MCP server endpoint The application uses appsettings.json for configuration. This file is not included in the repository for security reasons. 1. Copy the appsettings.example.json file and rename it to appsettings.json 2.

README

以下为原文 README 节选,完整内容请查看原文。

Model Context Protocol (MCP) Sample Applications

This repository contains sample applications demonstrating the use of Model Context Protocol (MCP) with various integration patterns. These examples make use of the new MCP Server (Preview) feature in Azure APIM as well as demostrates how to make use of the tools being exposed via the remove MCP Server in APIM.

Projects

ConsoleMcpServerTest

A simple console application demonstrating basic MCP client functionality to connect to an MCP server and invoke tools.

ConsoleMcpServerSemanticKernelTest

This project demonstrates the integration between Model Context Protocol (MCP) and Microsoft Semantic Kernel, allowing natural language to be used to interact with MCP tools.

Getting Started with ConsoleMcpServerTest

Prerequisites

  • .NET 9.0 SDK or later
  • Access to an MCP server endpoint

Configuration

The application uses appsettings.json for configuration. This file is not included in the repository for security reasons.

To set up your configuration:

  1. Copy the appsettings.example.json file and rename it to appsettings.json
  2. Update the settings with your actual values:
{
  "PetStoreSettings": {
    "McpEndpoint": "https://your-mcp-endpoint-here/mcp",
    "SubscriptionKey": "your-subscription-key-here"
  }
}
  • PetStoreSettings:
    • McpEndpoint: The URL of your MCP server endpoint
    • SubscriptionKey: Your API subscription key for the MCP service (if required)

Running the Application

Navigate to the project directory and run:

dotnet run

The application will:

  1. Connect to the MCP server
  2. List available tools from the server

Prerequisites

  • .NET 9.0 SDK or later
  • Access to an MCP server endpoint
  • Access to Azure OpenAI service

Configuration

The application uses appsettings.json for configuration. This file is not included in the repository for security reasons.

To set up your configuration:

  1. Copy the appsettings.example.json file and rename it to appsettings.json
  2. Update the settings with your actual values:
{
  "PetStoreSettings": {
    "McpEndpoint": "https://your-mcp-endpoint-here/mcp",
    "SubscriptionKey": "your-subscription-key-here"
  },
  "AzureOpenAI": {
    "Endpoint": "https://your-azure-openai-endpoint-here/",
    "ApiKey": "your-api-key-here",
    "DeploymentName": "your-deployment-name-here"
  }
}
  • PetStoreSettings:

    • McpEndpoint: The URL of your MCP server endpoint
    • SubscriptionKey: Your API subscription key for the MCP service
  • AzureOpenAI:

    • Endpoint: Your Azure OpenAI service endpoint
    • ApiKey: Your Azure OpenAI API key
    • DeploymentName: The name of your Azure OpenAI model deployment (e.g., “gpt-4o”)

Running the Application

Navigate to the project directory and run:

dotnet run

The application will:

在 GitHub 查看完整 README

安装

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

Open the repository installation guide 新手?先看 mcpskill.org 教程 →