{"service":"ai-spend-tracker MCP","protocol":"JSON-RPC 2.0","endpoint":"POST https://api.lazy-mac.com/ai-spend/mcp","auth":"Pass X-API-Key header with tools/call requests. tools/list and initialize are public.","methods":["initialize","notifications/initialized","tools/list","tools/call"],"tools":[{"name":"log_ai_usage","description":"Log a single AI API call to track spending. Records provider, model, token counts, and automatically calculates cost based on current pricing. Essential for building your spending history."},{"name":"batch_log_ai_usage","description":"Bulk import multiple AI API call records at once. Ideal for importing historical usage data or logging batches of calls from a pipeline. Each entry follows the same format as log_ai_usage."},{"name":"get_spend_dashboard","description":"Get a comprehensive spending dashboard showing total spend, breakdown by provider, by model, and daily trends. Your central view of AI costs across all providers."},{"name":"get_ai_budget","description":"Check your current monthly AI spending budget, how much you've spent, how much remains, and whether you're approaching the alert threshold."},{"name":"set_ai_budget","description":"Set a monthly spending budget for AI API costs. Configure the dollar limit and alert threshold percentage. Get warned before you overspend."},{"name":"compare_model_cost","description":"Compare costs between two AI models using your actual usage data. Answer questions like 'How much would I save switching from gpt-4o to claude-sonnet-4?' based on real token volumes."},{"name":"forecast_ai_spend","description":"Forecast your total AI spending for the current month based on usage trends so far. Includes budget overage prediction if a budget is set."},{"name":"optimize_ai_spend","description":"Get personalized cost optimization recommendations. Analyzes your actual usage patterns and suggests cheaper alternative models that could handle the same workload, ranked by potential savings."},{"name":"export_ai_usage","description":"Export your AI usage data as JSON or CSV for analysis in spreadsheets, dashboards, or billing systems. Filter by month."},{"name":"list_ai_models","description":"List all supported AI models with current per-token pricing. Covers OpenAI, Anthropic, Google, Meta, Mistral, and DeepSeek."}],"quickstart":{"step1_init":{"jsonrpc":"2.0","method":"initialize","id":1,"params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"my-app","version":"1.0"}}},"step2_list_tools":{"jsonrpc":"2.0","method":"tools/list","id":2},"step3_call_example":{"jsonrpc":"2.0","method":"tools/call","id":3,"params":{"name":"list_ai_models","arguments":{}}},"step4_log_usage":{"jsonrpc":"2.0","method":"tools/call","id":4,"params":{"name":"log_ai_usage","arguments":{"model":"gpt-4o","input_tokens":500,"output_tokens":200}}}}}