MCP & ACP API
Giggle Trade exposes AI agent capabilities via MCP (Model Context Protocol) and ACP (Agent Communication Protocol). Use our catalog, stock, cart, and order 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
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": 49,
"resources": 4,
"prompts": 6
},
"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 (10) do not require auth. Authenticated tools (39) require JWT or API Key.
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
Public Forms (No Auth)
Authenticated tools (by category)
High-impact tools (require user confirmation)
Clients should obtain user confirmation before calling these.
convert_cart_to_order— Convert cart items to ordercancel_order— Cancel an ordership_order— Update order logistics / shippay_deposit— Pay order deposit (1/3)pay_balance— Pay order balance (2/3)
Resources & Prompts
Resources (4)
Markdown content available via MCP resources/read.
secondhand://glossary— Business glossary: Model, grade, stock, order, B2B conceptssecondhand://grades— Device grade definitions: A+/A/B/C/A+++ with QC criteriasecondhand://b2b_regions— Regional compliance guide: HK, FR, DE, UK, VAT, DDP/DDUsecondhand://api— API reference documentation: MCP tools and API mapping
Prompts (6)
Pre-built workflows via MCP prompts/get.
stock_overview— Domain intro + current stock viewstock_by_model_grade— Filtered stock searchb2b_assortment_advice— Business stocking recommendationsregions_shipping_tax— Regional compliance explanationcatalog_vs_stock— Compare listings vs actual inventoryproduct_detail_similar— Product deep-dive with recommendations
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.