Skip to content

Commit 807b509

Browse files
CodeWithKyriangithub-actions[bot]
authored andcommitted
Update CHANGELOG
1 parent 4fe2cbe commit 807b509

File tree

1 file changed

+71
-34
lines changed

1 file changed

+71
-34
lines changed

CHANGELOG.md

Lines changed: 71 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -2,54 +2,86 @@
22

33
All notable changes to `php-mcp/laravel` will be documented in this file.
44

5+
## v2.1.0 - 2025-06-13
6+
7+
### What's Changed
8+
9+
* Update README.md by @taylorotwell in https://github.com/php-mcp/laravel/pull/5
10+
* [docs] Fix publish config command for 2.x by @barryvdh in https://github.com/php-mcp/laravel/pull/7
11+
* [docs] Remove config call from app/bootstrap.php by @barryvdh in https://github.com/php-mcp/laravel/pull/8
12+
* Do not defer ServiceProvider to boot routes by @barryvdh in https://github.com/php-mcp/laravel/pull/9
13+
* Fix: Correct Client State Management in LaravelHttpTransport by @CodeWithKyrian in https://github.com/php-mcp/laravel/pull/17
14+
* chore: Update dependencies and improve MCP notification handling by @CodeWithKyrian in https://github.com/php-mcp/laravel/pull/18
15+
* docs: transport should be explicitly set to stdio for the tool to start by @xel1045 in https://github.com/php-mcp/laravel/pull/15
16+
17+
### New Contributors
18+
19+
* @taylorotwell made their first contribution in https://github.com/php-mcp/laravel/pull/5
20+
* @barryvdh made their first contribution in https://github.com/php-mcp/laravel/pull/7
21+
* @xel1045 made their first contribution in https://github.com/php-mcp/laravel/pull/15
22+
23+
**Full Changelog**: https://github.com/php-mcp/laravel/compare/2.0.0...2.1.0
24+
525
## v2.0.0 - 2025-06-04
626

727
This release marks a **major overhaul**, bringing it into full alignment with `php-mcp/server` v2.1.0+ and introducing a significantly improved, more "Laravely" developer experience.
828

929
### Added
1030

1131
* **Fluent Manual Registration API:**
12-
* Introduced the `Mcp` Facade (`PhpMcp\Laravel\Facades\Mcp`).
13-
* Define Tools, Resources, Prompts, and Resource Templates fluently (e.g., `Mcp::tool(...)->description(...)`).
14-
* Definitions are typically placed in `routes/mcp.php` (configurable).
15-
* Handlers are resolved via Laravel's service container, allowing dependency injection.
16-
32+
33+
* Introduced the `Mcp` Facade (`PhpMcp\Laravel\Facades\Mcp`).
34+
* Define Tools, Resources, Prompts, and Resource Templates fluently (e.g., `Mcp::tool(...)->description(...)`).
35+
* Definitions are typically placed in `routes/mcp.php` (configurable).
36+
* Handlers are resolved via Laravel's service container, allowing dependency injection.
37+
1738
* **Dedicated HTTP Server Transport via `mcp:serve`:**
18-
* The `php artisan mcp:serve --transport=http` command now launches a standalone, high-performance ReactPHP-based HTTP server using `\PhpMcp\Server\Transports\HttpServerTransport`.
19-
* Configuration for this dedicated server is in `config/mcp.php` under `transports.http_dedicated`.
20-
* CLI options (`--host`, `--port`, `--path-prefix`) can override config defaults.
21-
39+
40+
* The `php artisan mcp:serve --transport=http` command now launches a standalone, high-performance ReactPHP-based HTTP server using `\PhpMcp\Server\Transports\HttpServerTransport`.
41+
* Configuration for this dedicated server is in `config/mcp.php` under `transports.http_dedicated`.
42+
* CLI options (`--host`, `--port`, `--path-prefix`) can override config defaults.
43+
2244
* **`LaravelHttpTransport` for Integrated HTTP:**
23-
* New `PhpMcp\Laravel\Transports\LaravelHttpTransport` class implements `ServerTransportInterface` to bridge Laravel's HTTP request lifecycle with the core MCP `Protocol` handler.
24-
45+
46+
* New `PhpMcp\Laravel\Transports\LaravelHttpTransport` class implements `ServerTransportInterface` to bridge Laravel's HTTP request lifecycle with the core MCP `Protocol` handler.
47+
2548
* **Configurable Auto-Discovery:**
26-
* `config('mcp.discovery.auto_discover')` (default: `true`) now controls whether discovery runs automatically or not. You can set it to false in production..
27-
49+
50+
* `config('mcp.discovery.auto_discover')` (default: `true`) now controls whether discovery runs automatically or not. You can set it to false in production..
51+
2852
* **Interactive Prompt for `mcp:serve`:** If `--transport` is not specified, the command now interactively prompts the user to choose between `stdio` and `http`.
53+
2954

3055
### Changed
3156

