Files
LazyBearWorks/README.md

136 lines
2.4 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# LazyBear MCP Server
.NET 10 сервер Model Context Protocol (MCP) для интеграции торговых AI-инструментов.
## Быстрый старт
```bash
cd LazyBear.MCP
dotnet run
```
Сервер работает на `http://localhost:5000`
## Примеры интеграции
### Codex (Windows конфигурация)
Файл: `.mcp.json`
```json
{
"mcpServers": {
"lazybear": {
"command": "dotnet",
"args": ["run", "--project", "E:\\Codex\\LazyBearWorks\\LazyBear.MCP"]
}
}
}
```
### Continue (расширение VS Code)
Файл: `.vscode/continue/config.json`
```json
{
"mcpServers": {
"lazybear": {
"command": "dotnet",
"args": [
"run",
"--project",
"${workspaceFolder}/LazyBear.MCP"
],
"type": "stdio"
}
}
}
```
### OpenCode (Linux/Mac конфигурация)
Файл: `~/.opencode/.mcp.json`
```json
{
"mcpServers": {
"lazybear": {
"command": "dotnet",
"args": ["run", "--project", "~/LazyBearWorks/LazyBear.MCP"]
}
}
}
```
### Использование через CLI
Тестирование через MCP inspector:
```bash
npm install -g @modelcontextprotocol/inspector
npx @modelcontextprotocol/inspector dotnet run --project LazyBear.MCP
```
Прямое тестирование через stdin:
```bash
echo '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"test-client","version":"1.0"}}}' | dotnet run --project LazyBear.MCP
```
## Доступные инструменты
### GetCurrentPrice
Получить текущую цену актива.
**Аргументы:**
- `ticker` (строка): Тикер актива (например, "BTCUSD")
**Пример:**
```json
{
"name": "GetCurrentPrice",
"arguments": {
"ticker": "BTCUSD"
}
}
```
### GetPositionInfo
Получить информацию о позиции.
**Аргументы:**
- `positionId` (строка): ID позиции
**Пример:**
```json
{
"name": "GetPositionInfo",
"arguments": {
"positionId": "POSI-001"
}
}
```
## Разработка
### Сборка
```bash
dotnet build
```
### Запуск
```bash
dotnet run
```
### Тестирование с MCP Inspector
```bash
npx @modelcontextprotocol/inspector dotnet run --project LazyBear.MCP
```
## Лицензия
MIT