ai-cost-optimizer
Cloudflare Workers MCP server: ai-cost-optimizer
사용해야 할까요
품질 및 안전성
A
도구 정의와 프로토콜 준수에 대한 자동 분석을 기반으로 합니다.
컨텍스트 비용
~584토큰 (도구 정의)
~1.1 KB일반적인 응답 크기
최소한의 주의 영향 (128k 컨텍스트의 0.46%)
이는 서버의 도구가 모델의 컨텍스트에 로드될 때마다 소비되는 대략적인 토큰 수입니다. 수치가 높을수록 다른 작업에 사용할 수 있는 주의가 줄어듭니다.
설치
원클릭 설치
`claude_desktop_config.json` 파일에 다음을 추가하세요:
{
"mcpServers": {
"ai-cost-optimizer": {
"url": "https://api.lazy-mac.com/ai-cost-optimizer/mcp"
}
}
}원격 엔드포인트
https://api.lazy-mac.com/ai-cost-optimizer/mcpstreamable-http할 수 있는 일
도구 목록
도구 (5)
🟢 읽기 전용🟡 쓰기🔴 삭제⚪ 알 수 없음
🟢cost_tracker(action, model, inputTokens, outputTokens, team, ...)
Record and retrieve AI API call costs by team. Persists to Cloudflare KV — survives cold starts and scale-out.
입력 스키마
{
"type": "object",
"properties": {
"action": {
"type": "string",
"enum": [
"record",
"get"
],
"description": "\"record\" to log a call, \"get\" to retrieve recent records"
},
"model": {
"type": "string",
"description": "Model ID (e.g., claude-3-5-sonnet-20241022, gpt-4o, gemini-2.0-flash)"
},
"inputTokens": {
"type": "number",
"description": "Number of input/prompt tokens consumed"
},
"outputTokens": {
"type": "number",
"description": "Number of output/completion tokens generated"
},
"team": {
"type": "string",
"description": "Team or project identifier (default: \"default\")"
},
"metadata": {
"type": "object",
"description": "Optional key-value metadata (request ID, user, feature flag, etc.)"
}
},
"required": [
"action"
]
}🟢token_calculator(model, inputTokens, outputTokens)
Calculate cost from token counts for any supported AI model. Stateless — no KV required.
입력 스키마
{
"type": "object",
"properties": {
"model": {
"type": "string",
"description": "Model ID to price"
},
"inputTokens": {
"type": "number",
"description": "Input token count"
},
"outputTokens": {
"type": "number",
"description": "Output token count"
}
},
"required": [
"model",
"inputTokens",
"outputTokens"
]
}🟡budget_alert(action, team, budgetLimit, threshold)
Set and check budget limits for teams. Raises a flag when a configurable spending threshold is reached.
입력 스키마
{
"type": "object",
"properties": {
"action": {
"type": "string",
"enum": [
"set",
"check"
],
"description": "\"set\" to configure a budget, \"check\" to get current status"
},
"team": {
"type": "string",
"description": "Team identifier"
},
"budgetLimit": {
"type": "number",
"description": "USD budget cap"
},
"threshold": {
"type": "number",
"description": "Alert threshold percentage 0–100 (default: 80)"
}
},
"required": [
"action"
]
}🟢model_breakdown(team, days)
Analyze costs broken down by model for a given team over a configurable time window.
입력 스키마
{
"type": "object",
"properties": {
"team": {
"type": "string",
"description": "Team identifier"
},
"days": {
"type": "number",
"description": "Lookback window in days (default: 30)"
}
}
}⚪cost_forecast(team, forecastDays, historicalDays)
Forecast future AI spend based on historical usage patterns using daily-average linear projection.
입력 스키마
{
"type": "object",
"properties": {
"team": {
"type": "string",
"description": "Team identifier"
},
"forecastDays": {
"type": "number",
"description": "Days to project ahead (default: 7)"
},
"historicalDays": {
"type": "number",
"description": "Days of history to base the forecast on (default: 30)"
}
}
}커뮤니티
증거
최근 관측
검증됨버전이 기록되지 않음도구 5개
검증됨버전이 기록되지 않음도구 5개