Number Utilities

To Roman

Converts integers to Roman numeral format with proper classical notation. Access via MCP in Cursor or Windsurf, or call GET /v1/number/roman directly. Pass any positive integer and get back accurate Roman numerals — 42 becomes "XLII", 1994 becomes "MCMXCIV". Supports numbers 1-3999 following standard Roman numeral rules.

API Endpoint

GET /v1/number/roman

Code Examples

curl "https://tinyfn.io/v1/number/roman" \
  -H "X-API-Key: YOUR_API_KEY"
const response = await fetch('https://tinyfn.io/v1/number/roman', {
  headers: { 'X-API-Key': 'YOUR_API_KEY' }
});
const data = await response.json();
console.log(data);
import requests

response = requests.get('https://tinyfn.io/v1/number/roman',
    headers={'X-API-Key': 'YOUR_API_KEY'})
data = response.json()
print(data)

Use via MCP

Add to your AI agent

Connect your AI agent (Claude, Cursor, Windsurf, etc.) to TinyFn's number tools:

{
  "mcpServers": {
    "tinyfn-number": {
      "url": "https://tinyfn.io/mcp/number",
      "headers": {
        "X-API-Key": "YOUR_API_KEY"
      }
    }
  }
}

Learn more about MCP setup →

FAQ

What's the valid range for Roman numeral conversion?

Supports integers from 1 to 3999. Roman numerals traditionally don't represent zero or negative numbers, and numbers above 3999 require extended notation not commonly used.

How do I convert numbers to Roman numerals in my MCP-enabled editor?

In Cursor or Claude Code, invoke the to_roman tool with your integer. The AI agent gets the exact Roman numeral without guessing — no more hallucinated "IIII" instead of "IV".

Does this follow subtractive notation rules correctly?

Yes, uses proper classical rules: IV (4), IX (9), XL (40), XC (90), CD (400), CM (900). No invalid combinations like IC or XM.

What happens if I pass an invalid number like 0 or 5000?

Returns an error for numbers outside the 1-3999 range. Roman numerals don't represent zero, and numbers above 3999 require special notation.

Can I batch convert multiple numbers at once?

Each API call handles one number. For batch processing, make multiple calls or use the MCP tool iteratively within your AI workflow.

Try To Roman Now

Get your free API key and start using To Roman in seconds.

Get Free API Key