GhostMart

MCP server for shopping in China

GhostMart is an agent-native store. There is no human checkout flow to automate — your agent searches, orders, pays and tracks shipments by calling MCP tools.

MCP endpoint

https://ghostmart.cn/api/mcp

Read this before you integrate

GhostMart settles in CNY via Alipay and fulfils inside mainland China. It is useful if you or your users need to buy or ship things in China — it is not a cross-border store, and adding funds requires a Chinese payment method.

If that is not your use case, this server will not be much good to you. Better you know now than after the integration.

How payment works

Money sits in a prepaid wallet, not on a card. The user tops the wallet up; the agent spends from that balance. This bounds what an agent can spend without a human in the loop — the user never hands an agent open-ended payment authority.

user tops up wallet → agent calls tools → order paid from balance → user gets a receipt

Quick start

1. Call any tool without a token — the server replies with an activation link.

curl -X POST https://ghostmart.cn/api/mcp \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "tools/call",
    "params": {
      "name": "search_products",
      "arguments": { "keyword": "cola" }
    }
  }'

2. The user opens that link and registers, once. This is deliberate — a human authorises the wallet, not the agent.

3. Poll for the token, then send it as a bearer token.

curl "https://ghostmart.cn/api/v1/auth/poll?temp_token=<temp_token>"

curl -X POST https://ghostmart.cn/api/mcp \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <token>" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call",
       "params":{"name":"get_wallet_balance","arguments":{}}}'

Tools (11)

All tools are called over standard MCP JSON-RPC 2.0: POST /api/mcp. Credentials are scoped — a token only gets the capabilities it was issued for.

search_products

Search the catalogue

params: { keyword: string, category?, price_min?, price_max? }

get_product_detail

Full detail for one product

params: { product_id: string }

get_wallet_balance

Current wallet balance

params: {}

get_addresses

List saved shipping addresses

params: {}

add_address

Add an address (returns a form link if fields are omitted)

params: { name, phone, province, city, area?, detail, is_default? }

create_order

Place an order, paid from wallet balance

params: { product_id, quantity, address_id, idempotency_key? }

get_order_status

Status plus tracking number and carrier

params: { order_id: string }

get_payment_info

Payment status and payment link

params: { order_id: string }

check_payment_status

Poll until payment settles

params: { order_id: string }

cancel_order

Cancel and refund to wallet

params: { order_id: string }

get_topup_link

Generate a wallet top-up link

params: { amount: number }

Notes for agent builders

  • Return text verbatim. Tool results separate the user-facing message from machine metadata and behavioural instructions. Send the first block to the user unchanged.
  • Never invent fulfilment details. Shipping status, delivery dates and tracking come from get_order_status only. No tracking number means there is no shipping information yet.
  • Insufficient balance is normal. create_order returns a top-up link when the wallet is short — pass it to the user, then poll check_payment_status.

Discovery

/.well-known/mcp.jsonmachine-readable server descriptor

/llms.txtsummary for language models

GhostMart · MCP Protocol 2024-11-05 · Live and processing real payments