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:
2026-11-04 17:51:49 +03:30
parent 2a719a8e17
commit 37cba11e5d
10 changed files with 398 additions and 31 deletions
+18
View File
@@ -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;
}
}
}