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

Laravel Mcp Server Laravel Package

opgginc/laravel-mcp-server

Deep Wiki
Context7

Technical Evaluation

Architecture fit

  • The package targets the standard Laravel extension surface: Composer install, auto-discovered service provider, publishable config, package-registered routes, and tool definitions resolved through the service container. That is a low-friction fit for any Laravel monolith or modular Laravel app already using Eloquent, policies, queues, and middleware.
  • Conceptually it wraps an MCP server (JSON-RPC over Streamable HTTP, with SSE as a legacy/alternate transport) around application capabilities. For a TPM this is the interesting part: it turns existing domain services into agent-callable "tools" without standing up a separate Node or Python gateway.
  • Architectural tension to flag up front: MCP is a session-oriented, streaming protocol. Laravel's dominant deployment model (PHP-FPM behind Nginx, one request per worker) is request/response. Streamable HTTP can be made to work in that model; SSE effectively requires a long-lived process (Octane, RoadRunner, Swoole) or a dedicated worker tier. The transport choice is therefore a deployment-architecture decision, not a config detail.

Integration feasibility

  • High for a read-only tool surface: install, publish config, define a handful of tool classes that delegate to existing services, mount the route behind existing auth middleware, point Claude Desktop / Cursor / an internal agent at it.
  • Medium for write-capable tools: the hard work is authorization and blast-radius control, not the package. Every tool needs an explicit policy check, tenant scoping, idempotency, and audit logging mapped to the authenticated principal.
  • Medium-low for public/multi-tenant exposure: MCP's auth story leans on OAuth discovery; Laravel's Sanctum/session tokens do not natively satisfy that handshake. Expect a bridge or a bespoke token scheme, plus a security review.

Technical risk

  • Provenance. The repository is listed as unknown and the last release is future-dated (2026-04-05) relative to normal review cadence. Before adoption, confirm the canonical repo, verify the release tag and Packagist entry, and diff the tag against the published archive. This is a supply-chain question, not a formality.
  • Spec churn. MCP has revised its transport and authorization guidance multiple times; HTTP+SSE has been superseded by Streamable HTTP. A package pinned to an older spec revision can be functionally correct and still incompatible with current clients.
  • Single-vendor maintenance. 330 stars and one organizational maintainer is a real bus-factor. MIT license is permissive enough to fork, which is the mitigation.
  • Streaming under PHP. Proxy buffering, load-balancer idle timeouts, and worker exhaustion are predictable failure modes; they need to be designed for, not discovered in production.
  • LLM-mediated invocation. Prompt injection, over-broad tool schemas, and error messages that leak internals are the dominant security risks. The package cannot solve these; the tool design must.

Key questions

  1. Which MCP specification revision does the package implement, and does it support Streamable HTTP as the primary transport with SSE as fallback?
  2. What underlying PHP MCP/SDK dependency does it build on, and what is that dependency's maintenance status?
  3. What are the supported PHP/Laravel version ranges, and is there a CI matrix proving them?
  4. What runtime does SSE require — does it work under PHP-FPM, or does it mandate Octane/Swoole?
  5. How are tool calls authenticated and authorized, and can tools be scoped per user/tenant?
  6. Are sessions stateful? What happens to in-flight sessions on deploy or horizontal scale-out?
  7. What is the test coverage, release cadence, and issue-response history of the maintainer?
  8. Does it ship observability hooks (structured logs, tracing) for tool invocation and latency?
  9. Is there a documented upgrade path when the MCP spec changes?

Integration Approach

Stack fit

  • Laravel 10/11/12 on PHP 8.1+ is the expected envelope; confirm against the composer constraints before committing.
  • Composes cleanly with the pieces a TPM should insist on: route middleware for auth and rate limiting, Laravel policies for per-tool authorization, queues for anything slow, and existing logging/telemetry channels.
  • No database migration is typically required — the footprint is config, routes, and tool classes. That keeps rollback cheap and makes a time-boxed spike genuinely low-risk.

Migration path

  • There is usually nothing to migrate from. The realistic baseline is "no agent access" or "hand-rolled REST endpoints wrapped in an ad-hoc OpenAPI shim." In the latter case, keep the existing service layer as the source of truth and make MCP tools thin adapters over it, so the REST and MCP surfaces stay behaviorally consistent.
  • Introduce behind a feature flag: register the MCP routes conditionally per environment so production exposure is an explicit, reversible decision.
  • If the eventual target is the first-party laravel/mcp package or a different transport implementation, keeping tools as plain service-layer adapters preserves optionality. Avoid letting package-specific base classes leak into domain code.

