Skip to main content
Glama

furniture-mcp-proof

A remote MCP server over a mock furniture catalog, running on Cloudflare Workers with OAuth sign-in. An interior designer asks an AI assistant for "a walnut sideboard under 180 cm wide for under $4,000"; the model searches the catalog, opens the pieces it likes and saves them to a project with a cost summary.

Endpoint (Streamable HTTP): https://furniture-mcp-proof.guille-mustafa.workers.dev/mcp

What is simulated

  • The catalog. 50 invented pieces (sideboards, dining and coffee tables, dining and lounge chairs) with fictional makers, prices, stock and placeholder images. It lives in the Worker as data (src/catalog.ts).

  • The sign-in screen. It is a demo login, not an identity provider: it accepts any email, checks no password and sends no email. The address only keeps each person's saved projects apart.

The OAuth layer around that screen is real: dynamic client registration, authorization code with PKCE, and access tokens bound to the /mcp resource (workers-oauth-provider).

Related MCP server: Agentic Retail MCP System

Connect it

  • Claude (where custom connectors are available): Settings → Connectors → Add custom connector → paste the endpoint URL → Connect, then sign in with any email on the demo screen.

  • MCP Inspector: npx @modelcontextprotocol/inspector, transport "Streamable HTTP", the endpoint URL, then run the OAuth flow from the Auth settings.

Tools

Tool

What it does

search_pieces

Structured filters: category, material, max width/depth/height in cm, max price, in stock, showroom. Cheapest first, one compact row per piece, cursor pagination. With zero results it says which single filter to relax and to what value.

get_piece

Full specs, description and image URLs for one piece.

save_to_project

Saves one or more pieces (with quantity and note) to a named project of the signed-in user. Saving the same input twice gives the same result.

list_project

One project with current prices and stock, or the list of the user's projects.

project_cost_summary

Subtotal at current prices, split by category and by showroom, plus stock problems.

Design choices:

  • The tools follow the designer's flow (find → inspect → shortlist → cost), not the shape of a catalog API.

  • Categories, materials and showrooms are enums, so the model cannot invent a value. Size and price limits are inclusive, and the schema tells the model to convert inches to centimeters.

  • A pagination cursor is bound to the filters that produced it; reusing it with other filters returns a tool error that says what to do.

  • Each result has a compact text for the model and structuredContent for clients that render it.

  • Read-only tools carry readOnlyHint; save_to_project carries idempotentHint.

  • Projects live in one SQLite-backed Durable Object per user. The user id comes from the OAuth token, never from tool arguments, and a Durable Object handles one request at a time, so parallel tool calls do not overwrite each other.

  • Consent uses the provider's one-time consent handle bound to a cookie. Two changes from the upstream template: its Reject button completed the authorization anyway, and its default path signed everyone in as the same hard-coded user.

Tests

npm install
npm test        # 22 tests: filtering, pagination, zero-result advice, tools over Streamable HTTP, per-user isolation
npm run type-check
node scripts/e2e-live.mjs https://<your-worker>.workers.dev   # OAuth + tool calls against a deployment

The live script registers a client, checks that Deny returns access_denied, that a consent handle works once and that a wrong PKCE verifier is refused, then signs in two users and checks that the second one cannot see the first one's project.

Deploy your own

npx wrangler kv namespace create OAUTH_KV   # put the id in wrangler.jsonc
# set vars.MCP_RESOURCE in wrangler.jsonc to https://<your-worker>.workers.dev/mcp
npx wrangler deploy

Credits

Started from Cloudflare's remote-mcp-server demo (MIT). Built with Claude Code. MIT license.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers