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
+14
View File
@@ -133,4 +133,18 @@ class EtsySettingsTest extends TestCase
$this->actingAs($admin)->get(route('settings.index'))
->assertOk()->assertDontSee('server-secret');
}
public function test_oauth_connect_requests_shop_management_scopes(): void
{
config()->set('services.etsy', ['keystring' => 'key', 'shared_secret' => 'secret', 'redirect_uri' => 'https://example.test/etsy/callback']);
$admin = User::factory()->create(['role' => 'admin']);
$location = $this->actingAs($admin)->post(route('etsy.connect'))->headers->get('Location');
foreach (['listings_r', 'listings_w', 'transactions_r', 'transactions_w', 'shops_r'] as $scope) {
$this->assertStringContainsString($scope, $location);
}
$this->assertStringNotContainsString('listings_d', $location);
$this->assertStringNotContainsString('shops_w', $location);
$this->assertStringNotContainsString('conversations_', $location);
}
}