AspNetCoreMcpServer 能加到 dify 中

This commit is contained in:
Zhanghu
2025-11-13 16:07:34 +08:00
parent ed210cee1b
commit 92aab068a3
20 changed files with 1096 additions and 4 deletions

View File

@@ -1,3 +1,14 @@
// See https://aka.ms/new-console-template for more information
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using System.ComponentModel;
using ConsoleEchoMcpServer.Tools;
var builder = Host.CreateEmptyApplicationBuilder(settings: null);
builder.Services
.AddMcpServer()
.WithStdioServerTransport()
.WithTools<EchoTool>();
await builder.Build().RunAsync();
Console.WriteLine("Hello, World!");