Added dependencies and basic structures

This commit is contained in:
Jan Böhmer 2026-05-06 22:58:38 +02:00
parent cb669ad4ec
commit d453c48c55
8 changed files with 2236 additions and 1546 deletions

View file

@ -15,6 +15,7 @@
"amphp/http-client": "^5.1", "amphp/http-client": "^5.1",
"api-platform/doctrine-orm": "^4.1", "api-platform/doctrine-orm": "^4.1",
"api-platform/json-api": "^4.0.0", "api-platform/json-api": "^4.0.0",
"api-platform/mcp": "^4.3",
"api-platform/symfony": "^4.0.0", "api-platform/symfony": "^4.0.0",
"beberlei/doctrineextensions": "^1.2", "beberlei/doctrineextensions": "^1.2",
"brick/math": "^0.14.8", "brick/math": "^0.14.8",
@ -73,6 +74,7 @@
"symfony/http-client": "7.4.*", "symfony/http-client": "7.4.*",
"symfony/http-kernel": "7.4.*", "symfony/http-kernel": "7.4.*",
"symfony/mailer": "7.4.*", "symfony/mailer": "7.4.*",
"symfony/mcp-bundle": "^0.8.0",
"symfony/monolog-bundle": "^4.0", "symfony/monolog-bundle": "^4.0",
"symfony/process": "7.4.*", "symfony/process": "7.4.*",
"symfony/property-access": "7.4.*", "symfony/property-access": "7.4.*",

838
composer.lock generated

File diff suppressed because it is too large Load diff

View file

@ -34,4 +34,5 @@ return [
Jbtronics\TranslationEditorBundle\JbtronicsTranslationEditorBundle::class => ['dev' => true], Jbtronics\TranslationEditorBundle\JbtronicsTranslationEditorBundle::class => ['dev' => true],
ApiPlatform\Symfony\Bundle\ApiPlatformBundle::class => ['all' => true], ApiPlatform\Symfony\Bundle\ApiPlatformBundle::class => ['all' => true],
Symfony\AI\AiBundle\AiBundle::class => ['all' => true], Symfony\AI\AiBundle\AiBundle::class => ['all' => true],
Symfony\AI\McpBundle\McpBundle::class => ['all' => true],
]; ];

View file

@ -38,3 +38,7 @@ api_platform:
serializer: serializer:
# Change this to false later, to remove the hydra prefix on the API # Change this to false later, to remove the hydra prefix on the API
hydra_prefix: true hydra_prefix: true
mcp:
enabled: true # default: true
format: jsonld # default: 'jsonld'

10
config/packages/mcp.yaml Normal file
View file

@ -0,0 +1,10 @@
mcp:
client_transports:
http: true
stdio: false
http:
path: "/mcp"
session:
store: "file"
directory: "%kernel.cache_dir%/mcp"
ttl: 3600

View file

