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
| Name | Type | Description |
|---|---|---|
n required | integer | Number of items, 0–5000. |
r | integer | Number chosen. Needed for everything except factorial. |
kind | all | factorial | combinations | permutations | multiset | Default "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:
{
"name": "math__combinatorics",
"arguments": {
"n": 0
}
}Or connect the Calculators server directly, which lists 28 tools including this one:
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 ….