streamable-httpupdated 3mo ago
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.
What can you do with MCP Commerce Server Starter?
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)
git clone https://github.com/NewPlanetWW/mcp-commerce-starter
cd mcp-commerce-starter
python -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt
python server.py
# Server running at http://localhost:8000
# MCP endpoint: http://localhost:8000/mcp
# Health check: http://localhost:8000/health
Test the health endpoint:
curl http://localhost:8000/health
# {"status":"ok","server":"Commerce MCP Server","version":"1.0.0"}
Deploy to Vercel (free)
Requires Node 18+ for the Vercel CLI. No GitHub required โ the CLI uploads directly.
npm i -g vercel
vercel login
vercel --prod
The CLI prints your production URL. Your MCP endpoint is at:
https://your-project.vercel.app/mcp
Set environment variables in the Vercel dashboard (Settings โ Environment Variables):
| Variable | Default | Notes |
|---|---|---|
API_KEY |
dev-secret-key |
Change before going live |
REQUIRE_AUTH |
false |
Set true to enforce the key |
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):
{
"mcpServers": {
"commerce-catalog": {
"command": "uvicorn",
"args": ["server:app", "--host", "127.0.0.1", "--port", "8001"],
"env": {
"REQUIRE_AUTH": "false"
},
"cwd": "/path/to/mcp-commerce-starter"
}
}
}
Option B โ Remote (after Vercel deploy) using mcp-remote:
{
"mcpServers": {
"commerce-catalog-remote": {
"command": "npx",
"args": [
"-y", "mcp-remote@latest",
"https://your-project.vercel.app/mcp",
"--header", "Authorization: Bearer ${MCP_API_KEY}"
],
"env": { "MCP_API_KEY": "your-secret-key" }
}
}
}
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:
# server.py โ swap PRODUCTS for a live query
import psycopg2 # or SQLAlchemy, Supabase, etc.
def get_products():
# your DB query here
return [...]
PRODUCTS = get_products()
Add Stripe checkout
Replace the stub in initiate_checkout with a real Stripe session:
import stripe
stripe.api_key = os.getenv("STRIPE_SECRET_KEY")
session = stripe.checkout.Session.create(
line_items=[{"price": price_id, "quantity": quantity}],
mode="payment",
success_url="https://yourstore.com/success",
cancel_url="https://yourstore.com/cancel",
)
return {"success": True, "checkout_url": session.url, ...}
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
mcp-commerce-starter/
โโโ server.py # FastMCP app โ resource, tools, middleware, FastAPI mount
โโโ requirements.txt # Pinned dependencies
โโโ vercel.json # Vercel deployment config
โโโ mcp.json # MCP server manifest
โโโ .env.example # Environment variable template
โโโ README.md
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
Install
Add MCP Commerce Server Starter to your client. Pick the one you use.
claude mcp add --transport http mcp-commerce-server-starter https://mcp-commerce-starter.vercel.app/mcpcodex mcp add mcp-commerce-server-starter --url https://mcp-commerce-starter.vercel.app/mcp{
"mcpServers": {
"mcp-commerce-server-starter": {
"url": "https://mcp-commerce-starter.vercel.app/mcp"
}
}
}Add to `~/.cursor/mcp.json`, or `.cursor/mcp.json` for a single project.
{
"servers": {
"mcp-commerce-server-starter": {
"type": "http",
"url": "https://mcp-commerce-starter.vercel.app/mcp"
}
}
}Add to `.vscode/mcp.json` in your workspace.
{
"mcpServers": {
"mcp-commerce-server-starter": {
"url": "https://mcp-commerce-starter.vercel.app/mcp"
}
}
}Add to `claude_desktop_config.json`, then restart Claude Desktop.
{
"mcpServers": {
"mcp-commerce-server-starter": {
"serverUrl": "https://mcp-commerce-starter.vercel.app/mcp"
}
}
}Add to `~/.codeium/windsurf/mcp_config.json`.
Score
39 / 100
Incomplete
- Documentation25/25
- Maintenance13/25
- Trust6/20
- Capability0/15
- Install experience12/15
- Documents what it does and how to connect
- Has a resolvable package or endpoint
- Exposes at least one tool, prompt or resource
- README has substantive content
- Includes a code example
- Documents its configuration
- Mentions credentials or security posture
- Last commit 100 days ago
- Has a release history
- Repository is not archived
- No licence detected
- Namespace verified in the official MCP registry
- Claimed by its owner
- Published under an organisation
- 0 tool(s) documented
- Provides prompt templates
- Provides resources
- 6 documented install method(s)
- Published to a package registry
- Offers a hosted endpoint โ no local install
Version history
| Versions | Published |
|---|---|
| 1.0.0Latest | May 24, 2026 |