php-sdk/examples/09-standalone-cli
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2025-08-29 11:19:51 +02:00
..
src Adopt server examples 2025-08-29 11:19:51 +02:00
composer.json Adopt server examples 2025-08-29 11:19:51 +02:00
example-requests.json Adopt server examples 2025-08-29 11:19:51 +02:00
index.php Adopt server examples 2025-08-29 11:19:51 +02:00
README.md Adopt server examples 2025-08-29 11:19:51 +02:00

Standalone example app with CLI

This is just for testing and debugging purposes. Different from the other examples, this one does not use the same autoloader, but installs the SDK via path repository and therefore has mostly decoupled dependencies.

Install dependencies:

cd /path/to/your/project/examples/09-standalone-cli
composer update

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