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
Symfony Mcp Server

Symfony Mcp Server Laravel Package

klapaudius/symfony-mcp-server

Symfony MCP Server lets you expose your Symfony app's tools, resources, and prompts to AI clients via the Model Context Protocol. Register capabilities with attributes or config, add MCP endpoints, and connect Claude and other MCP-compatible assistants to your PHP backend.

View on GitHub
Deep Wiki
Context7

Build your own LLM tools inside your symfony project by adding to it a Model Context Protocol Server

Frequently asked questions about Symfony Mcp Server
Does klapaudius/symfony-mcp-server work with Laravel, or is it Symfony-only?
It is not a Laravel package. klapaudius/symfony-mcp-server ships as a Symfony bundle built around bundle lifecycle, DI extensions and Symfony-native attribute discovery, and Laravel has no bundle concept. In practice you either write a Laravel service provider that boots the bundle's container definitions manually, or run the MCP server as a separate Symfony process alongside your Laravel app and let it call your domain logic over HTTP. Both are feasible, but neither is turnkey.
How do I install it and register MCP tools in a Laravel app?
Tools, resources and prompts are registered with attributes discovered through Symfony's container and configuration, so registration code written for a Symfony app will not drop into a Laravel service provider unchanged. The realistic pattern is a thin adapter that maps your Laravel service bindings into the Symfony container and declares tool definitions with the package's schema builder. Start with a single read-only tool end to end before porting more capabilities.
Which transport should I use for an MCP server on a Laravel backend: stdio, HTTP or SSE?
The package supports JSON-RPC over stdio and HTTP with SSE, and its natural deployment is a long-lived process, which fits PHP-FPM request/response semantics poorly. Choose the transport before writing any tool code, because it constrains auth, session handling and observability design. Most Laravel teams end up running a dedicated worker or container (Octane or a standalone console process) or fronting a stateless HTTP transport.
Will installing this package conflict with Laravel's pinned Symfony components?
Symfony components are Composer-installable and already transitively present in many Laravel installs, but version pins on symfony/serializer, symfony/validator and symfony/http-foundation are the usual collision points. Run a composer require dry run against your exact Laravel version and PHP floor before committing to a spike. A hard version conflict here is a blocker, not a refactor.
Does it validate incoming tool arguments against the schema on the server side?
The package generates tool schemas and handles typed request and response payloads, but the 1.9.0 release note does not state that incoming arguments are validated against composed schemas before dispatch. Treat server-side validation as your responsibility and add an explicit validation step inside your handler. Verify the behavior for your pinned version rather than assuming the emitted schema is enforced.
Does oneOf/anyOf/allOf support in tool schemas actually work with Claude and other models?
Model providers differ in how faithfully they honor oneOf/anyOf/allOf in tool parameter schemas; some strict-schema modes reject or flatten composition, and others accept it while degrading argument quality. Composition also expands schema size recursively, which inflates prompt tokens per tool and can push you against tool-definition limits. Test against your actual target models and keep a non-composed schema as a fallback.
Is Symfony bundle registration mandatory, or is there a standalone bootstrap path?
The package is documented as a Symfony bundle with bundle lifecycle and a DI extension, and the release notes do not describe an official standalone bootstrap path. Check whether the container wiring can be driven from a Laravel service provider without registering the bundle. If it cannot, deploying a small Symfony process dedicated to the MCP endpoint is the lower-risk option.
Is the schema-builder API stable between 1.8.x and 1.9.0, and should I pin the version?
The jump from 1.8.2 to 1.9.0 landed in a short window with a schema-layer change, so treat the schema builder as still moving until you confirm otherwise. Greenfield adoption of 1.9.0 avoids the 1.8.x transition entirely, and rolling back to 1.8.2 is clean because there is no data migration. Pin an exact version in composer.json rather than a caret constraint while the schema layer settles.
How do I test, deploy and monitor an MCP server in production?
Run the server as a supervised long-lived process rather than inside PHP-FPM, and add structured logging around JSON-RPC requests, tool names and argument validation failures, since MCP clients surface errors to the model rather than to a person. Write integration tests that post real JSON-RPC payloads for each tool and assert both the success and rejection paths. Also track prompt-token cost per tool and watch schema size as you introduce composition.
What are the alternatives for adding a Model Context Protocol server to a Laravel app?
Options include Laravel-native MCP packages that ship a service provider and artisan tooling, a hand-rolled JSON-RPC endpoint on your existing routes, or running this Symfony bundle as a sidecar service. The sidecar approach keeps a standards-compliant MCP surface without fighting Laravel's container, at the cost of an extra deployment unit. If you only need a handful of tools, a small custom JSON-RPC layer is often less work than bridging two frameworks.
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.
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
cgv/localized-resource