Add first-party Etsy MCP server for shop listings, orders and messages

Expose php artisan etsy:mcp as JSON-RPC stdio next to laravel-boost, reuse the stored HickLab3D shop connection, create listings as drafts only, and skip Etsy v3 conversation send because that API does not exist.
This commit is contained in:
2026-11-07 15:54:05 +00:00
parent ab1fdb961f
commit 9b13640571
11 changed files with 1294 additions and 19 deletions
+34
View File
@@ -0,0 +1,34 @@
<?php
namespace App\Console\Commands;
use App\Services\EtsyMcpServer;
use Illuminate\Console\Attributes\Description;
use Illuminate\Console\Attributes\Signature;
use Illuminate\Console\Command;
use Symfony\Component\Console\Output\OutputInterface;
#[Signature('etsy:mcp')]
#[Description('Run the HickLab3D Etsy MCP server over JSON-RPC stdio')]
class EtsyMcp extends Command
{
public function handle(EtsyMcpServer $server): int
{
ini_set('display_errors', 'stderr');
$this->output->setDecorated(false);
$input = $this->input->getStream() ?? STDIN;
while (! feof($input)) {
$line = fgets($input);
if ($line === false) {
break;
}
$response = $server->handleLine($line);
if ($response !== null) {
$this->output->write($response.PHP_EOL, false, OutputInterface::OUTPUT_RAW);
}
}
return self::SUCCESS;
}
}