Skip to content

2.1.0

Choose a tag to compare

@ilvalerione ilvalerione released this 10 Sep 07:43
· 540 commits to 2.x since this release

MCP Streamable HTTP Transport

This release introduce the support to connect agents to remote MCP servers using URL instead of a commnand.

Remote servers are accessible via URLs and typically require authentication. You can use the token field in the configuration array, which will be used as an authorization token to communicate with the server:

class MyAgent extends Agent 
{
    protected function provider(): AIProviderInterface
    {...}
    
    protected function tools(): array
    {
        return [
            ...McpConnector::make([
                'url' => 'https://mcp.example.com',
                'token' => 'BEARER_TOKEN',
                'timeout' => 10,
            ])->tools(),
        ];
    }
}

The McpConnector automatically recognizes the URL and will use the StreamableHttpTransport to connect to the MCP server.