Skip to content

Commit 9b9037c

Browse files
authored
Merge branch 'main' into fix/passport_scope_registration
2 parents bf1abe1 + 404fbe3 commit 9b9037c

File tree

4 files changed

+34
-14
lines changed

4 files changed

+34
-14
lines changed

CHANGELOG.md

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,22 @@
11
# Release Notes
22

3-
## [Unreleased](https://github.com/laravel/mcp/compare/v0.4.2...main)
3+
## [Unreleased](https://github.com/laravel/mcp/compare/v0.5.1...main)
4+
5+
## [v0.5.1](https://github.com/laravel/mcp/compare/v0.5.0...v0.5.1) - 2025-12-17
6+
7+
### What's Changed
8+
9+
* fix: correct header name to MCP-Session-Id by [@batosai](https://github.com/batosai) in https://github.com/laravel/mcp/pull/132
10+
11+
### New Contributors
12+
13+
* [@batosai](https://github.com/batosai) made their first contribution in https://github.com/laravel/mcp/pull/132
14+
15+
**Full Changelog**: https://github.com/laravel/mcp/compare/v0.5.0...v0.5.1
16+
17+
## [v0.5.0](https://github.com/laravel/mcp/compare/v0.4.2...v0.5.0) - 2025-12-15
18+
19+
* Add Completion Support by [@pushpak1300](https://github.com/pushpak1300) in https://github.com/laravel/mcp/pull/127
420

521
## [v0.4.2](https://github.com/laravel/mcp/compare/v0.4.1...v0.4.2) - 2025-12-07
622

@@ -73,6 +89,8 @@ public function schema(JsonSchema $schema): array
7389

7490

7591

92+
93+
7694
```
7795
**After**
7896

@@ -87,6 +105,8 @@ public function schema(JsonSchema $schema): array
87105

88106

89107

108+
109+
90110
```
91111
This affects only custom tool classes that override the schema methods. The update is minimal, requiring only the import change to the contract interface.
92112

src/Server/Registrar.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public function web(string $route, string $serverClass): Route
3737
fn (): HttpTransport => new HttpTransport(
3838
$request = request(),
3939
// @phpstan-ignore-next-line
40-
(string) $request->header('Mcp-Session-Id')
40+
(string) $request->header('MCP-Session-Id')
4141
),
4242
))->middleware([
4343
ReorderJsonAccept::class,

src/Server/Transport/HttpTransport.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ protected function getHeaders(): array
9191
];
9292

9393
if ($this->replySessionId !== null) {
94-
$headers['Mcp-Session-Id'] = $this->replySessionId;
94+
$headers['MCP-Session-Id'] = $this->replySessionId;
9595
}
9696

9797
if ($this->stream instanceof Closure) {

tests/Feature/Console/StartCommandTest.php

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@
1818
/** @var TestResponse $response */
1919
$response = $this->postJson('test-mcp', initializeMessage());
2020

21-
$response->assertHeader('Mcp-Session-Id');
21+
$response->assertHeader('MCP-Session-Id');
2222

2323
// 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]+$/');
2525
});
2626

2727
it('can list resources over http', function (): void {
@@ -30,7 +30,7 @@
3030
$response = $this->postJson(
3131
'test-mcp',
3232
listResourcesMessage(),
33-
['Mcp-Session-Id' => $sessionId],
33+
['MCP-Session-Id' => $sessionId],
3434
);
3535

3636
$response->assertStatus(200);
@@ -44,7 +44,7 @@
4444
$response = $this->postJson(
4545
'test-mcp',
4646
readResourceMessage(),
47-
['Mcp-Session-Id' => $sessionId],
47+
['MCP-Session-Id' => $sessionId],
4848
);
4949

5050
$response->assertStatus(200);
@@ -58,7 +58,7 @@
5858
$response = $this->postJson(
5959
'test-mcp',
6060
listToolsMessage(),
61-
['Mcp-Session-Id' => $sessionId],
61+
['MCP-Session-Id' => $sessionId],
6262
);
6363

6464
$response->assertStatus(200);
@@ -72,7 +72,7 @@
7272
$response = $this->postJson(
7373
'test-mcp',
7474
callToolMessage(),
75-
['Mcp-Session-Id' => $sessionId],
75+
['MCP-Session-Id' => $sessionId],
7676
);
7777

7878
$response->assertStatus(200);
@@ -86,7 +86,7 @@
8686
$response = $this->postJson(
8787
'test-mcp',
8888
pingMessage(),
89-
['Mcp-Session-Id' => $sessionId],
89+
['MCP-Session-Id' => $sessionId],
9090
);
9191

9292
$response->assertStatus(200);
@@ -100,7 +100,7 @@
100100
$response = $this->postJson(
101101
'test-mcp',
102102
callStreamingToolMessage(),
103-
['Mcp-Session-Id' => $sessionId, 'Accept' => 'text/event-stream'],
103+
['MCP-Session-Id' => $sessionId, 'Accept' => 'text/event-stream'],
104104
);
105105

106106
$response->assertStatus(200);
@@ -175,7 +175,7 @@
175175
$response = $this->postJson(
176176
'test-mcp-dynamic-tools',
177177
listToolsMessage(),
178-
['Mcp-Session-Id' => $sessionId],
178+
['MCP-Session-Id' => $sessionId],
179179
);
180180

181181
$response->assertStatus(200);
@@ -233,9 +233,9 @@ function initializeHttpConnection($that, $handle = 'test-mcp')
233233
{
234234
$response = $that->postJson($handle, initializeMessage());
235235

236-
$sessionId = $response->headers->get('Mcp-Session-Id');
236+
$sessionId = $response->headers->get('MCP-Session-Id');
237237

238-
$that->postJson($handle, initializeNotificationMessage(), ['Mcp-Session-Id' => $sessionId]);
238+
$that->postJson($handle, initializeNotificationMessage(), ['MCP-Session-Id' => $sessionId]);
239239

240240
return $sessionId;
241241
}

0 commit comments

Comments
 (0)