Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Webmcp Bundle Laravel Package

yoanbernabeu/webmcp-bundle

Symfony bundle that turns your app into a WebMCP/Model Context Protocol server, letting AI agents discover and call your tools, resources, and prompts over HTTP. Register capabilities with PHP attributes and integrate cleanly with Symfony services, routing, and security.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit — headline mismatch. yoanbernabeu/webmcp-bundle is a Symfony bundle, not a Laravel package. A Symfony bundle depends on the Symfony kernel, bundles.php registration, and the DI compiler-pass pipeline. Laravel has none of these — its service providers and container are not bundle-compatible. As a direct composer require dependency, fit is effectively zero. As a reference implementation, fit is moderate: the portable core is small (PHP 8 attributes for tool declaration + route introspection + tool-schema emission), and Laravel routes are equally introspectable via Route::getRoutes() with action reflection. Both frameworks use PHP 8 attributes, so attribute classes themselves could be reused near-verbatim.

Integration feasibility. Two viable paths: (a) port the concept — a Laravel service provider that walks the route collection after boot, builds a tool descriptor inventory, and serves/registers it; (b) fork the bundle and maintain a Laravel adapter. Neither is a drop-in. Sizing: the surface is attributes + a scanner + an emitter, likely a few hundred LOC; 3–10 engineering days for a hardened port with auth, caching, and tests.

Technical risk. Three stacked risks. First, WebMCP itself is an early browser-level proposal — the underlying navigator.modelContext-style surface is not a ratified standard and browser support is unproven; spec churn will affect both the bundle and any port. Second, exposing controller routes as agent-callable tools is an authorization boundary change: every exposed route becomes an API endpoint invocable by an agent carrying a user's session, so CSRF, rate limiting, idempotency, per-tool scoping, and destructive-action confirmation all need explicit design — the bundle is unlikely to solve this for you. Third, the package itself has no production signal: 11 stars, 0 dependents, single maintainer, very recent release.

Key questions.

  • Does the bundle emit client-side JS (registerTool) or a server-side discovery manifest — or both?
  • Does it rely on compiler passes / tagged services (confirming no reusable Laravel surface)?
  • Is there per-tool auth, permission gating, or input validation, or is exposure all-or-nothing?
  • Is the tool schema derived from controller signatures/docblocks, and how does it degrade on untyped params?
  • Are there PHP/Symfony version constraints that signal maintenance cadence?
  • Is there an HTTP/JSON-RPC bridge for non-browser agents, or is it strictly in-browser?

Integration Approach

Stack fit. Target Laravel 10/11/12 on PHP 8.1+. Laravel already vendors several Symfony components (HttpFoundation, Console, etc.) but not HttpKernel bundles, so there is no shared runtime to lean on. Treat the bundle as a design reference, not a dependency.

Migration path. Recommended stance: reference implementation, not dependency. Extract three artifacts from the bundle — (1) attribute definitions, (2) the route-scanning logic, (3) the tool-descriptor/schema emitter — and reimplement (2) and (3) as a first-party Laravel package. Critically, compute the tool inventory into a cached artifact (build/deploy step), not per-request reflection.

Compatibility. Keep the emitted tool descriptors framework-agnostic (plain JSON Schema). That way, if the bundle later ships a Laravel adapter or the WebMCP ecosystem matures, you swap the emitter without changing the contract. Avoid coupling to Symfony DI tags anywhere in your port.

Sequencing.

  1. Spike (1–2 days): read the bundle source; confirm the emission model (client-side registration vs. manifest endpoint) and the schema shape.
  2. Design the security contract before code: opt-in allowlist of routes, per-tool scopes, read-only vs. mutating classification, audit logging.
  3. Build the Laravel scanner + emitter behind a feature flag; pilot on read-only routes only (search, catalog, status).
  4. Add a deterministic discovery endpoint so non-browser agents and tests can enumerate tools without a browser.
  5. Extend to mutating routes only after quotas, timeouts, and idempotency keys exist.
  6. Re-evaluate upstream — if the bundle stabilizes around a conformant core, reconsider consuming it rather than maintaining the port.

Operational Impact

Maintenance. Forking means you own the code. MIT licensing makes that clean, and the small surface makes it cheap — but you inherit spec-churn maintenance as WebMCP evolves. Budget this as a recurring line item, not a one-time port. Do not pin production behavior to the upstream bundle.

Support. No vendor, no community (0 dependents, 11 stars). Internal ownership with a named DRI is mandatory. Treat the upstream repo as abandonment-risk by default; unanswered issues and stalled releases should be the planning assumption.

Scaling. Server-side cost is negligible if the tool inventory is cached and registration is client-side. The real scaling risk is agent-side: unbounded agent invocation of routes designed for human cadence will amplify DB and queue load. Enforce per-tool quotas, timeouts, and circuit breakers at the edge — assume the bundle provides none of this.

Failure modes.

  • Silent registration failure — client sees no tools, no server-side error surfaces.
  • Schema drift — controller signature changes silently invalidate the agent-facing tool contract with no compile-time error.
  • Over-exposure — if the exposure model is opt-out, every new route becomes agent-callable by default. Force opt-in.
  • Auth bypass — agents invoking routes under a user session without the UI-level confirmation steps that guard destructive actions.
  • Spec/browser breakage — the client-side API is renamed or dropped; tools stop working with no server-side signal.

Ramp-up. Engineering lift is low: PHP 8 attribute fluency and Laravel routing internals are already in-house; reading the Symfony source costs hours, not a skills gap. The genuine ramp-up cost is governance — product and security stakeholders need a shared model of what "route as tool" means for the threat surface. Net read: low engineering lift, moderate governance lift, speculative payoff tied to WebMCP adoption. Worth a timeboxed spike; not yet worth a roadmap commitment.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
adachsoft/changelog-linter
adachsoft/collection
payerurl/telegrambot-crypto-payment-instant-payout
dskripchenko/laravel-hybrid-search
riorizkyrainey/lara-ced
mehedimi/static-vel
zharp/zharp
nonsapiens/bigquery-model-sync
lgu-bayambang-ict-office/lgu-laravel-development-standards
andydefer/laravel-support
se7enxweb/flysystem
lampwick/laravel
jeslage/statamic-emojis
micahdshackelford/rmap-laravel
draftsmaninc/draftsman
square-bit/laravel-volition
himito/laravel-mailman
htinlynn/genius-helper
maco-studios/hephaestus
adachsoft/php-code-style