Skip to content

Commit 56fbd81

Browse files
committed
move examples to server directory
This will prepare for the client implementation in modelcontextprotocol#192
1 parent 7a8045a commit 56fbd81

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+55
-55
lines changed

composer.json

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -52,18 +52,18 @@
5252
},
5353
"autoload-dev": {
5454
"psr-4": {
55-
"Mcp\\Example\\CachedDiscovery\\": "examples/cached-discovery/",
56-
"Mcp\\Example\\ClientCommunication\\": "examples/client-communication/",
57-
"Mcp\\Example\\CombinedRegistration\\": "examples/combined-registration/",
58-
"Mcp\\Example\\ComplexToolSchema\\": "examples/complex-tool-schema/",
59-
"Mcp\\Example\\CustomDependencies\\": "examples/custom-dependencies/",
60-
"Mcp\\Example\\CustomMethodHandlers\\": "examples/custom-method-handlers/",
61-
"Mcp\\Example\\DiscoveryCalculator\\": "examples/discovery-calculator/",
62-
"Mcp\\Example\\DiscoveryUserProfile\\": "examples/discovery-userprofile/",
63-
"Mcp\\Example\\EnvVariables\\": "examples/env-variables/",
64-
"Mcp\\Example\\ExplicitRegistration\\": "examples/explicit-registration/",
65-
"Mcp\\Example\\SchemaShowcase\\": "examples/schema-showcase/",
66-
"Mcp\\Example\\ClientLogging\\": "examples/client-logging/",
55+
"Mcp\\Example\\Server\\CachedDiscovery\\": "examples/server/cached-discovery/",
56+
"Mcp\\Example\\Server\\ClientCommunication\\": "examples/server/client-communication/",
57+
"Mcp\\Example\\Server\\CombinedRegistration\\": "examples/server/combined-registration/",
58+
"Mcp\\Example\\Server\\ComplexToolSchema\\": "examples/server/complex-tool-schema/",
59+
"Mcp\\Example\\Server\\CustomDependencies\\": "examples/server/custom-dependencies/",
60+
"Mcp\\Example\\Server\\CustomMethodHandlers\\": "examples/server/custom-method-handlers/",
61+
"Mcp\\Example\\Server\\DiscoveryCalculator\\": "examples/server/discovery-calculator/",
62+
"Mcp\\Example\\Server\\DiscoveryUserProfile\\": "examples/server/discovery-userprofile/",
63+
"Mcp\\Example\\Server\\EnvVariables\\": "examples/server/env-variables/",
64+
"Mcp\\Example\\Server\\ExplicitRegistration\\": "examples/server/explicit-registration/",
65+
"Mcp\\Example\\Server\\SchemaShowcase\\": "examples/server/schema-showcase/",
66+
"Mcp\\Example\\Server\\ClientLogging\\": "examples/server/client-logging/",
6767
"Mcp\\Tests\\": "tests/"
6868
}
6969
},

examples/cached-discovery/CachedCalculatorElements.php renamed to examples/server/cached-discovery/CachedCalculatorElements.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* file that was distributed with this source code.
1212
*/
1313

14-
namespace Mcp\Example\CachedDiscovery;
14+
namespace Mcp\Example\Server\CachedDiscovery;
1515

1616
use Mcp\Capability\Attribute\McpTool;
1717
use Mcp\Exception\ToolCallException;
File renamed without changes.

examples/client-communication/ClientAwareService.php renamed to examples/server/client-communication/ClientAwareService.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* file that was distributed with this source code.
1010
*/
1111

12-
namespace Mcp\Example\ClientCommunication;
12+
namespace Mcp\Example\Server\ClientCommunication;
1313

1414
use Mcp\Capability\Attribute\McpTool;
1515
use Mcp\Schema\Content\TextContent;
File renamed without changes.

examples/client-logging/LoggingShowcaseHandlers.php renamed to examples/server/client-logging/LoggingShowcaseHandlers.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* file that was distributed with this source code.
1010
*/
1111

12-
namespace Mcp\Example\ClientLogging;
12+
namespace Mcp\Example\Server\ClientLogging;
1313

1414
use Mcp\Capability\Attribute\McpTool;
1515
use Mcp\Capability\Logger\ClientLogger;

examples/combined-registration/DiscoveredElements.php renamed to examples/server/combined-registration/DiscoveredElements.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* file that was distributed with this source code.
1010
*/
1111

12-
namespace Mcp\Example\CombinedRegistration;
12+
namespace Mcp\Example\Server\CombinedRegistration;
1313

1414
use Mcp\Capability\Attribute\McpResource;
1515
use Mcp\Capability\Attribute\McpTool;

examples/combined-registration/ManualHandlers.php renamed to examples/server/combined-registration/ManualHandlers.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* file that was distributed with this source code.
1010
*/
1111

12-
namespace Mcp\Example\CombinedRegistration;
12+
namespace Mcp\Example\Server\CombinedRegistration;
1313

1414
use Psr\Log\LoggerInterface;
1515

examples/combined-registration/server.php renamed to examples/server/combined-registration/server.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
require_once dirname(__DIR__).'/bootstrap.php';
1414
chdir(__DIR__);
1515

16-
use Mcp\Example\CombinedRegistration\ManualHandlers;
16+
use Mcp\Example\Server\CombinedRegistration\ManualHandlers;
1717
use Mcp\Server;
1818
use Mcp\Server\Session\FileSessionStore;
1919

0 commit comments

Comments
 (0)