diff --git a/examples/stdio-custom-dependencies/McpTaskHandlers.php b/examples/stdio-custom-dependencies/McpTaskHandlers.php index 262d1a86..65d2f003 100644 --- a/examples/stdio-custom-dependencies/McpTaskHandlers.php +++ b/examples/stdio-custom-dependencies/McpTaskHandlers.php @@ -13,8 +13,8 @@ use Mcp\Capability\Attribute\McpResource; use Mcp\Capability\Attribute\McpTool; -use Mcp\Example\DependenciesStdioExample\Service\StatsServiceInterface; -use Mcp\Example\DependenciesStdioExample\Service\TaskRepositoryInterface; +use Mcp\Example\StdioCustomDependencies\Service\StatsServiceInterface; +use Mcp\Example\StdioCustomDependencies\Service\TaskRepositoryInterface; use Psr\Log\LoggerInterface; /** diff --git a/examples/stdio-custom-dependencies/Service/InMemoryTaskRepository.php b/examples/stdio-custom-dependencies/Service/InMemoryTaskRepository.php index 47526c4c..63ce8611 100644 --- a/examples/stdio-custom-dependencies/Service/InMemoryTaskRepository.php +++ b/examples/stdio-custom-dependencies/Service/InMemoryTaskRepository.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Mcp\Example\DependenciesStdioExample\Service; +namespace Mcp\Example\StdioCustomDependencies\Service; use Psr\Log\LoggerInterface; diff --git a/examples/stdio-custom-dependencies/Service/StatsServiceInterface.php b/examples/stdio-custom-dependencies/Service/StatsServiceInterface.php index b8485d2a..a7e8b276 100644 --- a/examples/stdio-custom-dependencies/Service/StatsServiceInterface.php +++ b/examples/stdio-custom-dependencies/Service/StatsServiceInterface.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Mcp\Example\DependenciesStdioExample\Service; +namespace Mcp\Example\StdioCustomDependencies\Service; interface StatsServiceInterface { diff --git a/examples/stdio-custom-dependencies/Service/SystemStatsService.php b/examples/stdio-custom-dependencies/Service/SystemStatsService.php index 075dd8a0..5a766792 100644 --- a/examples/stdio-custom-dependencies/Service/SystemStatsService.php +++ b/examples/stdio-custom-dependencies/Service/SystemStatsService.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Mcp\Example\DependenciesStdioExample\Service; +namespace Mcp\Example\StdioCustomDependencies\Service; final class SystemStatsService implements StatsServiceInterface { diff --git a/examples/stdio-custom-dependencies/Service/TaskRepositoryInterface.php b/examples/stdio-custom-dependencies/Service/TaskRepositoryInterface.php index 975cc711..6c091be1 100644 --- a/examples/stdio-custom-dependencies/Service/TaskRepositoryInterface.php +++ b/examples/stdio-custom-dependencies/Service/TaskRepositoryInterface.php @@ -9,7 +9,7 @@ * file that was distributed with this source code. */ -namespace Mcp\Example\DependenciesStdioExample\Service; +namespace Mcp\Example\StdioCustomDependencies\Service; /** * @phpstan-type Task array{id: int, userId: string, description: string, completed: bool, createdAt: string} diff --git a/examples/stdio-custom-dependencies/server.php b/examples/stdio-custom-dependencies/server.php index 659f4499..4ebd4cbd 100644 --- a/examples/stdio-custom-dependencies/server.php +++ b/examples/stdio-custom-dependencies/server.php @@ -13,10 +13,10 @@ require_once dirname(__DIR__).'/bootstrap.php'; chdir(__DIR__); -use Mcp\Example\DependenciesStdioExample\Service\InMemoryTaskRepository; -use Mcp\Example\DependenciesStdioExample\Service\StatsServiceInterface; -use Mcp\Example\DependenciesStdioExample\Service\SystemStatsService; -use Mcp\Example\DependenciesStdioExample\Service\TaskRepositoryInterface; +use Mcp\Example\StdioCustomDependencies\Service\InMemoryTaskRepository; +use Mcp\Example\StdioCustomDependencies\Service\StatsServiceInterface; +use Mcp\Example\StdioCustomDependencies\Service\SystemStatsService; +use Mcp\Example\StdioCustomDependencies\Service\TaskRepositoryInterface; use Mcp\Server; use Mcp\Server\Transport\StdioTransport; diff --git a/tests/Inspector/StdioCachedDiscoveryTest.php b/tests/Inspector/StdioCachedDiscoveryTest.php new file mode 100644 index 00000000..dfc8acec --- /dev/null +++ b/tests/Inspector/StdioCachedDiscoveryTest.php @@ -0,0 +1,29 @@ +