margins-mcp

★ the killer beat

The oracle, as infrastructure. Any other AI agent in India can call MARGINS as a tool.

← home
endpoint
configure in your agent
// claude_desktop_config.json
{
  "mcpServers": {
    "margins": {
      "command": "npx",
      "args": ["-y", "margins-mcp"],
      "env": { "MARGINS_ENDPOINT": "https://margins-mcp.example.com/api/mcp" }
    }
  }
}
call it (live demo)
# Discover the oracle
$ curl https://margins-mcp.example.com/.well-known/mcp.json

# Call it from any agent (raw JSON-RPC)
$ curl -X POST https://margins-mcp.example.com/api/mcp \
    -H "Content-Type: application/json" \
    -d '{
      "jsonrpc": "2.0",
      "method": "tools/call",
      "params": {
        "name": "fair_price_band",
        "arguments": {
          "gtin": "8901058851649",
          "city": "Madurai",
          "quantity": 1
        }
      },
      "id": 1
    }'

# → { "band": { "low": 248, "median": 252, "high": 258 },
#      "verdict": "fair",
#      "sources": [...] }

What is this?

Model Context Protocol (MCP) is the open standard for tool-calling between AI agents. MARGINS exposes its fairness-oracle as an MCP server. The three tools it ships:

fair_price_band
Compute a fair-price band for any Indian product by GTIN + city. Returns verdict + sources.
place_beckn_order
Order the product through ONDC Beckn at the cheapest fair price. Real round-trip.
query_margins_ledger
Query a merchant's transaction history. "What did I sell last Tuesday?" answered in plain language.

This is the reframe: not a chatbot, not a buyer app, not a shopping assistant — infrastructure for the entire Indian commerce agent ecosystem.