Skip to main content
Glama

bhs-mcp

用于 Blackhearts & Sparrows 产品数据的 MCP 服务器,部署为 Cloudflare Worker。

采用 Code Mode 模式——LLM 编写在沙盒 Dynamic Worker 中针对类型化 BHS API 执行的 TypeScript 代码,而不是直接调用固定的工具。

架构

LLM -> code tool -> Dynamic Worker (sandbox)
                        | bhs.search(...)
                     BhsProxy (RPC bridge)
                        |
                     Host Worker
                        |
                     Meilisearch / GraphQL APIs

沙盒没有网络访问权限。所有外部调用都通过 BhsProxy RPC 网桥发送到宿主 Worker。

Related MCP server: Kibo Commerce MCP Server

MCP 工具

工具

描述

schema

TypeScript 类型定义、方法签名和示例查询

tools

沙盒能力、约束和指南

code

执行具有 bhs API 对象访问权限的 TypeScript 代码

沙盒 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);

开发

npm install
npm run dev        # wrangler dev
npm run typecheck  # tsc --noEmit
npm run deploy     # wrangler deploy

部署

路由:bhs.jackemcpherson.com/mcp*

依赖 @jackemcpherson/bhs-cli 提供 API 函数和类型。

Related MCP Connectors

Related MCP Servers

  • F
    license
    B
    quality
    D
    maintenance
    A code-first MCP server that provides a single tool to execute JavaScript or TypeScript with authenticated access to Google Workspace APIs. It enables flexible interactions with services like Calendar and Drive by running user-provided scripts through a built-in runtime environment.
    1
    7
    -
  • F
    license
    Not graded
    quality
    D
    maintenance
    An MCP server that executes TypeScript/JavaScript code in a sandboxed Bun environment with permission-based security controls, code snippets, and a web management UI.
    -
  • A
    license
    A
    quality
    A
    maintenance
    A local MCP server for grocery shopping, enabling product search, specials, and browsing across NZ supermarkets, with cart and order history for Countdown/Woolworths via browser-assisted login.
    14
    1
    MIT