get-shop
Retrieve Shopify shop details for updates and management using the Shopify Update MCP Server. Streamline access to essential store information directly.
Instructions
Get shop details
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:541-551 (handler)Handler and registration for the 'get-shop' MCP tool. Instantiates ShopifyClient and calls loadShop to fetch and return shop details as JSON.server.tool("get-shop", "Get shop details", {}, async () => { const client = new ShopifyClient(); try { const shop = await client.loadShop(SHOPIFY_ACCESS_TOKEN, MYSHOPIFY_DOMAIN); return { content: [{ type: "text", text: JSON.stringify(shop, null, 2) }], }; } catch (error) { return handleError("Failed to retrieve shop details", error); } });
- The loadShop helper method in ShopifyClient class that performs an HTTP GET request to Shopify's /shop.json endpoint to retrieve shop details.async loadShop( accessToken: string, shop: string ): Promise<LoadStorefrontsResponse> { const res = await this.shopifyHTTPRequest<LoadStorefrontsResponse>({ method: "GET", url: `https://${shop}/admin/api/${this.SHOPIFY_API_VERSION}/shop.json`, accessToken, }); return res.data; }