Webcake MCP

Webcake MCP

Receives Webcake webhooks to store orders/leads in SQLite and exposes MCP tools for Claude to list, search, and retrieve order details.

Category
Visit Server

README

Webcake MCP — cầu nối lấy đơn/lead từ Webcake về Claude

Một dịch vụ nhỏ làm 2 việc trong 1:

  1. Hứng webhook Webcake tại POST /webhook/webcake — mỗi khi có đơn/lead trên landing page, Webcake bắn dữ liệu tới đây và nó lưu lại (SQLite).
  2. Cổng MCP tại /mcp — để Claude Code đọc/tra cứu đơn đã lưu bằng các tool.
Webcake (form/đơn)  ──POST──►  dịch vụ này  ──►  Claude Code đọc qua MCP
   landing page              (hứng + lưu đơn)      list_orders / search_orders ...

Vì sao phải làm thế này? Webcake không có REST API kéo dữ liệu. Thứ Webcake gọi là "Kết nối API" thực chất là webhook đẩy ra một chiều. Nên ta dựng một chỗ công khai để hứng, rồi cho Claude đọc từ đó.

Các MCP tool

Tool Chức năng
list_orders(limit, since, status, page_name, event) Liệt kê đơn mới nhất, có lọc
get_order(order_id) Chi tiết 1 đơn (kèm payload gốc)
search_orders(query, limit) Tìm theo SĐT / tên / email / mã đơn
order_stats(since) Thống kê tổng & theo trạng thái

A. Chạy thử trên máy (local)

pip install -r requirements.txt
# đặt token tạm và chạy
set WEBHOOK_TOKEN=test123        # Windows CMD;  PowerShell: $env:WEBHOOK_TOKEN="test123"
uvicorn server:app --host 127.0.0.1 --port 8000

Mở http://127.0.0.1:8000/ thấy dòng "Webcake MCP server OK" là chạy được.


B. Deploy lên hosting (để Webcake bắn tới 24/7)

Webhook cần URL công khai luôn bật. Khuyến nghị host luôn chạy (đừng dùng gói "ngủ khi rảnh" vì đơn đến lúc server đang ngủ có thể bị mất).

Cách 1 — Railway (khuyến nghị, luôn chạy, dễ nhất)

  1. Đẩy thư mục webcake-mcp/ này lên một repo GitHub.
  2. Vào railway.appNew Project → Deploy from GitHub repo → chọn repo. Railway tự nhận Dockerfile và build.
  3. Tab Variables, thêm:
    • WEBHOOK_TOKEN = một chuỗi bí mật dài (vd bấm tạo ngẫu nhiên).
    • DB_PATH = /data/webcake.db
  4. Tab Settings → Volumes: tạo volume mount vào /data (để đơn không mất khi deploy lại).
  5. Tab Settings → Networking → Generate Domain để lấy URL công khai, vd https://webcake-mcp-production.up.railway.app.

Cách 2 — Render.com

Đã có sẵn render.yaml. Vào Render → New → Blueprint → trỏ vào repo. Render đọc file này, tự tạo dịch vụ + volume + token. (Gói free sẽ ngủ khi rảnh — đổi sang starter nếu cần chắc.)

Sau khi deploy xong, URL của anh sẽ có dạng https://<tên>.<host>. Ghi nhớ 2 thứ:

  • Webhook URL: https://<tên>.<host>/webhook/webcake?token=<WEBHOOK_TOKEN>
  • MCP URL: https://<tên>.<host>/mcp

C. Cấu hình bên Webcake (đổ đơn về đây)

Theo tài liệu Webcake (Dashboard → Tích hợp → Tài khoản liên kết):

  1. Thêm cấu hình kết nối API, dán vào ô API URL:
    https://<tên>.<host>/webhook/webcake?token=<WEBHOOK_TOKEN>
    
    (Token đã nằm trong URL nên không cần điền API Request Header.)
  2. Thêm cấu hình Form và map các trường muốn gửi. Nên bật các trường: name, phone, email, short_address, province, district, commune, page_name, location, status, display_id, inserted_at, utm_source, utm_medium, utm_campaign, variations (sản phẩm — cần nối POS). (Server tự nhận mọi trường; đây chỉ là các trường nó bóc tách sẵn để tra cứu.)
  3. Kết nối cấu hình API với landing page → chọn điều kiện đồng bộ (Hoàn thành form / Thanh toán thành công / …). Có thể thêm &event=payment_success vào cuối URL để phân biệt loại sự kiện.
  4. Bấm gửi thử một đơn trên landing page rồi kiểm tra bằng order_stats (mục D).

D. Nối vào Claude Code

Đây là remote MCP (qua HTTP). Đăng ký một lần:

claude mcp add --transport http webcake https://<tên>.<host>/mcp

Xong, trong Claude Code anh hỏi kiểu "liệt kê 10 đơn mới nhất", "tìm đơn của số 0901234567", "hôm nay có bao nhiêu đơn đã thanh toán" — Claude sẽ gọi các tool tương ứng.


Ghi chú

  • Token: nếu để trống WEBHOOK_TOKEN, server sẽ nhận mọi webhook (không nên khi chạy thật).
  • Dữ liệu: đây là bản sao để tra cứu; đơn gốc vẫn nằm trong Webcake/Pancake.
  • Bảo mật MCP: bản này chưa đặt auth cho /mcp (chỉ dựa vào URL khó đoán). Nếu cần chặt hơn có thể thêm token cho MCP — hỏi để bổ sung.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured