Repository avatar
AI Tools
v1.0.0
active

costrail

com.food-cost-calculator/costrail

Recipe food cost, butcher trim yield, and beverage pour cost calculations via Remote MCP.

Documentation

CostRail Food Cost Calculator MCP Server (com.food-cost-calculator/costrail)

Hosted Streamable HTTP Model Context Protocol (MCP) server for restaurant recipe food costing, butcher trim yield calculations, and bar pour cost math.


Quickstart: Connect in Your MCP Client

The public cost_dish_or_pour tool works over HTTPS with no API key or account required.

1. Cursor

Copy .cursor/mcp.json into your project's .cursor/mcp.json (or ~/.cursor/mcp.json globally):

{
  "mcpServers": {
    "costrail": {
      "type": "http",
      "url": "https://www.food-cost-calculator.com/api/mcp"
    }
  }
}

2. Claude Code

Add the remote Streamable HTTP server directly from your terminal:

claude mcp add --transport http costrail https://www.food-cost-calculator.com/api/mcp

3. Claude Desktop

  • Option A (Connectors UI): Open Settings → Connectors → Add custom connector and enter https://www.food-cost-calculator.com/api/mcp.
  • Option B (claude_desktop_config.json): Use claude_desktop_config.json with mcp-remote:
{
  "mcpServers": {
    "costrail": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "https://www.food-cost-calculator.com/api/mcp"
      ]
    }
  }
}

4. Windsurf

Add CostRail to ~/.codeium/windsurf/mcp_config.json:

{
  "mcpServers": {
    "costrail": {
      "serverUrl": "https://www.food-cost-calculator.com/api/mcp"
    }
  }
}

5. Antigravity

In Antigravity's mcp_config.json, register the remote Streamable HTTP endpoint:

{
  "mcpServers": {
    "costrail": {
      "serverUrl": "https://www.food-cost-calculator.com/api/mcp"
    }
  }
}

Available MCP Tool

cost_dish_or_pour

Calculate plate cost, pour cost, food-cost percentage, and suggested menu price from natural language or structured ingredient descriptions.

  • Input Schema:
    {
      "type": "object",
      "properties": {
        "text": {
          "type": "string",
          "description": "Dish or pour description with pack prices and portion sizes"
        }
      },
      "required": ["text"]
    }
    
  • Example tools/call Payload (Dish):
    {
      "jsonrpc": "2.0",
      "id": 1,
      "method": "tools/call",
      "params": {
        "name": "cost_dish_or_pour",
        "arguments": {
          "text": "House burger plate cost"
        }
      }
    }
    
  • Example tools/call Payload (Pour):
    {
      "jsonrpc": "2.0",
      "id": 2,
      "method": "tools/call",
      "params": {
        "name": "cost_dish_or_pour",
        "arguments": {
          "text": "1.5 oz vodka pour cost"
        }
      }
    }
    

Discovery & Verification Endpoints

EndpointPurpose
https://www.food-cost-calculator.com/api/mcpStreamable HTTP JSON-RPC 2.0 MCP endpoint (POST for initialize, tools/list, tools/call; GET returns server summary & tools).
https://www.food-cost-calculator.com/.well-known/mcp.jsonMachine-readable MCP server manifest (protocolVersion: "2025-03-26", version 1.0.0, repository link).
https://www.food-cost-calculator.com/.well-known/mcp-registry-authEd25519 domain ownership proof (v=MCPv1; k=ed25519; ...) for the Official MCP Registry.
https://www.food-cost-calculator.com/.well-known/agent-card.jsonAgent-to-Agent (A2A) discovery card describing cost_dish_or_pour.
https://www.food-cost-calculator.com/llms.txtConcise llms.txt directory covering CostRail calculators, /kitchen, pricing, and WebMCP context.
https://www.food-cost-calculator.com/mcpWeb reference page with JSON-RPC 2.0 schemas and example payloads.

Web Calculators & Pricing


Verify Live with curl

Run the included smoke-test script (no token required):

chmod +x ./examples/verify-mcp.sh
./examples/verify-mcp.sh

Direct curl example:

curl -sS -X POST https://www.food-cost-calculator.com/api/mcp \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "tools/call",
    "params": {
      "name": "cost_dish_or_pour",
      "arguments": { "text": "House burger plate cost" }
    }
  }'

Repository Contents


Publisher, Support & Policies

No installation packages available.