- Replace symfony/mcp-sdk dependency with official mcp/sdk
- Refactor Server creation to use Server::make() builder pattern
- Convert tool definitions from interfaces to #[McpTool] attributes
- Implement automatic tool discovery in src/ directory
- Update STDIO transport command to mcp:server
- Simplify service configuration using native SDK patterns
- Remove redundant ServerFactory and routes.php files
- Add custom LogicException for bundle-specific errors
- Update all documentation (README, CHANGELOG, index.rst)
- Fix composer.json description
- Add .idea/ to .gitignore
Resolves#526
Fabbot + php-cs-fixer
DOCtor-RST
Fix RouteLoader registration to always create when transports enabled
Remove .idea
- Add autoconfiguration for #[McpTool] attribute with mcp.tool tag
- Create McpToolPass compiler pass using ServiceLocatorTagPass::register()
- Inject Service Locator into ServerBuilder via setContainer()
Fix PR review comments for MCP Bundle migration
- Remove prefer-stable from root composer.json
- Move CHANGELOG content to 0.1 section and remove BC BREAK labels
- Use ServerBuilder::class and Server::class in services configuration
- Fix "client vs server" comment in documentation
- Use ServerBuilder::class in test instead of string
Remove symfony/mcp-sdk
Remove symfony/mcp-sdk ref in claude reamdde et phpstan
Rewrite CHANGELOG.md
Use [] === $taggedServices instead of empty($taggedServices)
Use use Symfony\Component\Routing\Exception\LogicException; instead of custom Exception
Add MCP capabilities support to Symfony bundle
This commit implements Model Context Protocol (MCP) support by adding:
- Prompts: System instructions for AI context using #[McpPrompt]
- Resources: Static data access using #[McpResource]
- Resource Templates: Dynamic resources with parameters using #[McpResourceTemplate]
Implementation includes:
- Auto-configuration for MCP attributes with proper tagging
- Compiler passes extending AbstractMcpPass for service registration
- Documentation updates with examples and usage patterns
- Demo examples showcasing each capability type
Technical details:
- Refactored auto-configuration into registerMcpAttributes() method
- Created AbstractMcpPass to eliminate code duplication
- Added proper error handling for timezone validation
- Resource Templates ready but await MCP SDK handler implementation
Apply PHP CS Fixer to demo MCP examples
- Add Symfony license headers to demo files
- Fix code style and formatting
- Add trailing commas where appropriate
Add pagination_limit and instructions configuration options
- Add pagination_limit option to control MCP list responses (default: 50)
- Add instructions option for server description to help LLMs
- Update services.php to pass both options to ServerBuilder
- Add comprehensive tests for new configuration options
- Update documentation with examples and usage
- Update demo configuration with practical examples
Both options map directly to ServerBuilder methods:
- setPaginationLimit(int)
- setInstructions(string)
Add dedicated MCP logger with configurable Monolog integration
- Create monolog.logger.mcp service with dedicated channel
- Update ServerBuilder to use MCP-specific logger instead of generic logger
- Add comprehensive logging documentation with configuration examples
- Include examples for different environments (dev/prod) and handlers (file/Slack)
- Add test coverage for MCP logger service creation and configuration
The MCP logger uses Monolog's logger prototype pattern and can be customized
by users through standard Monolog configuration in their applications.
Add EventDispatcher support and event system documentation
- Configure Symfony EventDispatcher for MCP SDK event handling
- Add comprehensive event system documentation with examples
- Add test coverage for EventDispatcher configuration
- Fix PHPStan type assertion for ChildDefinition
Migrate MCP Bundle from SSE to official StreamableHttpTransport
- Replace custom SSE implementation with MCP SDK's StreamableHttpTransport
- Change sse transport to http in configuration and code
- Simplify DependencyInjection compiler passes
- Add HTTP session management (file/memory store options)
- Update documentation and tests for HTTP transport
Adds an option to the Toolbox/ChainProcessor to keep tool messages by
avoiding to clone the original messageBag
Fixes#321
Co-authored-by: Philip Heimböck <philip.heimboeck@abacus.ch>
* [x] text generation
* [x] streaming
* [x] tool calling
* [x] image input
* [x] structured output
* [x] embeddings
* [x] examples
* [x] documentation
Implementation is basically functional, but has following flaws to be
resolved:
1. tool schema differs in a breaking way from GPT - extension point is a
MUST
2. duplication of stream, message conversion and tool calling
3. error handling - once again
- [x] Introducing global model class to be more agnostic with explicit
`Capability` class
- [x] Introducing Contract with Normalizers to solve Base Contract
(OpenAI) vs. Model/Platform specific differences
- [x] Reshape into three major components `Chain`, `Platform` and
`Store`
- [x] Adoption of Symfony-style for CS Fixer and `Interface` &
`Exception` suffix
Replaces #301 and #305
# Breaking Changes
* Sorting into three main sub compontents `Platform`, `Chain` and
`Store`
* High level implementation also went into those components, see
`ChainInterface` as example
* `Model` namespace went into `Platform`
* Bridges got sorted into `Platform` or `Store`
* Tool metadata moved from `Chain` to `Platform\Contract`
* Implementation of `JsonSerializable` was dropped in favor of Symfony's
serializer/normalizer
* Removal of `LanguageModel` and `EmbeddingsModel` interface in favor of
base `Model` and `Capabilities`
* Renaming of `StructuredResponse` to `ObjectResponse`
* Slimming down the `supports()` method of `ModelClient` and
`ResponseConverter`
* Changing signature of `ModelClient` to already accepting the
normalized request payload
* Renaming interfaces to always contain the `Interface` suffix
* Renaming exceptions to always contain the `Exception` suffix
- [x] Test for Prompt Converters
- [x] Documentation for limits of invokeModel with tool calling using
Nova models
- [x] ~~Documentation for configuration~~ should be part of the bundle
- [x] Image support for Claude and Nova using Bedrock
- [x] Remove local model validation
- [x] Example usage for Bedrock
* 1st Commit: Christopher
* 2nd Commit: Claude Desktop with Jetbrains MCP:
> I'm writing a PHP library that is similar to langchain but should also
cover the HuggingFace inference API - like their library.
You can access my terminal and my IDE via tools.
Please have a look at the different tasks that should be available in
src/Bridge/HuggingFace/Task.php and see the example implementation in
examples/huggingface/text-classification.php in combination with the
namespace PhpLlm\LlmChain\Bridge\HuggingFace.
Your task is to implement the response conversion, corresponding DTOs
and examples for all other tasks than text-classification.
* 3rd Commit: Claude Desktop with Jetbrains MCP:
> please have a look at the other examples in the examples/ folder using
audio, image or text input and refactor the ones you just created.
all new example files are located in
/home/christopher/Projects/PHP-LLM/llm-chain/examples/huggingface -
please verify they're working by executing them - and patch bugs if
there are any
* 4th Commit: Claude Desktop with Jetbrains MCP:
> please create an example runner for huggingface examples, based on the
/example file in root directory
* 5th Commit: Christopher making it work.
Preparation for #279
* Introducing a base File that centralizes mime type, base64 handling,
etc.
* Image split into ImageUrl and Image based on File => i usually know
what i need in user land
* `new Image('https://...')` => `new ImageUrl('https://...)`
* `new Image('data:image/jpeg;base64,...')` =>
`Image::fromDataUrl('data:image/jpeg;base64,...')`
* `new Image('/path/to/jpeg.jpg')` =>
`Image::fromFile('/path/to/jpeg.jpg')`
* removing `File` class of Whisper bridge in favor of `Audio`
Hello ,
This PR is a suggestion to change the name of embedding providers
variables and classes .
If you accept my suggestion , the PR to adopt this into the bundle is
almost ready .
* feat: added initial Google provider supporting basic text generation with it
* refactor: remove visitor infavor of single converter class
---------
Co-authored-by: Roy Garrido <rgarridodomenech@outlook.com>