MCP & ACP API

Giggle Trade exposes AI agent capabilities via MCP (Model Context Protocol) and ACP (Agent Communication Protocol). Use catalog, stock, learning insights, cart, order, and site-module mapping tools from Cursor, Claude, or any REST client.

Server Overview

Name
secondhand-mcp-server v2.0.0
Protocol
MCP 2024-11-05
Endpoint
https://giggletrade.com/mcp

Capabilities

53
Tools (16 public + 37 auth)
5
Resources (glossary, grades, regions, platform map, API doc)
12
Prompts (stock, B2B, catalog vs stock, six homepage-area flows)

Protocols: mcp/1.0 (JSON-RPC over Streamable HTTP), acp/1.0 (REST).

Endpoints

Method Path Description
GET /.well-known/agent.json Agent discovery (name, version, protocols, capabilities, endpoints)
GET /acp/tools List all tools (name, description, inputSchema). Cache 5 min.
POST /acp/tools/:toolName Invoke a tool (REST). Body: JSON args. Auth: Bearer or X-Api-Key.
POST /mcp MCP protocol (JSON-RPC: initialize, tools/list, tools/call, etc.)
GET /health MCP server health check

Base URL: use your deployment origin (e.g. https://giggletrade.com). MCP direct URL: https://giggletrade.com/mcp

1. Discovery (GET /.well-known/agent.json)

Discover agent name, version, supported protocols, and endpoint URLs. No auth required.

GET https://giggletrade.com/.well-known/agent.json

Example response:

{
  "name": "secondhand-mcp-server",
  "version": "2.0.0",
  "description": "MCP agent for GiggleTrade secondhand device marketplace (catalog, stock, orders, auth, content).",
  "protocols": [
    "mcp/1.0",
    "acp/1.0"
  ],
  "capabilities": {
    "tools": 53,
    "resources": 5,
    "prompts": 12
  },
  "endpoints": {
    "mcp": "https://giggletrade.com/mcp",
    "acp": "https://giggletrade.com/acp",
    "health": "https://giggletrade.com/health"
  }
}

2. ACP REST API

Call tools over standard HTTP. No MCP SDK required; use cURL, Postman, or any HTTP client.

GET /acp/tools — List tools

Returns {"tools": [{"name","description","inputSchema"}, ...]}. Cache-Control: public, max-age=300.

curl -s "https://giggletrade.com/acp/tools"

POST /acp/tools/:toolName — Invoke a tool

Body: JSON object with tool arguments. For auth-required tools, send Authorization: Bearer <JWT> or X-Api-Key: <API_KEY>. Response includes status, result, and metadata (tool, timestamp, request_id). Response header X-Request-ID is set for tracing.

curl -X POST "https://giggletrade.com/acp/tools/get_catalog_list" \\
  -H "Content-Type: application/json" \\
  -H "Authorization: Bearer <JWT>" \\
  -d '{"page":1,"limit":10}'

Request body max 1 MB. Timeout 60 s; timeout errors return 504.

3. MCP direct (POST /mcp)

For MCP-native clients (e.g. Cursor, Claude Desktop, MCP Inspector). Streamable HTTP transport: send JSON-RPC requests (initialize, tools/list, tools/call, etc.). Use the connection URL below.

https://giggletrade.com/mcp

Only POST is accepted; use Content-Type: application/json and Accept: application/json, text/event-stream. Optional headers: X-Request-ID, X-Agent-ID.

Tools reference

Public tools (16) do not require auth. Authenticated tools (37) require JWT or API Key. Use GET /acp/tools or MCP tools/list for the authoritative list.

Product & Catalog (Public – No Auth)

  • get_stock_list
  • get_catalog_options
  • get_catalog_models
  • get_catalog_list
  • get_product_detail
  • get_product_stock
  • get_stock_detail
  • get_content_offers

Learning & insights (Public – No Auth)

  • get_trending_models
  • get_related_products
  • get_personalized_suggestions
  • get_recommended_tools

Platform & site mapping (Public – No Auth)

  • get_giggletrade_platform_modules

Maps the six giggletrade.com discovery areas (listings, products, device stock, location stock, weekly prices, grades) to URLs and recommended tools; no backend HTTP call.

Public Forms (No Auth)

submit_contacttrade_buy_ask

Support (Public – No Auth)

  • get_return_policy

Authenticated tools (by category)

Shopping Cart (Auth)
get_cartget_cart_itemsadd_cart_itemadd_cart_items_batchupdate_cart_itemdelete_cart_itemsubmit_cartconvert_cart_to_order
Order Management (Auth)
list_ordersget_ordercancel_orderconfirm_orderprocess_ordership_orderupdate_execution_stage
Address Management (Auth)
list_addressesget_addresscreate_addressupdate_addressdelete_addressset_default_address
Stock & Inventory (Auth)
check_stock_availabilityget_authenticated_stock_list
Logistics (Auth)
get_order_logisticsupdate_order_logisticstrack_order
Payment (Auth)
pay_depositpay_balanceget_payment_providers
Communication (Auth)
get_order_messagessend_order_message
Utility (Auth)
get_locations
API Key Management (Auth)
list_api_keyscreate_api_keydelete_api_key
Support (Auth)
get_order_for_supportcreate_support_ticket

High-impact tools (require user confirmation)

Clients should obtain user confirmation before calling these.

  • convert_cart_to_order — Convert cart items to order
  • cancel_order — Cancel an order
  • ship_order — Update order logistics / ship
  • pay_deposit — Pay order deposit (1/3)
  • pay_balance — Pay order balance (2/3)

Resources & Prompts

Resources (5)

Markdown content available via MCP resources/read.

  • secondhand://glossary — Business glossary: Model, grade, stock, order, B2B concepts
  • secondhand://grades — Device grade definitions: A+/A/B/C/A+++ with QC criteria
  • secondhand://b2b_regions — Regional compliance guide: HK, FR, DE, UK, VAT, DDP/DDU
  • secondhand://platform_modules — Homepage module map: Six site areas → URLs, tools, prompts (listings, products, stock, weekly prices, grades)
  • secondhand://api — API reference documentation: MCP tools and API mapping

Prompts (12)

Pre-built workflows via MCP prompts/get.

  • stock_overview — Domain intro + current stock view
  • stock_by_model_grade — Filtered stock search
  • b2b_assortment_advice — Business stocking recommendations
  • regions_shipping_tax — Regional compliance explanation
  • catalog_vs_stock — Compare listings vs actual inventory
  • product_detail_similar — Product deep-dive with recommendations
  • compare_seller_quotes — Catalog listings / line-by-line seller offers
  • scan_prices_by_model — Catalog products / model-level price ranges
  • check_units_in_stock — Per-unit stock and IMEI-level detail
  • stock_by_site — Stock aggregated or filtered by location / site
  • weekly_price_snapshot — Weekly price baseline (product API + /weekly-prices)
  • understand_device_grades — Grade scale; use secondhand://grades and giggletrade.com/grades

Business Use Cases

This MCP server enables AI agents to:

  • Browse inventory of used/refurbished phones (iPhone, Samsung, etc.)
  • Check real-time stock with IMEI-level detail
  • Manage B2B purchasing workflows (cart → order → payment → shipping)
  • Handle multi-region logistics (Hong Kong hub, France/Germany/UK lines)
  • Process payments with deposit/balance structure
  • Track orders and communicate with sellers

Authentication, headers & limits

Authentication

Public endpoints: Product catalog, stock browsing, contact forms. Authenticated endpoints: Cart, orders, addresses, payments — require JWT or API Key via Authorization: Bearer <JWT> or X-Api-Key: <API_KEY>. ACP and MCP both forward these to the backend.

Optional headers

X-Request-ID: request correlation (generated if not provided). X-Agent-ID: optional agent identifier. Both are returned in response headers and ACP response metadata.

Limits

Request body max 1 MB. Backend request timeout 60 s; tool calls returning after that get 504. Clients can cancel with AbortController.

More

For human-facing API (catalog, products, etc.), see API Documentation . Deployment and environment details: docs/MCP_ACP_DEPLOYMENT.md in the repo.