Model Context Protocol (MCP)
CostRail · Food Cost Calculator MCP Server
Standardized Model Context Protocol (MCP) interface allowing kitchen management agents, culinary LLMs, and restaurant automation bots to compute recipe plate costs, bar pour costs, and food-cost margins via streamable JSON-RPC 2.0.
Endpoint: POST /api/mcp · Manifest: /.well-known/mcp.json
Tool Schema (inputSchema)
cost_dish_or_pour
Calculate plate cost, pour cost, food-cost percentage, and suggested menu price from natural language or structured kitchen ingredients.
{
"type": "object",
"properties": {
"text": {
"type": "string",
"description": "Dish or pour description with pack prices and portion sizes"
}
},
"required": [
"text"
]
}
Sample JSON-RPC 2.0 tools/call Request
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "cost_dish_or_pour",
"arguments": {
"text": "House burger: 6 oz beef patty from $48 / 10 lb, brioche bun $0.75, cheddar slice from $22 / 160 slices, sauce $0.25, menu price $16.00, target 28%"
}
}
}
Sample JSON-RPC 2.0 tools/call Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"content": [
{
"type": "text",
"text": "{\n \"dish\": \"House burger\",\n \"plateCost\": 2.94,\n \"foodCostPercent\": 18.4,\n \"suggestedPrice\": 10.50,\n \"profit\": 13.06\n}"
}
]
}
}