get_free_tier
Discover free tiers across AI tool categories including LLM APIs, coding assistants, and image generation. Compare and select the best free plan for your needs.
Instructions
Find the best free plans across AI tools, grouped by category (LLM APIs, coding assistants, image generation, etc.).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| category | No | Filter by category slug — e.g. "llm", "coding", "image", "video" |
Implementation Reference
- src/index.ts:47-51 (schema)FreeTierTool interface defining the shape of a free-tier tool object, used as the return type for get_free_tier's API call.
interface FreeTierTool { slug: string; name: string; category_slug: string; tier_name: string paidFrom: number | null limits: { limit_key: string; limit_value: string; limit_unit: string | null; notes: string | null }[] } - src/index.ts:285-325 (registration)Registration of the 'get_free_tier' tool on the MCP server via server.tool(), with Zod schema for optional 'category' filter.
server.tool( 'get_free_tier', 'Find the best free plans across AI tools, grouped by category (LLM APIs, coding assistants, image generation, etc.).', { category: z.string().optional().describe('Filter by category slug — e.g. "llm", "coding", "image", "video"'), }, async ({ category }) => { const data = await fetchJSON<{ by_category: Record<string, FreeTierTool[]>; total: number }>('/free-tiers') let grouped = data.by_category if (category) { const q = category.toLowerCase() grouped = Object.fromEntries( Object.entries(grouped).filter(([cat]) => cat.toLowerCase().includes(q)) ) } const entries = Object.entries(grouped).sort() if (!entries.length) { return { content: [{ type: 'text' as const, text: `No free tiers found${category ? ` for category "${category}"` : ''}.` }] } } const lines: string[] = [`Free plans across ${data.total} AI tools:\n`] for (const [cat, tools] of entries) { lines.push(`## ${cat}`) for (const t of tools) { const paid = t.paidFrom ? ` (paid from $${t.paidFrom}/mo)` : '' lines.push(`\n**${t.name}**${paid}`) for (const l of t.limits) { const unit = l.limit_unit ? ` ${l.limit_unit}` : '' const note = l.notes ? ` — ${l.notes}` : '' lines.push(` • ${l.limit_key}: ${l.limit_value}${unit}${note}`) } } lines.push('') } lines.push('Full free tier guide: https://tickerr.ai/free') return { content: [{ type: 'text' as const, text: lines.join('\n') }] } } ) - src/index.ts:291-325 (handler)Handler function for get_free_tier: fetches free tiers from tickerr.ai/free-tiers API, filters by optional category, formats output as text.
async ({ category }) => { const data = await fetchJSON<{ by_category: Record<string, FreeTierTool[]>; total: number }>('/free-tiers') let grouped = data.by_category if (category) { const q = category.toLowerCase() grouped = Object.fromEntries( Object.entries(grouped).filter(([cat]) => cat.toLowerCase().includes(q)) ) } const entries = Object.entries(grouped).sort() if (!entries.length) { return { content: [{ type: 'text' as const, text: `No free tiers found${category ? ` for category "${category}"` : ''}.` }] } } const lines: string[] = [`Free plans across ${data.total} AI tools:\n`] for (const [cat, tools] of entries) { lines.push(`## ${cat}`) for (const t of tools) { const paid = t.paidFrom ? ` (paid from $${t.paidFrom}/mo)` : '' lines.push(`\n**${t.name}**${paid}`) for (const l of t.limits) { const unit = l.limit_unit ? ` ${l.limit_unit}` : '' const note = l.notes ? ` — ${l.notes}` : '' lines.push(` • ${l.limit_key}: ${l.limit_value}${unit}${note}`) } } lines.push('') } lines.push('Full free tier guide: https://tickerr.ai/free') return { content: [{ type: 'text' as const, text: lines.join('\n') }] } } ) - src/index.ts:9-16 (helper)Generic fetchJSON helper used by get_free_tier handler to call the tickerr.ai API.
async function fetchJSON<T>(path: string): Promise<T> { const res = await fetch(`${BASE_URL}${path}`, { headers: { 'User-Agent': UA } }) if (!res.ok) { const text = await res.text().catch(() => '') throw new Error(`tickerr API ${res.status}: ${text.slice(0, 200)}`) } return res.json() as Promise<T> }