1: <?php
2:
3: declare(strict_types=1);
4:
5: /**
6: * This file is part of the Nexus MCP SDK package.
7: *
8: * (c) 2026 John Paul E. Balandan, CPA <paulbalandan@gmail.com>
9: *
10: * For the full copyright and license information, please view
11: * the LICENSE file that was distributed with this source code.
12: */
13:
14: namespace Nexus\Mcp\Core\Transport;
15:
16: use Nexus\Mcp\Core\Auth\VerifiedAccessToken;
17: use Nexus\Mcp\Core\Schema\RequestId;
18: use Psr\Http\Message\ServerRequestInterface;
19:
20: /**
21: * Transport-supplied context accompanying an inbound JSON-RPC message.
22: */
23: final readonly class ReceiveContext
24: {
25: /**
26: * @param null|ServerRequestInterface $request Originating HTTP request when the transport is request-scoped, null otherwise
27: * @param null|VerifiedAccessToken $authInfo Bearer token the request was authorized with, null when the endpoint is unprotected
28: * @param null|RequestId $peerRequestId Id the peer sent, when the transport dispatches under an id of its own, null otherwise
29: */
30: public function __construct(
31: public ?ServerRequestInterface $request = null,
32: public ?VerifiedAccessToken $authInfo = null,
33: public ?RequestId $peerRequestId = null,
34: ) {
35: }
36: }
37: