Skip to main content
Glama

CTX: Context as Code (CaC) tool

by context-hub
MIT License
235
  • Apple
  • Linux
TreeSourceBootloader.php1.09 kB
<?php declare(strict_types=1); namespace Butschster\ContextGenerator\Source\Tree; use Butschster\ContextGenerator\Source\Fetcher\SourceFetcherBootloader; use Butschster\ContextGenerator\DirectoriesInterface; use Butschster\ContextGenerator\Source\Registry\SourceRegistryInterface; use Spiral\Boot\Bootloader\Bootloader; use Spiral\Core\FactoryInterface; final class TreeSourceBootloader extends Bootloader { #[\Override] public function defineSingletons(): array { return [ TreeSourceFetcher::class => static fn( FactoryInterface $factory, DirectoriesInterface $dirs, ): TreeSourceFetcher => $factory->make(TreeSourceFetcher::class, [ 'basePath' => (string) $dirs->getRootPath(), ]), ]; } public function init( SourceFetcherBootloader $registry, SourceRegistryInterface $sourceRegistry, TreeSourceFactory $factory, ): void { $registry->register(TreeSourceFetcher::class); $sourceRegistry->register($factory); } }

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/context-hub/generator'

If you have feedback or need assistance with the MCP directory API, please join our Discord server