Bumblewick Support-Desk MCP Server
Enables AI assistants to manage customer support for a fictional candle shop, including order lookup, customer file access, and safe refund processing with server-side safety rules.
README
Bumblewick Support-Desk MCP Server 🕯️
The example project for the "Give the Robot Hands" series — a small, safe, well-tested Model Context Protocol server for a fictional online candle shop, Bumblewick & Co.
It gives an AI assistant carefully-scoped "hands": it can look up orders, read a customer's file, search the help centre, and issue refunds — with every dangerous action fenced in by server-side rules. No real people, no real money.
Everything runs locally against a seeded SQLite database. Nothing leaves your machine.
What it exposes
Tools
find_orders(query)— look up orders by order id, customer id, or email (read-only)get_order(order_id)— one order, its refund history, and the refundable balance (read-only)search_help(query)— search the help centre (read-only)create_refund(order_id, amount_cents, reason, confirm=false, idempotency_key=None)— issue a refund (guarded write)
Resources
bumblewick://policy/refunds— the refund policy, as contextbumblewick://customer/{customer_ref}— a customer file (profile + orders)
Prompts
draft_apology(order_id, tone="warm")— a reusable support-reply template
The safety rules (a.k.a. "don't give the robot a chainsaw")
create_refund refuses to misbehave, server-side:
- Only shipped/delivered orders are refundable.
- Never more than the remaining refundable balance (no over-refunds).
- Amounts over the auto-approve limit return
needs_confirmationand do not execute until you re-call withconfirm=true(human-in-the-loop). - A per-customer rate limit caps refunds within a rolling window.
- An idempotency key makes retries safe — the same key returns the original refund, and reusing a key with different parameters is rejected (never a silent wrong-refund).
- The check-and-write runs in one atomic transaction (
BEGIN IMMEDIATE), so two concurrent refunds can't both slip past the balance check. - A non-empty reason is required, and every decision is written to an audit log on stderr (stdout is reserved for the JSON-RPC stream).
Quick start
# 1. Install (any of: pip, uv, poetry)
pip install -e ".[dev]"
# 2. Run the tests
pytest
# 3. Explore it in the MCP Inspector (opens a GUI to poke every tool)
mcp dev src/bumblewick_support/server.py
# 4. Or run it over stdio (for a client like Claude Desktop)
python -m bumblewick_support.server
First run seeds bumblewick.db with sample customers, candle orders, and help
articles. Delete the file to reset.
Connect it to Claude Desktop
Add this to your claude_desktop_config.json:
{
"mcpServers": {
"bumblewick": {
"command": "python",
"args": ["-m", "bumblewick_support.server"]
}
}
}
Then ask: "Find Ivy's orders and refund the Vanilla Doom candle." Watch it use
find_orders, get_order, and create_refund — and watch it get politely
stopped when it tries to refund something it shouldn't.
Configuration
All settings are environment variables (prefix BUMBLEWICK_); see .env.example.
| Variable | Default | Meaning |
|---|---|---|
BUMBLEWICK_DB_PATH |
bumblewick.db |
SQLite file path |
BUMBLEWICK_AUTO_REFUND_LIMIT_CENTS |
2000 |
auto-approve ceiling; above needs confirm=true |
BUMBLEWICK_REFUND_RATE_LIMIT |
3 |
max refunds per customer per window |
BUMBLEWICK_REFUND_RATE_WINDOW_HOURS |
24 |
rate-limit window |
Project layout
src/bumblewick_support/
server.py # thin MCP layer: tools, resources, prompts
services.py # SupportDesk — all business logic (testable, no MCP)
safety.py # pure refund-policy engine
db.py # SQLite data access
models.py # pydantic domain models
seed.py # deterministic sample data
config.py # env-driven settings
tests/ # pytest: safety, services, and server smoke tests
The golden rule the series teaches: keep the business logic out of the MCP
layer. server.py only wires things up; everything worth testing lives in
services.py and safety.py, so it's testable without a client.
License
MIT.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。