Add Standalone MCP ASP.NET Core Server
- تکمیل Program و Startup و ثبت سرویسهای پایه، configuration، CORS، Swagger و احراز هویت/مجوز. - افزودن McpController و StartupController. - افزودن DI و ابزار XEchoTools. - بهروزرسانی appsettings، launchSettings و xAiMcpServer.csproj. - حذف appsettings.Development.json از وضعیت کاری فعلی.
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
using System.ComponentModel;
|
||||
using ModelContextProtocol.Server;
|
||||
|
||||
namespace xAiMcpServer.Tools
|
||||
{
|
||||
[McpServerToolType]
|
||||
public static class XEchoTools
|
||||
{
|
||||
[McpServerTool,
|
||||
Description("Echoes the message back to the client.")]
|
||||
public static string Echo(string message)
|
||||
{
|
||||
//
|
||||
var result = $"hello {message}";
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user