Skip to main content
Glama

sitebay_shopify_proxy

Proxy requests to Shopify Admin API for managing products, orders, and store data through the SiteBay MCP Server.

Instructions

Proxy requests to a Shopify Admin API.

Args: shop_name: Shopify shop name path: Shopify API path (e.g., "/admin/api/2024-04/products.json") query_params_json: Optional JSON string for payload or query params method: HTTP method (get, post, put, delete)

Returns: Shopify API response

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
shop_nameYes
pathNo/admin/api/2024-04
query_params_jsonNo
methodNoget

Implementation Reference

  • Primary handler and registration for the 'sitebay_shopify_proxy' MCP tool. This async function handles the tool execution, logging, client initialization, parameter preparation, API proxy call, and response/error formatting. The @mcp.tool decorator registers it with FastMCP.
    @mcp.tool async def sitebay_shopify_proxy( ctx: Context, shop_name: str, path: str = "/admin/api/2024-04", query_params_json: str = "", method: str = "get", ) -> str: """ Proxy requests to a Shopify Admin API. Args: shop_name: Shopify shop name path: Shopify API path (e.g., "/admin/api/2024-04/products.json") query_params_json: Optional JSON string for payload or query params method: HTTP method (get, post, put, delete) Returns: Shopify API response """ try: await ctx.info(f"Shopify proxy request to {shop_name}{path or ''}") client = await initialize_client() proxy_data: dict[str, Any] = {"shop_name": shop_name, "method": method, "path": path} if query_params_json: proxy_data["query_params_json"] = query_params_json result = await client.shopify_proxy(proxy_data) return f"✅ Shopify API Response:\n```json\n{result}\n```" except SiteBayError as e: await ctx.error(f"Shopify proxy error: {str(e)}") return f"❌ Shopify Proxy Error: {str(e)}" except Exception as e: await ctx.error(f"Unexpected proxy error: {str(e)}") return f"❌ Unexpected error: {str(e)}"
  • Supporting helper method in SiteBayClient class that executes the HTTP POST request to the SiteBay backend's /shopify-proxy endpoint with the prepared proxy_data.
    async def shopify_proxy(self, proxy_data: Dict[str, Any]) -> Any: """Proxy request to Shopify API""" return await self.post("/shopify-proxy", json_data=proxy_data)

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/sitebay/sitebay-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server