|
18 | 18 | /** @var TestResponse $response */ |
19 | 19 | $response = $this->postJson('test-mcp', initializeMessage()); |
20 | 20 |
|
21 | | - $response->assertHeader('Mcp-Session-Id'); |
| 21 | + $response->assertHeader('MCP-Session-Id'); |
22 | 22 |
|
23 | 23 | // https://modelcontextprotocol.io/specification/2025-06-18/basic/transports#session-management |
24 | | - expect($response->headers->get('Mcp-Session-Id'))->toMatch('/^[\x21-\x7E]+$/'); |
| 24 | + expect($response->headers->get('MCP-Session-Id'))->toMatch('/^[\x21-\x7E]+$/'); |
25 | 25 | }); |
26 | 26 |
|
27 | 27 | it('can list resources over http', function (): void { |
|
30 | 30 | $response = $this->postJson( |
31 | 31 | 'test-mcp', |
32 | 32 | listResourcesMessage(), |
33 | | - ['Mcp-Session-Id' => $sessionId], |
| 33 | + ['MCP-Session-Id' => $sessionId], |
34 | 34 | ); |
35 | 35 |
|
36 | 36 | $response->assertStatus(200); |
|
44 | 44 | $response = $this->postJson( |
45 | 45 | 'test-mcp', |
46 | 46 | readResourceMessage(), |
47 | | - ['Mcp-Session-Id' => $sessionId], |
| 47 | + ['MCP-Session-Id' => $sessionId], |
48 | 48 | ); |
49 | 49 |
|
50 | 50 | $response->assertStatus(200); |
|
58 | 58 | $response = $this->postJson( |
59 | 59 | 'test-mcp', |
60 | 60 | listToolsMessage(), |
61 | | - ['Mcp-Session-Id' => $sessionId], |
| 61 | + ['MCP-Session-Id' => $sessionId], |
62 | 62 | ); |
63 | 63 |
|
64 | 64 | $response->assertStatus(200); |
|
72 | 72 | $response = $this->postJson( |
73 | 73 | 'test-mcp', |
74 | 74 | callToolMessage(), |
75 | | - ['Mcp-Session-Id' => $sessionId], |
| 75 | + ['MCP-Session-Id' => $sessionId], |
76 | 76 | ); |
77 | 77 |
|
78 | 78 | $response->assertStatus(200); |
|
86 | 86 | $response = $this->postJson( |
87 | 87 | 'test-mcp', |
88 | 88 | pingMessage(), |
89 | | - ['Mcp-Session-Id' => $sessionId], |
| 89 | + ['MCP-Session-Id' => $sessionId], |
90 | 90 | ); |
91 | 91 |
|
92 | 92 | $response->assertStatus(200); |
|
100 | 100 | $response = $this->postJson( |
101 | 101 | 'test-mcp', |
102 | 102 | callStreamingToolMessage(), |
103 | | - ['Mcp-Session-Id' => $sessionId, 'Accept' => 'text/event-stream'], |
| 103 | + ['MCP-Session-Id' => $sessionId, 'Accept' => 'text/event-stream'], |
104 | 104 | ); |
105 | 105 |
|
106 | 106 | $response->assertStatus(200); |
|
175 | 175 | $response = $this->postJson( |
176 | 176 | 'test-mcp-dynamic-tools', |
177 | 177 | listToolsMessage(), |
178 | | - ['Mcp-Session-Id' => $sessionId], |
| 178 | + ['MCP-Session-Id' => $sessionId], |
179 | 179 | ); |
180 | 180 |
|
181 | 181 | $response->assertStatus(200); |
@@ -233,9 +233,9 @@ function initializeHttpConnection($that, $handle = 'test-mcp') |
233 | 233 | { |
234 | 234 | $response = $that->postJson($handle, initializeMessage()); |
235 | 235 |
|
236 | | - $sessionId = $response->headers->get('Mcp-Session-Id'); |
| 236 | + $sessionId = $response->headers->get('MCP-Session-Id'); |
237 | 237 |
|
238 | | - $that->postJson($handle, initializeNotificationMessage(), ['Mcp-Session-Id' => $sessionId]); |
| 238 | + $that->postJson($handle, initializeNotificationMessage(), ['MCP-Session-Id' => $sessionId]); |
239 | 239 |
|
240 | 240 | return $sessionId; |
241 | 241 | } |
0 commit comments