php-sdk/examples/cli
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2025-08-29 11:09:16 +02:00
..
src Kick off the SDK based on Symfony's MCP SDK 2025-08-29 11:09:16 +02:00
composer.json Kick off the SDK based on Symfony's MCP SDK 2025-08-29 11:09:16 +02:00
example-requests.json Kick off the SDK based on Symfony's MCP SDK 2025-08-29 11:09:16 +02:00
index.php Kick off the SDK based on Symfony's MCP SDK 2025-08-29 11:09:16 +02:00
README.md Kick off the SDK based on Symfony's MCP SDK 2025-08-29 11:09:16 +02:00

Example app with CLI

This is just for testing and debugging purposes.

Install and create symlink with:

cd /path/to/your/project/examples/cli
composer update
rm -rf vendor/mcp/sdk/src
ln -s /path/to/your/project/src /path/to/your/project/examples/cli/vendor/mcp/sdk/src

Run the CLI with:

DEBUG=1 php index.php

You will see debug outputs to help you understand what is happening.

In this terminal you can now test add some json strings. See example-requests.json.

Run with Inspector:

npx @modelcontextprotocol/inspector php index.php