3257
* **Core Server Integration:** Now uses `\PhpMcp\Server\Server::make()` (ServerBuilder) for all server instantiation, fully leveraging `php-mcp/server` v2.x architecture.
58+
3359
* **Namespace:** Base package namespace changed from `PhpMcp\Laravel\Server` to **`PhpMcp\Laravel`**.
60+
3461
* **Configuration (`config/mcp.php`):**
35-
* Significantly restructured and updated to align with `ServerBuilder` options.
36-
* Clearer separation of settings for `http_dedicated` vs. `http_integrated` transports.
37-
* Simplified cache TTL (`cache.ttl`) and discovery (`discovery.save_to_cache_on_discover`) keys.
38-
* Added `server.instructions` for the `initialize` MCP response.
39-
* Added `discovery.exclude_dirs` and `discovery.definitions_file`.
40-
62+
63+
* Significantly restructured and updated to align with `ServerBuilder` options.
64+
* Clearer separation of settings for `http_dedicated` vs. `http_integrated` transports.
65+
* Simplified cache TTL (`cache.ttl`) and discovery (`discovery.save_to_cache_on_discover`) keys.
66+
* Added `server.instructions` for the `initialize` MCP response.
67+
* Added `discovery.exclude_dirs` and `discovery.definitions_file`.
68+
4169
* **`McpServiceProvider`:**
42-
* Completely rewritten to correctly build and configure the `\PhpMcp\Server\Server` instance using Laravel's services for logging, caching (with fallback to core `FileCache`), container, and event loop.
43-
* Loads manual definitions from the configured `definitions_file` via `McpRegistrar`.
44-
* Sets up core `Registry` notifiers to dispatch Laravel events for list changes.
45-
70+
71+
* Completely rewritten to correctly build and configure the `\PhpMcp\Server\Server` instance using Laravel's services for logging, caching (with fallback to core `FileCache`), container, and event loop.
72+
* Loads manual definitions from the configured `definitions_file` via `McpRegistrar`.
73+
* Sets up core `Registry` notifiers to dispatch Laravel events for list changes.
74+
4675
* **`McpController` (Integrated HTTP):** More robustly handles the integrated server behavior, working with a custom `LaravelHttpTransport`.
76+
4777
* **Artisan Commands:**
48-
* `mcp:discover`: Now directly calls `Server::discover()` with configured/CLI parameters. `force` option behavior clarified.
49-
* `mcp:list`: Fetches elements from the live, fully configured `Registry` from the resolved `Server` instance.
50-
* `mcp:serve`: Refactored to use core `StdioServerTransport` or `HttpServerTransport` directly.
51-
78+
79+
* `mcp:discover`: Now directly calls `Server::discover()` with configured/CLI parameters. `force` option behavior clarified.
80+
* `mcp:list`: Fetches elements from the live, fully configured `Registry` from the resolved `Server` instance.
81+
* `mcp:serve`: Refactored to use core `StdioServerTransport` or `HttpServerTransport` directly.
82+
5283
* **Dependency:** Updated `php-mcp/server` to `^2.2.0`
84+
5385

5486
### Fixed
5587

@@ -66,7 +98,8 @@ This release marks a **major overhaul**, bringing it into full alignment with `p
6698
* **Configuration File:** The `config/mcp.php` file has been significantly restructured. You **must** republish and merge your customizations:
6799
```bash
68100
php artisan vendor:publish --provider="PhpMcp\Laravel\McpServiceProvider" --tag="mcp-config" --force
69-
101+
102+
70103
```
71104
* **`mcp:serve` for HTTP:** The `--transport=http` option for `mcp:serve` now launches a *dedicated* ReactPHP-based server process. For serving MCP via your main Laravel application routes, ensure the `http_integrated` transport is enabled in `config/mcp.php` and your web server is configured appropriately.
72105
* **Event Handling:** If you were directly listening to internal events from the previous version, these may have changed. Rely on the documented Laravel events (`ToolsListChanged`, etc.).
@@ -130,18 +163,22 @@ composer require php-mcp/laravel
130163
# 2. Publish the configuration file (optional but recommended)
131164
php artisan vendor:publish --provider="PhpMcp\Laravel\Server\McpServiceProvider" --tag="mcp-config"
132165
166+
133167
```
134168
## Getting Started
135169

136170
1. **Define Elements:** Create PHP classes with methods annotated with `#[McpTool]`, `#[McpResource]`, etc., within directories specified in `config/mcp.php` (e.g., `app/Mcp`). Inject dependencies as needed. See [Defining MCP Elements](https://github.com/php-mcp/laravel/blob/main/README.md#defining-mcp-elements).
171+
137172
2. **Discovery:**
138-
* In development, discovery runs automatically when needed.
139-
* In production, run `php artisan mcp:discover` during your deployment process. See [Automatic Discovery vs. Manual Discovery](https://github.com/php-mcp/laravel/blob/main/README.md#automatic-discovery-development-vs-manual-discovery-production).
140-
173+
174+
* In development, discovery runs automatically when needed.
175+
* In production, run `php artisan mcp:discover` during your deployment process. See [Automatic Discovery vs. Manual Discovery](https://github.com/php-mcp/laravel/blob/main/README.md#automatic-discovery-development-vs-manual-discovery-production).
176+
141177
3. **Run the Server:**
142-
* For **Stdio Transport:** Use `php artisan mcp:serve` and configure your client to execute this command (using the full path to `artisan`).
143-
* For **HTTP+SSE Transport:** Ensure `transports.http.enabled` is true, run your Laravel app on a suitable web server (Nginx+FPM, Octane, etc. - **not** `php artisan serve`), exclude the MCP route from CSRF protection, and configure your client with the SSE URL (e.g., `http://your-app.test/mcp/sse`). See [Running the Server](https://github.com/php-mcp/laravel/blob/main/README.md#running-the-server) for critical details.
144-
178+
179+
* For **Stdio Transport:** Use `php artisan mcp:serve` and configure your client to execute this command (using the full path to `artisan`).
180+
* For **HTTP+SSE Transport:** Ensure `transports.http.enabled` is true, run your Laravel app on a suitable web server (Nginx+FPM, Octane, etc. - **not** `php artisan serve`), exclude the MCP route from CSRF protection, and configure your client with the SSE URL (e.g., `http://your-app.test/mcp/sse`). See [Running the Server](https://github.com/php-mcp/laravel/blob/main/README.md#running-the-server) for critical details.
181+
145182

146183
## Important Notes
147184

0 commit comments

Comments
 (0)