Skip to content

Commit 3299288

Browse files
committed
refactor: clean up comments and formatting in server.php example
1 parent 2197f2e commit 3299288

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

examples/10-cached-discovery-stdio/server.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,17 @@
1212
* file that was distributed with this source code.
1313
*/
1414

15-
require_once __DIR__.'/../bootstrap.php';
15+
require_once __DIR__ . '/../bootstrap.php';
1616

1717
use Mcp\Server;
1818
use Mcp\Server\Transport\StdioTransport;
1919
use Symfony\Component\Cache\Adapter\ArrayAdapter;
2020
use Symfony\Component\Cache\Psr16Cache;
2121

22-
// Example showing how to use discovery caching for improved performance
23-
// This is especially useful in development environments where the server
24-
// is restarted frequently, or in production where discovery happens on every request.
25-
2622
Server::make()
2723
->withServerInfo('Cached Discovery Calculator', '1.0.0', 'Calculator with cached discovery for better performance.')
2824
->withDiscovery(__DIR__, ['.'])
2925
->withLogger(logger())
30-
->withCache(new Psr16Cache(new ArrayAdapter())) // Enable discovery caching
26+
->withCache(new Psr16Cache(new ArrayAdapter()))
3127
->build()
3228
->connect(new StdioTransport());

0 commit comments

Comments
 (0)