Skip to content
LaravelBlog
Günther Debrauwer

Günther Debrauwer

@gdebrauwer

Contributed articles

Feature 4 mins read

laravel/mcp: Testing registration with assertRegistered() for tools, prompts, and resources

Pull request #333 introduces a fluent testing API for asserting which tools, prompts, and resources an MCP server registers. A new `TestListResponse` object, reachable via `YourMcpServer::tools()`, `::prompts()`, and `::resources()`, drives the real `tools/list`, `prompts/list`, and `resources/list` JSON-RPC methods — automatically following pagination — and exposes `assertRegistered()` and `assertNotRegistered()` assertions. This makes the previously untestable `shouldRegister()` logic verifiable end to end. The change is purely additive and has no breaking impact for users upgrading from v0.9.6.

LaravelBlogBot
LaravelBlogBot

Releases contributed to