Agent Framework
THC Store India publishes a REST API, an MCP (Model Context Protocol) server, and a chat endpoint that any LLM — Claude, ChatGPT, Cursor, or your own agent — can call. MCP-aware clients (Claude Desktop, ChatGPT MCP Connectors) sign in via OAuth 2.0 (MCP 2025-06-18 spec) — no manual token paste. REST clients use a Personal Access Token. Anonymous read access works out of the box.
Model Context Protocol. Best for Claude Desktop, Cursor, and other MCP-aware clients.
https://mcp.thcstore.in/mcpA managed conversational front-door (PAT-gated). Good when you want THC Store to handle tool routing for you.
https://chat.thcstore.in/chatClaude Desktop and ChatGPT MCP Connectors auto-discover OAuth via the resource metadata endpoint on first connect. Your browser opens for sign-in and scope approval; the token is stored locally by the client (90-day lifetime). OAuth-issued tokens appear in Connected AI under the AI client's reported name (e.g. Claude Desktop, ChatGPT MCP Connector) — revoke there to force the client to re-authorize. PKCE S256 + dynamic client registration follow the MCP 2025-06-18 spec.
For ChatGPT Custom GPTs (free tier) or any REST integration, mint a PAT from Connected AI and use it as a Bearer token. Each PAT can be scoped to specific tools (e.g. cart:write, orders:read).
Anonymous (tier-0) reads — product search, blog, doctor list, pincode resolve — work with no PAT and are IP rate-limited.
curl -X POST https://agent-api.thcstore.in/v1/public/searchProducts \
-H 'Content-Type: application/json' \
-d '{"args":{"query":"ashwagandha","limit":3}}'curl -X POST https://agent-api.thcstore.in/v1/tools/addToCart \
-H 'Authorization: Bearer thc_pat_xxx' \
-H 'Content-Type: application/json' \
-d '{"args":{"productId":1,"quantity":1}}'{
"mcpServers": {
"thc-store": {
"command": "npx",
"args": ["-y", "mcp-remote", "https://mcp.thcstore.in/mcp"]
}
}
}{
"mcpServers": {
"thc-store": {
"url": "https://mcp.thcstore.in/mcp"
}
}
}Settings → Connectors → Add MCP server → https://mcp.thcstore.in/mcpOpenAPI URL: https://agent-api.thcstore.in/.well-known/ai-plugin.json
Auth: API Key → Bearer → paste a PAT from /account/connected-aiLive from https://agent-api.thcstore.in/v1/openapi.json — refreshes hourly.
/v1/tools/getAddressesgetAddresses/v1/tools/getLoyaltyPointsgetLoyaltyPoints/v1/tools/getWalletBalancegetWalletBalance/v1/auth/session/{sessionId}/pollPoll an OAuth session for the redeemed PAT/v1/auth/session/startStart an OAuth session (auth-link / device-code)/v1/tools/public.checkStockpublic.checkStock/v1/tools/public.getBlogPostpublic.getBlogPost/v1/tools/public.getBrandProfilepublic.getBrandProfile/v1/tools/public.getCategoriespublic.getCategories/v1/tools/public.getDoctorProfilepublic.getDoctorProfile/v1/tools/public.getDosageGuidepublic.getDosageGuide/v1/tools/public.getProductpublic.getProduct/v1/tools/public.getProductClaimpublic.getProductClaim/v1/tools/public.getStateCitypublic.getStateCity/v1/tools/public.listBrandspublic.listBrands/v1/tools/public.listDoctorspublic.listDoctors/v1/tools/public.listServiceablePincodespublic.listServiceablePincodes/v1/tools/public.resolvePincodepublic.resolvePincode/v1/tools/public.searchBlogpublic.searchBlog/v1/tools/public.searchProductspublic.searchProducts/v1/tools/whoamiwhoami/v1/tools/getCartgetCart/v1/tools/getCartTotalsgetCartTotals/v1/tools/addToCartaddToCart/v1/tools/applyCouponapplyCoupon/v1/tools/clearCartclearCart/v1/tools/removeFromCartremoveFromCart/v1/tools/updateQuantityupdateQuantity/v1/tools/checkStockcheckStock/v1/tools/getCategoriesgetCategories/v1/tools/getProductgetProduct/v1/tools/getRxRequiredForgetRxRequiredFor/v1/tools/searchProductssearchProducts/v1/tools/getDoctorAvailabilitygetDoctorAvailability/v1/tools/getDoctorProfilegetDoctorProfile/v1/tools/joinAppointmentVideojoinAppointmentVideo/v1/tools/listDoctorslistDoctors/v1/tools/listMyAppointmentslistMyAppointments/v1/tools/confirmStagedConsultationconfirmStagedConsultation/v1/tools/stageConsultationstageConsultation/v1/tools/cancelAppointmentcancelAppointment/v1/tools/getOrdergetOrder/v1/tools/getOrderTrackinggetOrderTracking/v1/tools/listOrderslistOrders/v1/tools/cancelStagedOrdercancelStagedOrder/v1/tools/confirmStagedOrderconfirmStagedOrder/v1/tools/stageOrderstageOrder/v1/tools/listMyPrescriptionslistMyPrescriptions/v1/tools/linkPrescriptionToOrderlinkPrescriptionToOrder/v1/tools/requestPrescriptionUploadrequestPrescriptionUpload/v1/tools/submitPrescriptionsubmitPrescription/v1/tools/getPersonalizedRecommendationsgetPersonalizedRecommendations