Skip to main content

Overview

The Henry MCP server gives Claude, Cursor, Windsurf, VS Code, Zed, and other MCP-compatible clients secure access to the Henry Shopping API. Launch the server with npx and point your favorite client at it to start creating carts, products, and hosted checkout flows through natural language.

Setup Instructions

General

The Henry MCP server ships as a local stdio process.
  • Install Node.js 18+ and ensure npx is on your path.
  • Export the required environment variables (sandbox keys shown below).
  • Start the server before or while your client connects.
export HENRY_SDK_API_KEY="pk_sdk_api_key"
export HENRY_SDK_ENVIRONMENT="sandbox"
npx -y @henrylabs/mcp@latest --tag=hosted
Alternatively, set --tag=headless to have your agent use the headless checkout flow

Hosted vs Headless flows

FlowUser Experience
Hosted checkoutUses natural language for product discovery and add to cart, returning a hosted page at point of checkout
Headless checkoutUses natural language for product discovery, add to cart, and checkout. Ideal for voice agents, recurring or scheduled purchases, etc
Not setting a --tag will expose both hosted and headless tools. This is not recommended.

Claude

Team, Enterprise (Claude.ai)
  • Claude’s web client only connects to remote MCP servers. Because the Henry MCP server is local-only, use Claude Desktop or Claude Code instead.
Free, Pro (Claude desktop)
  1. Open ~/Library/Application Support/Claude/claude_desktop_config.json.
  2. Add or merge the following configuration and restart Claude Desktop:
{
  "mcpServers": {
    "henrylabs": {
      "command": "npx",
      "args": ["-y", "@henrylabs/mcp@latest", "--tag=hosted"],
      "env": {
        "HENRY_SDK_API_KEY": "pk_sdk_api_key",
        "HENRY_SDK_ENVIRONMENT": "sandbox"
      }
    }
  }
}
Claude Code Create or update ~/.config/claude/.mcp.json (Mac/Linux) or %APPDATA%\Claude\.mcp.json (Windows):
{
  "mcpServers": {
    "henrylabs": {
      "command": "npx",
      "args": ["-y", "@henrylabs/mcp@latest", "--tag=hosted"],
      "env": {
        "HENRY_SDK_API_KEY": "pk_sdk_api_key",
        "HENRY_SDK_ENVIRONMENT": "sandbox"
      }
    }
  }
}
Launch a Claude Code session, run /mcp, and follow the prompts. Re-run npx with fresh environment variables if you rotate keys.

Cursor

  1. Press Cmd/Ctrl + Shift + P and search for MCP: Add Server.
  2. Choose Command (stdio).
  3. Enter npx -y @henrylabs/mcp@latest --tag=hosted.
  4. When asked, set the server name to Henry Labs and add the environment variables:
    • HENRY_SDK_API_KEY=pk_sdk_api_key
    • HENRY_SDK_ENVIRONMENT=sandbox
  5. Start the server from MCP: List Servers whenever you need access.

Visual Studio Code

Add the configuration to your VS Code MCP settings (e.g. via Settings > Extensions > Model Context Protocol > Servers (JSON)):
{
  "mcpServers": {
    "henrylabs": {
      "command": "npx",
      "args": ["-y", "@henrylabs/mcp@latest", "--tag=hosted"],
      "env": {
        "HENRY_SDK_API_KEY": "pk_sdk_api_key",
        "HENRY_SDK_ENVIRONMENT": "sandbox"
      }
    }
  }
}
Then run Cmd/Ctrl + P, choose MCP: Add Server, select Henry Labs, and start the server.

Windsurf

  1. Open settings with Cmd/Ctrl + ,.
  2. Under Cascade > MCP Servers, choose Add custom server.
  3. Paste the snippet below and save:
{
  "mcpServers": {
    "henrylabs": {
      "command": "npx",
      "args": ["-y", "@henrylabs/mcp@latest", "--tag=hosted"],
      "env": {
        "HENRY_SDK_API_KEY": "pk_sdk_api_key",
        "HENRY_SDK_ENVIRONMENT": "sandbox"
      }
    }
  }
}
Select Henry Labs from the MCP server list to connect.

Zed

  1. Open settings with Cmd + ,.
  2. Add the configuration to your settings.json:
{
  "context_servers": {
    "henrylabs": {
      "source": "custom",
      "command": "npx",
      "args": ["-y", "@henrylabs/mcp@latest", "--tag=hosted"],
      "env": {
        "HENRY_SDK_API_KEY": "pk_sdk_api_key",
        "HENRY_SDK_ENVIRONMENT": "sandbox"
      }
    }
  }
}

Others

Any MCP client that supports stdio servers can run Henry Labs with:
  • Command: npx
  • Arguments: -y @henrylabs/mcp@latest --tag=hosted
  • Environment:
    • HENRY_SDK_API_KEY
    • HENRY_SDK_ENVIRONMENT

Tool Configuration Options

Henry Labs exposes one tool per API endpoint by default. Use CLI flags (or matching config arguments) to tailor what the client sees:
  • --tool <name>: include specific tools.
  • --resource <pattern>: include all tools under a resource (supports wildcards like cart.*).
  • --operation <read|write>: filter to read-only or write actions.
  • --tag <tag>: include only tagged endpoints such as hosted or headless.
  • --no-tool, --no-resource, etc.: exclude specific entries.
  • --client=<name>: optimize schemas for claude, claude-code, cursor, or openai-agents.
  • --tools=dynamic: expose discovery helpers (list_api_endpoints, get_api_endpoint_schema, invoke_api_endpoint) instead of per-endpoint tools.
Combine flags as needed; run npx -y @henrylabs/mcp@latest --help to see the full list.

Available Tools

products

  • retrieve_product_details (read, tags: headless, hosted): Fetch product details by ID before adding to cart.
  • search_products (write, tags: headless, hosted): Search and filter the product catalog.

cart

  • create_cart_checkout (write, tags: hosted): Generate a hosted checkout URL for the current cart.

cart.items

  • list_cart_items (read, tags: hosted): List all products currently in the cart.
  • add_cart_items (write, tags: hosted): Add products to a new or existing cart.
  • clear_cart_items (write, tags: hosted): Remove all items from the cart.
  • remove_cart_items (write, tags: hosted): Remove a specific cart item.

checkout.session

  • confirm_checkout_session (write, tags: headless): Finalize checkout and create an order.
  • create_checkout_session (write, tags: headless): Prepare a checkout session with shipping and pricing metadata.

orders

  • retrieve_status_orders (read, tags: headless, hosted): Check the status of an order by ID.

wallet

  • collect_payment_details (write, tags: headless): Launch a modal URL to capture and store payment methods.