@ -205,7 +205,7 @@ use Symfony\Component\Config\Loader\ParamConfigurator as Param;
* supports?: string|list<scalar|Param|null>, * supports?: string|list<scalar|Param|null>,
* definition_validators?: list<scalar|Param|null>, * definition_validators?: list<scalar|Param|null>,
* support_strategy?: scalar|Param|null, * support_strategy?: scalar|Param|null,
* initial_marking?: backed-enum|string|list<scalar|Param|null>, * initial_marking?: \BackedEnum|string|list<scalar|Param|null>,
* events_to_dispatch?: null|list<string|Param>, * events_to_dispatch?: null|list<string|Param>,
* places?: string|list<array{ // Default: [] * places?: string|list<array{ // Default: []
* name?: scalar|Param|null, * name?: scalar|Param|null,
@ -214,11 +214,11 @@ use Symfony\Component\Config\Loader\ParamConfigurator as Param;
* transitions?: list<array{ // Default: [] * transitions?: list<array{ // Default: []
* name?: string|Param, * name?: string|Param,
* guard?: string|Param, // An expression to block the transition. * guard?: string|Param, // An expression to block the transition.
* from?: backed-enum|string|list<array{ // Default: [] * from?: \BackedEnum|string|list<array{ // Default: []
* place?: string|Param, * place?: string|Param,
* weight?: int|Param, // Default: 1 * weight?: int|Param, // Default: 1
* }>, * }>,
* to?: backed-enum|string|list<array{ // Default: [] * to?: \BackedEnum|string|list<array{ // Default: []
* place?: string|Param, * place?: string|Param,
* weight?: int|Param, // Default: 1 * weight?: int|Param, // Default: 1
* }>, * }>,
@ -3175,6 +3175,37 @@ use Symfony\Component\Config\Loader\ParamConfigurator as Param;
* store?: string|Param, // Service name of store // Default: "Symfony\\AI\\Store\\StoreInterface" * store?: string|Param, // Service name of store // Default: "Symfony\\AI\\Store\\StoreInterface"
* }>, * }>,
* } * }
* @psalm-type McpConfig = array{
* app?: scalar|Param|null, // Default: "app"
* version?: scalar|Param|null, // Default: "0.0.1"
* description?: scalar|Param|null, // Default: null
* icons?: list<array{ // Default: []
* src?: scalar|Param|null,
* mime_type?: scalar|Param|null, // Default: null
* sizes?: list<scalar|Param|null>,
* }>,
* website_url?: scalar|Param|null, // Default: null
* pagination_limit?: int|Param, // Default: 50
* instructions?: scalar|Param|null, // Default: null
* client_transports?: array{
* stdio?: bool|Param, // Default: false
* http?: bool|Param, // Default: false
* },
* discovery?: array{
* scan_dirs?: list<scalar|Param|null>,
* exclude_dirs?: list<scalar|Param|null>,
* },
* http?: array{
* path?: scalar|Param|null, // Default: "/_mcp"
* session?: array{
* store?: "file"|"memory"|"cache"|"framework"|Param, // Default: "file"
* directory?: scalar|Param|null, // Default: "%kernel.cache_dir%/mcp-sessions"
* cache_pool?: scalar|Param|null, // Default: "cache.mcp.sessions"
* prefix?: scalar|Param|null, // Default: "mcp-"
* ttl?: int|Param, // Default: 3600
* },
* },
* }
* @psalm-type ConfigType = array{ * @psalm-type ConfigType = array{
* imports?: ImportsConfig, * imports?: ImportsConfig,
* parameters?: ParametersConfig, * parameters?: ParametersConfig,
@ -3205,6 +3236,7 @@ use Symfony\Component\Config\Loader\ParamConfigurator as Param;
* jbtronics_settings?: JbtronicsSettingsConfig, * jbtronics_settings?: JbtronicsSettingsConfig,
* api_platform?: ApiPlatformConfig, * api_platform?: ApiPlatformConfig,
* ai?: AiConfig, * ai?: AiConfig,
* mcp?: McpConfig,
* "when@dev"?: array{ * "when@dev"?: array{
* imports?: ImportsConfig, * imports?: ImportsConfig,
* parameters?: ParametersConfig, * parameters?: ParametersConfig,
@ -3239,6 +3271,7 @@ use Symfony\Component\Config\Loader\ParamConfigurator as Param;
* jbtronics_translation_editor?: JbtronicsTranslationEditorConfig, * jbtronics_translation_editor?: JbtronicsTranslationEditorConfig,
* api_platform?: ApiPlatformConfig, * api_platform?: ApiPlatformConfig,
* ai?: AiConfig, * ai?: AiConfig,
* mcp?: McpConfig,
* }, * },
* "when@docker"?: array{ * "when@docker"?: array{
* imports?: ImportsConfig, * imports?: ImportsConfig,
@ -3270,6 +3303,7 @@ use Symfony\Component\Config\Loader\ParamConfigurator as Param;
* jbtronics_settings?: JbtronicsSettingsConfig, * jbtronics_settings?: JbtronicsSettingsConfig,
* api_platform?: ApiPlatformConfig, * api_platform?: ApiPlatformConfig,
* ai?: AiConfig, * ai?: AiConfig,
* mcp?: McpConfig,
* }, * },
* "when@prod"?: array{ * "when@prod"?: array{
* imports?: ImportsConfig, * imports?: ImportsConfig,
@ -3301,6 +3335,7 @@ use Symfony\Component\Config\Loader\ParamConfigurator as Param;
* jbtronics_settings?: JbtronicsSettingsConfig, * jbtronics_settings?: JbtronicsSettingsConfig,
* api_platform?: ApiPlatformConfig, * api_platform?: ApiPlatformConfig,
* ai?: AiConfig, * ai?: AiConfig,
* mcp?: McpConfig,
* }, * },
* "when@test"?: array{ * "when@test"?: array{
* imports?: ImportsConfig, * imports?: ImportsConfig,
@ -3335,6 +3370,7 @@ use Symfony\Component\Config\Loader\ParamConfigurator as Param;
* jbtronics_settings?: JbtronicsSettingsConfig, * jbtronics_settings?: JbtronicsSettingsConfig,
* api_platform?: ApiPlatformConfig, * api_platform?: ApiPlatformConfig,
* ai?: AiConfig, * ai?: AiConfig,
* mcp?: McpConfig,
* }, * },
* ...<string, ExtensionType|array{ // extra keys must follow the when@%env% pattern or match an extension alias * ...<string, ExtensionType|array{ // extra keys must follow the when@%env% pattern or match an extension alias
* imports?: ImportsConfig, * imports?: ImportsConfig,

View file

@ -18,6 +18,11 @@ csp_report:
methods: [POST] methods: [POST]
defaults: { _controller: nelmio_security.csp_reporter_controller::indexAction } defaults: { _controller: nelmio_security.csp_reporter_controller::indexAction }
mcp:
resource: .
type: mcp
# Must be last as it matches everything # Must be last as it matches everything
redirector: redirector:
path: /{url} path: /{url}
@ -26,3 +31,4 @@ redirector:
controller: App\Controller\RedirectController::addLocalePart controller: App\Controller\RedirectController::addLocalePart
# Dont match localized routes (no redirection loop, if no root with that name exists) or API prefixed routes # Dont match localized routes (no redirection loop, if no root with that name exists) or API prefixed routes
condition: "not (request.getPathInfo() matches '/^\\\\/([a-z]{2}(_[A-Z]{2})?|api)\\\\//')" condition: "not (request.getPathInfo() matches '/^\\\\/([a-z]{2}(_[A-Z]{2})?|api)\\\\//')"

View file

@ -585,6 +585,9 @@
"ref": "fadbfe33303a76e25cb63401050439aa9b1a9c7f" "ref": "fadbfe33303a76e25cb63401050439aa9b1a9c7f"
} }
}, },
"symfony/mcp-bundle": {
"version": "v0.8.0"
},
"symfony/mime": { "symfony/mime": {
"version": "v4.3.1" "version": "v4.3.1"
}, },