Compatibility

  • Client support for Streamable HTTP is now broad (Claude, Cursor, VS Code, most agent frameworks); SSE-only servers are increasingly the compatibility liability. Target Streamable HTTP.
  • Auth compatibility is the sharper edge: MCP clients expect a discovery/OAuth flow, while Laravel apps typically issue Sanctum tokens or rely on sessions. Budget for a token-issuance bridge or a private-network-only deployment for the first iteration.
  • Verify behavior behind the corporate edge: Nginx proxy_buffering off, generous proxy_read_timeout, HTTP/1.1 keepalive, and no aggressive WAF body inspection on streaming responses.

Sequencing

  1. Spike (1 week): sandbox app, one read-only tool, validate against two real MCP clients. Success criterion is an end-to-end tool call, not a passing test suite.
  2. Contract design: tool naming, JSON schemas, error taxonomy, and the authorization policy per tool. This is the artifact that outlives the package choice.
  3. Security review: threat model for prompt injection, data exfiltration via tool output, and privilege escalation through write tools. Gate write tools behind explicit sign-off.
  4. Observability: structured audit log per invocation (principal, tool, arguments hash, latency, outcome), plus rate limits per token and per IP.
  5. Internal pilot: one team, one client, read-only tools, non-production data.
  6. Production rollout: auth-enforced route, rate limits, staged tool expansion, documented rollback (disable route registration).

Operational Impact

Maintenance

  • Community-maintained MIT package with a single organizational backer. Assume you own the upgrade path: pin exact versions, watch the MCP spec changelog, and keep a fork-or-replace contingency documented.
  • The real maintenance burden is not the package — it is the tool surface. Every tool is a public API contract consumed by non-deterministic clients. Treat schema changes as breaking changes and version them.
  • Track the upstream dependency chain (the PHP MCP SDK it wraps) separately; a stale transitive dependency is the more likely failure.

Support

  • Expect GitHub-issues-level support, no SLA, and variable response latency. Plan for internal ownership: one named engineer who can read the transport code, plus written runbooks.
  • Vendor risk is moderate: OP.GG is a credible sponsor, but this is a side artifact of their internal needs, not a commercial product.

Scaling

  • Streaming connections occupy workers for their lifetime. Concurrency is bounded by worker count, not by request rate — size the pool deliberately and put MCP on its own process group so agent traffic cannot starve the web tier.
  • Horizontal scale-out requires either sticky sessions or stateless request handling. Confirm which the package supports before promising scale.
  • Tool calls are database-backed; LLM clients retry and fan out. Expect amplified query volume, N+1 patterns, and thundering-herd behavior on popular tools. Cache aggressively and set per-tool timeouts.
  • Long-running tools should enqueue and return a handle rather than hold the connection.

Failure modes

  • Worker pool exhaustion from idle SSE streams → site-wide latency degradation.
  • Reverse proxy buffering or short idle timeouts silently breaking streaming responses; symptoms look like "the agent hangs," not like an infrastructure error.
  • Session loss on deploy or scale event, surfacing as intermittent mid-conversation failures.
  • Auth misconfiguration on the tool route — the highest-severity risk, because it exposes domain operations to any client that can reach the endpoint.
  • Error leakage: unhandled exceptions serialized into MCP responses and read back by an LLM, exposing stack traces, SQL, or internal identifiers.
  • Silent schema drift between tool definitions and service behavior, producing plausible-but-wrong agent actions.
  • Client-side incompatibility after an MCP spec revision, discovered by users rather than by CI.

Ramp-up

  • A mid-level Laravel developer is productive in a day: the patterns (service provider, config, container-resolved classes, middleware) are ordinary Laravel.
  • MCP concepts — JSON-RPC framing, tools vs. resources vs. prompts, transport negotiation — need roughly one to two days of focused reading; the spec is short but still moving.
  • The genuine ramp-up cost is on the security and product side: deciding which capabilities should be agent-invocable, and what "authorized" means when the caller is a model acting on a user's behalf. That conversation should precede the first write tool, not follow it.
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.
skyraptor/chatter
edlugz/sasapay
abbasudo/artisan-route
mirvan/ippanel
ignibyte/aic-framework
glavweb/data-schema-bundle
glavweb/datagrid-bundle
tacticmedia/scim-server
uni-method/frame
neika-ai/sdk
adachsoft/php-code-style
pharaonic/laravel-notification-dependencies
beautinow/translug
dev-brainiac/bot-cloaked
octoberrain/html
octoberrain/extension
octoberrain/exception
octoberrain/contracts
adachsoft/api-version-bundle
cgv/localized-resource