
MCP Commerce Server Starter
io.github.NewPlanetWW由 GitHub 帳號 NewPlanetWW 發布v1.0.0更新於 Oct 24, 2026
FastMCP commerce server starter: product catalog, search, and checkout. Deploy to Vercel in 5 min.
概覽
一個商務類 MCP 伺服器起步範本,提供商品目錄資源以及搜尋與結帳工具,讓代理程式完成購物流程。
- 可以做什麼
- 這是以 FastMCP 與 FastAPI 打造的複製即可部署商務伺服器範本。它提供代理程式可讀取的商品目錄資源、支援關鍵字、分類與最高價格篩選的 search_products 工具,以及回傳訂單摘要與結帳連結的 initiate_checkout 工具。另外也提供健康檢查端點,可在本機執行或部署到 Vercel。
- 適用情境
- 當你需要一個可運作、面向代理程式的商務後端範例,或想把自家商品目錄與結帳流程接上 Claude、ChatGPT、Gemini、Cursor 等 MCP 用戶端時,可以使用它。它是範本而非成品商店,需要自行替換範例資料與結帳佔位實作。
- 執行需求
- 可作為遠端端點使用,也可在本機執行,需要 Python 及以 pip 安裝的相依套件;使用 Vercel CLI 部署需要 Node 18+。選用的 API 金鑰驗證使用 X-API-Key 標頭,由 API_KEY 與 REQUIRE_AUTH 環境變數控制。清單中未宣告任何憑證。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 MCP Commerce Server Starter,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Web executable,透過 Streamable HTTP。 遠端服務在工作區中設定後即可從網頁執行環境執行。
交給代理程式安裝
把這段提示詞貼上到 Claude Code、Codex、Cursor 等代理程式,或 SourceWeft 對話中。代理程式會讀取該伺服器的安裝指南,先向你展示發布者、端點和登入方式,經你同意後再把它新增到你的客戶端。金鑰不會寫進任何命令。
閱讀 https://sourceweft.com/mcp/io.github.NewPlanetWW%2Fmcp-commerce-starter/install.md,並按其中說明把這個 MCP 伺服器接入我的客戶端。修改任何設定之前,先告訴我它的發布者、端點和登入方式,等我確認。不要把 API 金鑰寫進命令或我會提交的檔案;問我金鑰應從哪裡取得。其他 MCP 客戶端
把它新增到你客戶端的 mcpServers 設定中。
{
"mcpServers": {
"commerce-starter": {
"type": "http",
"url": "https://mcp-commerce-starter.vercel.app/mcp"
}
}
}README
MCP Commerce Server Starter
Clone-and-deploy boilerplate for a commerce MCP server. Live on Vercel in five minutes. Reachable by Claude, ChatGPT, Gemini, Cursor, and every other MCP-compatible client.
Full build guide (with the why behind every line): How to Build an MCP Server in 2026
What you get
- Product catalog Resource — agents read the full catalog before acting
search_productsTool — keyword + category + max-price filterinitiate_checkoutTool — returns order summary + checkout URL- Optional API-key auth —
X-API-Keyheader, toggle withREQUIRE_AUTH=true - Health endpoint at
/health - Vercel-ready — one command deploy, free Hobby tier
Stack: Python · FastMCP · FastAPI · Vercel
Quick start (local)
Test the health endpoint:
Deploy to Vercel (free)
Requires Node 18+ for the Vercel CLI. No GitHub required — the CLI uploads directly.
The CLI prints your production URL. Your MCP endpoint is at:
Set environment variables in the Vercel dashboard (Settings → Environment Variables):
Wire into Claude Desktop
Option A — Local stdio (fast iteration while building):
Edit ~/Library/Application Support/Claude/claude_desktop_config.json on macOS (see full guide for Windows/Linux paths):
Option B — Remote (after Vercel deploy) using mcp-remote:
Fully quit and relaunch Claude Desktop. Ask: "What products do you have under $100?" — Claude calls search_products and responds with your catalog.
Customize
Replace the sample products
Edit the PRODUCTS list in server.py. Each product needs: sku, name, price, description, availability, category, image_url.
For real inventory, replace the list with a database call:
Add Stripe checkout
Replace the stub in initiate_checkout with a real Stripe session:
The 5 errors you'll hit (and how to fix them)
Covered in the full guide: 30daypivot.com/agentmall_spoke_mcp
MCP error -32600— initialization order violation422 Unprocessable Entity— Pydantic model vs plain args mismatch405 Method Not Allowed— missing DELETE in CORS allowed methodsstateless_http not set— serverless Vercel requiresstateless_http=TrueModuleNotFoundError: mcp— wrong package name (mcp[cli], notfastmcp)
Project structure
Go deeper
This starter is the code companion to the AgentMall spoke series on 30DayPivot:
- MCP Server Build Guide — the full walkthrough behind this repo
- Agent-Readable Product Data — Schema.org markup so agents find your products without calling the server
- FastAPI Commerce API — REST layer that sits alongside your MCP server
- Free-to-Paid / Stripe Metered Billing — monetize the server you just built
- The AgentMall Roadmap — full picks-and-shovels map of agentic commerce infrastructure
License
MIT
來源:README.md,提交 d9ec6db
工具
0版本歷史
1- v1.0.0最新Sep 16, 2026
評分
已滿足適用檢查項的 75%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通必需25 分
- 已宣告認證方式必需10 分
- 已列出工具必需15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分
請在儲存庫或註冊中心條目中宣告授權條款。