We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9d76ea1 commit 8e9b2b1Copy full SHA for 8e9b2b1
examples/env-stdio-client.php
@@ -66,10 +66,14 @@ public function has($id): bool
66
67
echo "=== PHP MCP Environment Variables Demo ===\n\n";
68
69
+// Use PHP_BINARY constant for portable PHP executable detection
70
+$phpPath = PHP_BINARY;
71
+echo "Using PHP executable: {$phpPath}\n\n";
72
+
73
// Connect to server with custom environment variables
74
echo "1. Connecting to MCP server with custom environment variables...\n";
75
$session = $client->connect('stdio', [
- 'command' => '/opt/homebrew/opt/[email protected]/bin/php',
76
+ 'command' => $phpPath,
77
'args' => [__DIR__ . '/env-stdio-server.php'],
78
'env' => [
79
// Custom environment variables that will be passed to the server
0 commit comments