From cf1cf1ff5c361efca5ea7baf21a4394a644ece80 Mon Sep 17 00:00:00 2001 From: matthieu Date: Sun, 15 Mar 2026 19:53:16 +0100 Subject: [PATCH] chore : add MCP bundle config files and .mcp.json for Claude Code Auto-generated by Symfony Flex recipe + .mcp.json for local STDIO transport. Co-Authored-By: Claude Opus 4.6 (1M context) --- .mcp.json | 8 ++++++++ config/bundles.php | 2 ++ config/reference.php | 35 +++++++++++++++++++++++++++++++++++ 3 files changed, 45 insertions(+) create mode 100644 .mcp.json diff --git a/.mcp.json b/.mcp.json new file mode 100644 index 0000000..1c7cc70 --- /dev/null +++ b/.mcp.json @@ -0,0 +1,8 @@ +{ + "mcpServers": { + "lesstime": { + "command": "docker", + "args": ["exec", "-i", "php-lesstime-fpm", "php", "bin/console", "mcp:server"] + } + } +} diff --git a/config/bundles.php b/config/bundles.php index d995319..727ecc7 100644 --- a/config/bundles.php +++ b/config/bundles.php @@ -8,6 +8,7 @@ use Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle; use Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle; use Lexik\Bundle\JWTAuthenticationBundle\LexikJWTAuthenticationBundle; use Nelmio\CorsBundle\NelmioCorsBundle; +use Symfony\AI\McpBundle\McpBundle; use Symfony\Bundle\FrameworkBundle\FrameworkBundle; use Symfony\Bundle\SecurityBundle\SecurityBundle; use Symfony\Bundle\TwigBundle\TwigBundle; @@ -22,4 +23,5 @@ return [ ApiPlatformBundle::class => ['all' => true], DoctrineFixturesBundle::class => ['dev' => true, 'test' => true], LexikJWTAuthenticationBundle::class => ['all' => true], + McpBundle::class => ['all' => true], ]; diff --git a/config/reference.php b/config/reference.php index 1ee83e3..354bc7f 100644 --- a/config/reference.php +++ b/config/reference.php @@ -1610,6 +1610,37 @@ use Symfony\Component\Config\Loader\ParamConfigurator as Param; * cache?: scalar|Param|null, // Storage to track blocked tokens // Default: "cache.app" * }, * } + * @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, + * }>, + * 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, + * exclude_dirs?: list, + * }, + * http?: array{ + * path?: scalar|Param|null, // Default: "/_mcp" + * session?: array{ + * store?: "file"|"memory"|"cache"|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{ * imports?: ImportsConfig, * parameters?: ParametersConfig, @@ -1622,6 +1653,7 @@ use Symfony\Component\Config\Loader\ParamConfigurator as Param; * nelmio_cors?: NelmioCorsConfig, * api_platform?: ApiPlatformConfig, * lexik_jwt_authentication?: LexikJwtAuthenticationConfig, + * mcp?: McpConfig, * "when@dev"?: array{ * imports?: ImportsConfig, * parameters?: ParametersConfig, @@ -1634,6 +1666,7 @@ use Symfony\Component\Config\Loader\ParamConfigurator as Param; * nelmio_cors?: NelmioCorsConfig, * api_platform?: ApiPlatformConfig, * lexik_jwt_authentication?: LexikJwtAuthenticationConfig, + * mcp?: McpConfig, * }, * "when@prod"?: array{ * imports?: ImportsConfig, @@ -1647,6 +1680,7 @@ use Symfony\Component\Config\Loader\ParamConfigurator as Param; * nelmio_cors?: NelmioCorsConfig, * api_platform?: ApiPlatformConfig, * lexik_jwt_authentication?: LexikJwtAuthenticationConfig, + * mcp?: McpConfig, * }, * "when@test"?: array{ * imports?: ImportsConfig, @@ -1660,6 +1694,7 @@ use Symfony\Component\Config\Loader\ParamConfigurator as Param; * nelmio_cors?: NelmioCorsConfig, * api_platform?: ApiPlatformConfig, * lexik_jwt_authentication?: LexikJwtAuthenticationConfig, + * mcp?: McpConfig, * }, * ...