Initial MCP server commit

This commit is contained in:
2026-04-12 22:15:46 +03:00
commit 362fde4d1b
86 changed files with 83311 additions and 0 deletions

30
LazyBear.MCP/Program.cs Normal file
View File

@@ -0,0 +1,30 @@
using ModelContextProtocol.Server;
using System.ComponentModel;
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddMcpServer()
.WithHttpTransport()
.WithToolsFromAssembly();
var app = builder.Build();
app.MapMcp();
app.Run("http://localhost:5000");
[McpServerToolType]
public static class TradingTools
{
[McpServerTool, Description("Получить текущую цену актива")]
public static string GetCurrentPrice([Description("Тикер актива")] string ticker)
{
return $"Цена {ticker}: 50000 USD (фейковые данные)";
}
[McpServerTool, Description("Получить информацию о позиции")]
public static string GetPositionInfo([Description("ID позиции")] string positionId)
{
return $"Позиция {positionId}: Long BTC, PnL: +500 USD";
}
}