Home / Servers / Calculators / combinatorics

Combinatorics

An MCP tool from the Calculators server, hosted on mcp.hjlabs.in.

Exact factorial, combinations nCr, permutations nPr, and combinations with repetition, for n up to 5000 (BigInt, no rounding).

Name on the gateway: math__combinatorics · read-only.

Parameters

NameTypeDescription
n requiredintegerNumber of items, 0–5000.
rintegerNumber chosen. Needed for everything except factorial.
kindall | factorial | combinations | permutations | multisetDefault "all".

How to call it

Through the Smart Gateway, any client can run it by name with call_tool, or let the gateway find it with search_tools:

call_tool arguments
{
  "name": "math__combinatorics",
  "arguments": {
    "n": 0
  }
}

Or connect the Calculators server directly, which lists 28 tools including this one:

Run in your terminal
claude mcp add --transport http hj-math https://mcp.hjlabs.in/mcp/math \
  --header "Authorization: Bearer YOUR_API_KEY"

Try asking

Use the combinatorics tool with n set to ….

More from Calculators