Deck of Cards

live Games

Create, shuffle, and draw from virtual playing card decks via deckofcardsapi.com

3 tools
0ms auth
free tier 50 calls/day

Tools

new_deck

Create and shuffle a new deck (or multiple decks) of playing cards. Returns a deck_id for subsequent draws.

Parameters
Name Type Description
count opt number Number of standard 52-card decks to combine and shuffle. Defaults to 1.
Try it
draw_cards required: deck_id

Draw one or more cards from an existing deck. Requires the deck_id returned by new_deck.

Parameters
Name Type Description
deck_id req string The deck ID returned by new_deck (e.g. "3p40paa87x90").
count opt number Number of cards to draw. Defaults to 1.
Try it
shuffle_deck required: deck_id

Shuffle (or re-shuffle) an existing deck, returning all drawn cards back into it.

Parameters
Name Type Description
deck_id req string The deck ID to shuffle (e.g. "3p40paa87x90").
Try it

Test with curl

The gateway speaks JSON-RPC 2.0 over HTTP POST. You can test any pack directly from the terminal.

List available tools
bash
curl -X POST https://gateway.pipeworx.io/deckofcards/mcp \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'
Call a tool
bash
curl -X POST https://gateway.pipeworx.io/deckofcards/mcp \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"new_deck","arguments":{}}}'

Use with the SDK

Install @pipeworx/sdk to call tools from any TypeScript/Node project.

TypeScript
import { Pipeworx } from '@pipeworx/sdk';
const px = new Pipeworx();
const result = await px.call("new_deck", {});
ask_pipeworx
// Or ask in plain English:
const answer = await px.ask("create, shuffle, and draw from virtual playing card decks via deckofcardsapi");

Related packs

Other Pipeworx packs in the same categories (Games):