Overview
The Henry MCP server (@henrylabs/mcp) gives Claude, Cursor, Windsurf, VS
Code, Zed, and other MCP-compatible clients access to the Henry Shopping API.
It is a Code Mode server: instead of exposing one tool per API endpoint,
it exposes two tools and lets your agent write TypeScript against the
@henrylabs/sdk client. The
agent looks up what it needs with a docs search tool, then performs the whole
task — search, cart, checkout — in a single code execution. This keeps the
tool surface small while giving agents the full SDK.
Available Tools
The server exposes exactly two tools:search_docs
Searches the SDK documentation for methods, parameters, and usage examples.
Agents call this first to discover the right approach before writing code.
execute
Runs TypeScript code against a pre-authenticated HenrySDK client. The agent
defines an async function run(client); whatever the function returns or
prints comes back as the tool result. The code runs in an isolated sandbox
with no web or filesystem access (see
Privacy and code execution for where the
sandbox runs).
A typical execute call written by an agent looks like this:
Setup Instructions
General
The Henry MCP server ships as a local stdio process.- Install Node.js 18+ and ensure
npxis on your path. - Set
HENRY_SDK_API_KEYto a key from the Henry Dashboard.
Claude Code
Add the server from your terminal:.mcp.json
into the repo root:
/mcp inside a Claude Code session to verify the connection.
Claude Desktop
- Open
~/Library/Application Support/Claude/claude_desktop_config.json(macOS) or%APPDATA%\Claude\claude_desktop_config.json(Windows). - Add or merge the following configuration and restart Claude Desktop:
Claude’s web client only connects to remote MCP servers. Use Claude Desktop
or Claude Code, or host the server yourself with
--transport http (see
Running as a remote server).Cursor
- Open Cursor Settings > Tools & MCP > New MCP Server.
- Add the following to
mcp.json:
Visual Studio Code
- Open the Command Palette and run MCP: Open User Configuration.
- Add the server to
mcp.json:
Windsurf
- Open settings with
Cmd/Ctrl + ,. - Under Cascade > MCP Servers, choose Add custom server.
- Paste the snippet below into
mcp_config.jsonand save:
Zed
- Open settings with
Cmd + ,. - Add the configuration to your
settings.json:
Others
Any MCP client that supports stdio servers can run the Henry MCP server with:- Command:
npx - Arguments:
-y @henrylabs/mcp@latest - Environment:
HENRY_SDK_API_KEY
Configuration
Environment variables
CLI flags
Run
npx -y @henrylabs/mcp@latest --help for the full list.
Common configurations:
Privacy and code execution
By default (--code-execution-mode=stainless-sandbox), the TypeScript your
agent writes is executed in isolated sandboxes hosted by
Stainless, the platform the server is built on.
The generated code and your API credentials transit Stainless infrastructure
in this mode. Sandboxes have no web or filesystem access beyond calling the
Henry API.
To keep execution entirely on your own machine, pass
--code-execution-mode=local. Likewise, search_docs queries go to the
Stainless-hosted search API by default; pass --docs-search-mode=local to use
an in-memory index built from embedded SDK data (and any --docs-dir files)
instead.
Running as a remote server
Launching with--transport http serves the MCP server over Streamable HTTP.
Use --port to pick the port or --socket to bind a Unix socket:
x-api-key header instead of the environment
variable: