<?php
namespace boru\ai\Mcp;

class TcpMcpClientFactory implements McpClientFactoryInterface
{
    /** @var TcpMcpConnectorInterface */
    protected $connector;

    public function __construct(TcpMcpConnectorInterface $connector = null)
    {
        $this->connector = $connector ? $connector : new NativeTcpMcpConnector();
    }

    public function makeClient(McpServerConfig $serverConfig)
    {
        return new TcpMcpClient($this->connector);
    }
}
