Cribbage tools for websites and AI assistants
Score URLs
Use /score/{four-hand-cards}/{cut}, with hyphens between hand cards. Ranks: A, 2–9, T, J, Q, K; suits: C, D, H, S. Add ?crib=1 for a crib. Cards normalize by rank then C, D, H, S. Lowercase, commas and 10 are also accepted.
JSON API
GET /api/score?hand=5H,5C,5S,JD&cut=5D returns the total, category summary, every scoring combination, canonicalUrl and source. The API allows cross-origin requests and reports invalid hands with HTTP 400.
GET /api/discard?cards=5H,5C,5S,JD,9C,KH&crib=mine compares 15 keeps. Use crib=theirs for the opponent’s crib.
MCP
Connect a Streamable HTTP client to https://cribbagecalculator.com/mcp. Public, no authentication. Tools: score_hand(hand, cut, crib) and best_discard(six_cards, crib_owner). Supply card arrays; crib_owner is mine or theirs. Results include canonical source links.
Embed the calculator
Paste either snippet into your website. Calculation runs in the browser.
<iframe src="https://cribbagecalculator.com/embed/" title="Cribbage calculator" width="100%" height="650" loading="lazy"></iframe><script src="https://cribbagecalculator.com/embed.js" async></script>Please retain the “Powered by CribbageCalculator.com” link.
Availability
The interactive tools and guides run on static hosting. Arbitrary score URLs, discard result URLs, JSON, community comparisons and MCP require the Node service.