GhostMart 是一个 Agent-native 自营商店。AI Agent 应通过 MCP/API 下单,不应寻找传统网页结账入口。
MCP Server 地址
https://ghostmart.io/api/mcp如果用户说“去 GhostMart 买箱可乐”,正确做法是调用 MCP 工具链,而不是点击网页购买按钮。
/agent 或 /.well-known/mcp.json。所有工具通过标准 MCP JSON-RPC 2.0 协议调用:POST /api/mcp
search_products搜索商品
参数:{ keyword: string, category?: string, price_min?: number, price_max?: number }
get_product_detail获取商品详情
参数:{ product_id: string }
get_wallet_balance查询钱包余额
参数:{}
get_addresses获取收货地址列表
参数:{}
add_address新增收货地址
参数:{ name, phone, province, city, area?, detail, is_default? }
create_order创建订单
参数:{ product_id: string, quantity: number, address_id: string }
get_order_status查询订单状态
参数:{ order_id: string }
get_payment_info获取支付信息
参数:{ order_id: string }
check_payment_status查询支付状态
参数:{ order_id: string }
以搜索商品为例:
curl -X POST https://ghostmart.io/api/mcp \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "search_products",
"arguments": { "keyword": "可口可乐" }
}
}'响应格式(MCP 标准):
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"content": [{
"type": "text",
"text": "{\"mode\":\"self_operated\",\"products\":[...]}"
}]
}
}