Home / Servers / Calculators / number_base_convert

Number base convert

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

Convert a whole number of any size between bases 2 to 36 (binary, octal, decimal, hex and more). Accepts 0x, 0b, 0o prefixes and negative numbers.

Name on the gateway: math__number_base_convert · read-only.

Parameters

NameTypeDescription
value requiredstringThe number as text, e.g. "255", "0xff", "11111111".
from_baseintegerBase of the input, 2–36. Default 10 (or inferred from a 0x/0b/0o prefix).
to_baseintegerBase to convert to, 2–36. Default 16.

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__number_base_convert",
  "arguments": {
    "value": "…"
  }
}

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 number base convert tool with value set to ….

More from Calculators