AspNetCoreMcpServer 能加到 dify 中
This commit is contained in:
@@ -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!");
|
||||
Reference in New Issue
Block a user