-
-
Notifications
You must be signed in to change notification settings - Fork 114
Labels
MCP BundleIssues & PRs about the MCP SDK integration bundleIssues & PRs about the MCP SDK integration bundleRFCRFC = Request For Comments (proposals about features that you want to be discussed)RFC = Request For Comments (proposals about features that you want to be discussed)
Description
The container configuration currently hard codes the directory to be scanned for tools:
# vendor/symfony/mcp-bundle/config/services.php
->call('setDiscovery', [param('kernel.project_dir'), ['src']])The MCP SDK although allows setting multiple scanDirs and even excludeDirs:
# vendor/mcp/sdk/src/Server/Builder.php
public function setDiscovery(
string $basePath,
array $scanDirs = ['.', 'src'],
array $excludeDirs = [],
?CacheInterface $cache = null,
): self {}It would be nice to configure those directories via the bundle configuration. Especially if you define your tools in a small subset of all directories.
Background
I ran into a problem that I ship the src/DataFixtures directory into production where the classes inherit from a base Fixture that is not installed when doing a composer install --no-dev for prod. This has never led to any problems but because the MCP SDK is now running a discovery in full /src it fails because of the missing base class.
chr-hertel
Metadata
Metadata
Assignees
Labels
MCP BundleIssues & PRs about the MCP SDK integration bundleIssues & PRs about the MCP SDK integration bundleRFCRFC = Request For Comments (proposals about features that you want to be discussed)RFC = Request For Comments (proposals about features that you want to be discussed)