Enterprise-grade FizzBuzz implementation that returns the classic sequence where multiples of 3 become "Fizz", multiples of 5 become "Buzz", and multiples of 15 become "FizzBuzz". Access via MCP in Cursor or Windsurf for code generation exercises, or call GET /v1/misc/fizzbuzz directly. Perfect for interview prep, code katas, or when you need deterministic FizzBuzz output without rolling your own logic.
curl "https://tinyfn.io/v1/misc/fizzbuzz" \
-H "X-API-Key: YOUR_API_KEY"
const response = await fetch('https://tinyfn.io/v1/misc/fizzbuzz', {
headers: { 'X-API-Key': 'YOUR_API_KEY' }
});
const data = await response.json();
console.log(data);
import requests
response = requests.get('https://tinyfn.io/v1/misc/fizzbuzz',
headers={'X-API-Key': 'YOUR_API_KEY'})
data = response.json()
print(data)
Connect your AI agent (Claude, Cursor, Windsurf, etc.) to TinyFn's miscellaneous tools:
{
"mcpServers": {
"tinyfn-misc": {
"url": "https://tinyfn.io/mcp/misc",
"headers": {
"X-API-Key": "YOUR_API_KEY"
}
}
}
}
Pass the count parameter to specify how many numbers to generate. The API returns an array with proper Fizz/Buzz/FizzBuzz substitutions for the classic rules.
Yes, it's available as an MCP tool in Cursor, Claude Code, Windsurf, and other supported editors for generating FizzBuzz examples during coding interviews or practice sessions.
It handles edge cases, provides consistent output formatting, and offers reliable REST API access with proper error handling—no need to debug basic modulo logic.
This implementation follows the classic FizzBuzz rules (3→Fizz, 5→Buzz, 15→FizzBuzz). For custom divisor rules, you'd need a different tool or custom implementation.
Returns a JSON array containing the sequence with numbers as integers and replacements as strings ("Fizz", "Buzz", "FizzBuzz") in proper order.