6
6
7
7
use Butschster \ContextGenerator \Application \Bootloader \ConsoleBootloader ;
8
8
use Butschster \ContextGenerator \Application \Bootloader \HttpClientBootloader ;
9
+ use Butschster \ContextGenerator \Config \Loader \ConfigLoaderInterface ;
9
10
use Butschster \ContextGenerator \McpServer \Action \Prompts \FilesystemOperationsAction ;
10
11
use Butschster \ContextGenerator \McpServer \Action \Prompts \GetPromptAction ;
11
12
use Butschster \ContextGenerator \McpServer \Action \Prompts \ListPromptsAction ;
43
44
use Spiral \Boot \EnvironmentInterface ;
44
45
use Spiral \Config \ConfiguratorInterface ;
45
46
use Spiral \Core \Attribute \Proxy ;
46
- use Spiral \Core \BinderInterface ;
47
47
use Spiral \Core \Config \Proxy as ConfigProxy ;
48
48
49
49
final class McpServerBootloader extends Bootloader
@@ -60,7 +60,6 @@ public function defineDependencies(): array
60
60
McpToolBootloader::class,
61
61
McpPromptBootloader::class,
62
62
McpProjectsBootloader::class,
63
-
64
63
];
65
64
}
66
65
@@ -98,9 +97,9 @@ public function init(EnvironmentInterface $env): void
98
97
);
99
98
}
100
99
101
- public function boot (ConsoleBootloader $ bootloader , BinderInterface $ binder , McpConfig $ config ): void
100
+ public function boot (ConsoleBootloader $ console ): void
102
101
{
103
- $ bootloader ->addCommand (MCPServerCommand::class);
102
+ $ console ->addCommand (MCPServerCommand::class);
104
103
}
105
104
106
105
#[\Override]
@@ -110,7 +109,10 @@ public function defineSingletons(): array
110
109
ServerRunnerInterface::class => function (
111
110
McpConfig $ config ,
112
111
ServerRunner $ factory ,
112
+ ConfigLoaderInterface $ loader ,
113
113
) {
114
+ $ loader ->load ();
115
+
114
116
foreach ($ this ->actions ($ config ) as $ action ) {
115
117
$ factory ->registerAction ($ action );
116
118
}
0 commit comments