MCP Catalogs
首页mcp-dotnet-samples screenshot

mcp-dotnet-samples

by microsoft·185·综合分 48

微软的 .NET MCP 服务器示例集合,用于连接 AI 模型与各种服务。

developer-toolsai-llmcloud-storage
55
Forks
9
活跃 Issue
本月
最近提交
2 天前
收录于

概述

这个仓库提供了全面的示例,展示如何在 .NET 应用程序中创建和使用 MCP 服务器。它包含多个工作实现,如 GitHub Copilot 自定义文件检索器、Markdown 转 HTML 转换器、Outlook 邮件发送器和待办事项管理器。这些示例展示了如何使用微软的 .NET 框架将 AI 模型与不同的数据源和工具连接起来,并支持 Docker 部署,可在 VS Code 和 Visual Studio 等不同 IDE 中轻松使用。

试试问 AI

装完之后,这里有 5 个你可以让 AI 做的事:

:构建自定义 MCP 服务器以连接 AI 模型与 .NET 应用程序
:展示与 Azure 服务和微软生态系统的集成
:提供基于 Docker 的 MCP 服务器部署示例
:什么是模型上下文协议 (MCP)?
:我可以在生产环境中使用这些示例吗?

什么时候选它

如果你是 .NET 开发者,想要了解如何为各种服务实现 MCP 服务器,这是一个很好的参考。

什么时候不要选它

如果你寻找即用型 MCP 服务器,不要选择这个 - 这些是示例实现,需要集成到自己的应用程序中。

此 server 暴露的工具

从 README 抽取出 6 个工具
  • get_copilot_files

    Retrieves GitHub Copilot customization files from awesome-copilot repository

  • convert_markdown_to_html

    Converts markdown text to HTML format

  • send_email

    Sends emails through Outlook

  • add_todo

    Adds a new item to the to-do list

  • list_todos

    Lists all items in the to-do list

  • complete_todo

    Marks a to-do item as complete

可对比工具

mcp-server-templatemcp-typescript-samplesnexus-mcpfirecrawl-mcpmcp-python-samples

安装

安装

此仓库中的每个样本都有自己的安装说明。通常,它们可以通过 Docker 安装:

docker run -i --rm ghcr.io/microsoft/mcp-dotnet-samples/[sample-name]:latest

对于 VS Code 集成,请在 settings.json 中使用以下代码段:

{
  "mcpServers": {
    "[sample-name]": {
      "command": "docker",
      "args": ["run", "-i", "--rm", "ghcr.io/microsoft/mcp-dotnet-samples/[sample-name]:latest"]
    }
  }
}

FAQ

什么是模型上下文协议 (MCP)?
MCP 是一个开放协议,标准化了应用程序如何向大型语言模型 (LLM) 提供上下文,充当 AI 模型与数据源之间的标准化连接器。
我可以在生产环境中使用这些示例吗?
这些示例主要用于学习和演示目的。虽然它们提供了可运行的实现,但在生产环境中使用时应添加额外的安全措施和错误处理。

mcp-dotnet-samples 对比

GitHub →

最后更新于 · 由 README + GitHub 公开数据自动生成。