cafe-shop-mcp-agent
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@cafe-shop-mcp-agentWhat's on the menu today?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Cafe Shop MCP Agent - Exhaustive Documentation
System Overview
The Cafe Shop MCP Agent ("Bean & Brew") is an advanced implementation of the Model Context Protocol (MCP) ecosystem. It consists of two standalone services that communicate securely using the MCP streamable-http transport protocol.
The system uses a LangChain-based ReAct agent running on AWS Bedrock to process natural language coffee shop requests, querying live inventory and executing orders against a PostgreSQL database through the MCP server.
Related MCP server: @striderlabs/mcp-starbucks
1. Architecture Deep-Dive
1.1 The Client Interface (client/)
The Client acts as the user-facing API and the LangChain Agent execution environment.
Framework: FastAPI
Agent Orchestrator: LangGraph + LangChain (
create_agent)LLM Engine: AWS Bedrock (
ChatBedrock)Persistence: LangGraph AsyncPostgresSaver (Checkpointer) for thread-level memory.
Middleware Integration:
SummarizationMiddleware: Compresses history beyond 2000 tokens or 10 messages.PIIMiddleware: Redacts emails, masks credit cards, and redacts phone numbers before sending to Bedrock.HumanInTheLoopMiddleware: Intercepts theadd_ordertool call for explicit human approval before execution.
1.2 The MCP Server (mcp_server/)
The Server exposes domain logic and data boundaries securely.
Framework: FastMCP (
mcp.server.fastmcp)Database: PostgreSQL (managed via SQLAlchemy ORM).
Transport: HTTP SSE (
streamable-http).
2. API Contract & Data Flow
2.1 Chat Endpoint (Client)
POST /api/v1/chat
Request Payload (ChatRequest):
{
"message": "I'd like to order 2 Cappuccinos please.",
"mode": "normal",
"stream": false,
"thread_id": "user-session-id"
}Note: mode can be normal, structured, or left empty. stream dictates whether response is SSE or synchronous JSON.
Response Payload (ChatResponse - Normal Mode):
{
"message": "I have set up your order for 2 Cappuccinos. Before I finalize it, do you approve?",
"structured_output": null,
"stream_chunks": null,
"pending_approval": {
"tool": "add_order",
"args": {"customer_name": "Guest", "items": [{"item_name": "Cappuccino", "quantity": 2}]},
"description": "Tool add_order requires approval."
}
}(If pending_approval is present, the next request's message must be exactly "approve" or "reject" with the same thread_id).
2.2 Database Schema (MCP Server)
The PostgreSQL database consists of 4 main tables:
menu_items:menu_item_id(PK),name(unique),price(Numeric),stock_quantity(int),is_active(bool).orders:order_id(UUID PK),order_sequence_id(BigInt Seq),customer_name(str),status(str).order_items: Junction table linkingordersandmenu_itemswith aquantitycolumn.error_logs:log_id,error_code,message,source.
3. Model Context Protocol (MCP) Bindings
The FastMCP server explicitly registers the following components. The Client loads these unconditionally during session initialization (load_session_context).
3.1 Tools (@mcp.tool())
Tool Name | Arguments | Returns | Description |
| None |
| Fetches active menu items ( |
|
|
| Returns order status ( |
|
|
| Places order, generates sequence ID, and reduces inventory |
3.2 Prompts (@mcp.prompt())
brew_buddy_system: The primary ReAct agent instructions formatting role, objectives, constraints, and output format (using XML tags<role>,<instructions>).order_confirmation(customer_name, items): Generates a warm, formatted confirmation receipt.
3.3 Resources (@mcp.resource())
menu://items: Read-only text dump of the live menu and prices.store://info: Static string containing store hours, location, and contact policies.
4. Setup and Execution Steps
4.1 Prerequisites
PostgreSQL running locally or via Docker.
AWS Bedrock access (AWS credentials configured).
Python 3.11+ and
uvpackage manager.
4.2 Start the MCP Server
Navigate to mcp_server/, update your .env with DB_HOST, DB_USER, DB_PASS, etc., and run:
uv sync
python main.pyThis automatically triggers database migrations (create_tables.py) and seeds the default coffee menu, starting FastMCP on port 8000.
4.3 Start the Client API
Navigate to client/, update your .env with AWS and MCP Server credentials (MCP_SERVER_URL=http://localhost:8000), and run:
uv sync
python main.pyThis starts the user-facing FastAPI application on port 8080.
4.4 Example Workflow
User asks for menu:
POST /api/v1/chat-> Agent readsmenu://itemsresource.User places order:
POST /api/v1/chat-> Agent callsadd_order. HITL middleware interrupts and returnspending_approval.User approves:
POST /api/v1/chat(message: "approve", same thread_id) -> Client resumes LangGraph checkpointer state -> Tool executes on MCP Server -> DB stock reduced.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Let AI agents query data and act across all your business apps via MCP.
Hosted MCP for e-commerce: live product catalog, stock, and pricing for AI agents.
Connect e-commerce and marketing data to AI assistants via MCP.
Related MCP Servers
- FlicenseBqualityCmaintenanceAn MCP adapter that maps Coffee Company B2B HTTP APIs to MCP tools, allowing AI agents to query member information, benefits, coupons, and payment statuses. It enables seamless integration for AI assistants to manage coffee-related customer assets and loyalty details through natural language.101
- AlicenseAqualityDmaintenanceMCP server for Starbucks — let AI agents search the menu, customize drinks, find stores, place mobile pickup orders, and manage Starbucks Rewards.16141MIT
- AlicenseNot gradedqualityCmaintenanceEnables cataloging and managing personal inventory (items, attachments) through natural language, allowing users to add, search, update, and retrieve item details and attachments via MCP tools.1MIT
- FlicenseNot gradedqualityBmaintenanceEnables coffee shop order management via MCP, including menu lookup, order creation, and status tracking.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/rizhwan05/cafe-shop-mcp-agent'
If you have feedback or need assistance with the MCP directory API, please join our Discord server