Bumblewick Support-Desk MCP Server

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.

Category
Visit Server

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 context
  • bumblewick://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:

  1. Only shipped/delivered orders are refundable.
  2. Never more than the remaining refundable balance (no over-refunds).
  3. Amounts over the auto-approve limit return needs_confirmation and do not execute until you re-call with confirm=true (human-in-the-loop).
  4. A per-customer rate limit caps refunds within a rolling window.
  5. 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).
  6. The check-and-write runs in one atomic transaction (BEGIN IMMEDIATE), so two concurrent refunds can't both slip past the balance check.
  7. 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.

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
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
E2B

E2B

Using MCP to run code via e2b.

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