bhs-mcp
bhs-mcp
MCP server for Blackhearts & Sparrows product data, deployed as a Cloudflare Worker.
Uses the Code Mode pattern — the LLM writes TypeScript that executes against a typed BHS API in a sandboxed Dynamic Worker, rather than calling fixed tools directly.
Architecture
LLM -> code tool -> Dynamic Worker (sandbox)
| bhs.search(...)
BhsProxy (RPC bridge)
|
Host Worker
|
Meilisearch / GraphQL APIsThe sandbox has no network access. All external calls go through the BhsProxy RPC bridge to the host worker.
MCP Tools
Tool | Description |
| TypeScript type definitions, method signatures, and example queries |
| Sandbox capabilities, constraints, and guidance |
| Execute TypeScript with access to the |
Sandbox API
// Search products
const wines = await bhs.search({ type: "Wine", country: "France", priceMax: 30 });
// Get product details
const product = await bhs.product("44253");
// List stores
const stores = await bhs.stores();
// Manage cart
const cart = await bhs.cart.create();
await bhs.cart.addItems(cart.uid, [{ sku: "44253", masterSku: "44253", quantity: 6 }]);
const url = bhs.cart.checkoutUrl(cart.uid);Development
npm install
npm run dev # wrangler dev
npm run typecheck # tsc --noEmit
npm run deploy # wrangler deployDeployment
Route: bhs.jackemcpherson.com/mcp*
Depends on @jackemcpherson/bhs-cli for API functions and types.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/jackemcpherson/bhs-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server