This commit is contained in:
2026-10-03 13:00:50 +07:00
parent dd55079e06
commit 7a7808b4d1
28 changed files with 191 additions and 11 deletions
+2 -5
View File
@@ -1,8 +1,3 @@
// Пакет mcp_service собирает MCP-сервер (Model Context Protocol) для
// игры «Вечерний детектив»: инструменты MCP вызывают игровые сервисы
// напрямую (через интерфейс GamePlayer), без HTTP-прослойки. MCP-сервер
// монтируется в основной процесс как HTTP-эндпоинт /mcp (streamable HTTP)
// на REST-gateway.
// Package mcp_service exposes game operations through MCP.
package mcp_service
@@ -50,10 +45,12 @@ type MCPService struct {
answers AnswerSubmitter
}
// NewMCPService creates an MCP service.
func NewMCPService(game GamePlayer, answers AnswerSubmitter) *MCPService {
return &MCPService{game: game, answers: answers}
}
// Server returns the underlying MCP server.
func (s *MCPService) Server() *server.MCPServer {
srv := server.NewMCPServer(
"evening-detective-mcp",