Token Guardian MCP
Token Guardian MCP
Token Guardian은 Claude Code와 Codex가 토큰을 낭비하는 현상을 찾아내는 로컬 읽기 전용 MCP 서버로, 두 클라이언트의 성능을 저하시키지 않습니다.
두 가지 작업을 수행합니다:
어떤 에이전트, 모델, 세션이 가장 많은 토큰을 처리하고 있는지 보고합니다.
특정 작업에 대해 가장 저렴하면서도 안전한 모델과 노력 수준을 추천합니다.
또한 MCP가 등록되기 전에 프롬프트 우선 라우팅을 테스트하기 위한 건식 실행 route-task 명령어도 포함되어 있습니다.
엄격한 안전 경계
Token Guardian은 모델 설정, 노력 수준, 컨텍스트 제한, 압축, MCP 등록 또는 실행 중인 세션을 변경할 수 없습니다. 모델 자격 증명이 없으며 유료 API 호출을 하지 않습니다.
사용량 도구는 --offline 및 --no-cost 플래그와 함께 ccusage를 호출합니다. Codex 제목은 sqlite3 -readonly를 통해 읽는 선택적 메타데이터입니다. 모든 MCP 도구는 읽기 전용, 비파괴적, 멱등적, 폐쇄 세계로 표시되어 있습니다.
Related MCP server: token-pilot
도구
token_guardian_usage_snapshot
1일에서 30일 간의 로컬 사용량을 읽고 다음을 반환합니다:
에이전트 및 모델별 합계
캐시 읽기, 출력, 프론티어 모델 점유율
가장 큰 세션
정확히 중복된 Codex 작업 제목
증거 기반의 빠른 개선점
처리된 토큰은 워크로드 진단 지표입니다. 특히 캐시된 입력이 지배적인 경우 구독 측정기와 동일하지 않습니다.
token_guardian_recommend_route
클라이언트, 작업, 위험도 및 현재 컨텍스트 크기를 입력받습니다. 모델, 노력 수준, 이유 및 선택적 프론티어 검증기를 반환합니다.
정책은 안전 쪽으로 실패합니다. 보안, 아키텍처, 프로덕션, 파괴적, 고위험, 중요 또는 모호한 작업은 프론티어 모델에 남습니다. 저렴한 모델은 제한된 기계적 작업을 처리합니다. 균형 잡힌 모델은 필요 시 프론티어 검토와 함께 일반 코딩 및 디버깅을 처리합니다.
프롬프트 우선 라우팅 테스트
프로젝트를 빌드한 다음 모든 폴더에서 라우터를 실행하세요:
node ./dist/route-cli.js --client codex --prompt "Implement a bounded TypeScript parser with tests." --cwd .작업 폴더는 저장소일 필요가 없습니다. 라우터는 주로 프롬프트를 사용합니다. 현재 폴더에서 최대 256개의 이름을 확인하여 선택적 프로젝트 표시자를 찾지만, 파일 내용을 열거나 하위 폴더를 스캔하지는 않습니다.
이 명령어는 추천 사항과 세션 범위의 실행 명령어만 출력합니다. 해당 명령어를 실행하거나, 구성을 변경하거나, MCP를 등록하거나, 활성 세션을 건드리지 않습니다. yeah, test that와 같은 모호한 연속 프롬프트는 실제 컨텍스트가 누락되었기 때문에 프론티어 경로에 남습니다.
로컬 요구 사항
Node.js 24 이상
PATH에
ccusage선택적 Codex 스레드 제목을 위한 PATH의
sqlite3
빌드 및 테스트
npm install
npm test
npm run typecheck
npm run build빌드된 stdio 서버를 실행하세요:
node dist/index.js라이브 클라이언트에 등록하지 않고 검사하세요:
npx @modelcontextprotocol/inspector node dist/index.js등록 상태
이 첫 번째 빌드는 의도적으로 Claude, Codex 또는 공유 Kitsune 게이트웨이에 등록되지 않았습니다. 등록 및 모든 클라이언트 재시작은 격리된 서버가 승인된 후 별도의 변경 사항입니다.
라이선스
MIT. LICENSE 파일을 참조하세요.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseAqualityCmaintenanceAn MCP server that helps AI agents reduce token usage by compressing, summarizing, and managing conversation/context data more efficiently.11MIT
- AlicenseAqualityCmaintenanceMCP server that reduces token consumption in AI coding assistants by up to 90% via structural reads, PreToolUse hooks, and tp-\* subagents.254254MIT
- Alicense-qualityDmaintenanceMCP server that analyzes AI agent session logs to find token waste and optimization opportunities.17MIT
- Flicense-qualityDmaintenanceAn MCP server that reduces token usage by lazily loading skills and tools only when needed, and routing repetitive subtasks to ML backends instead of the LLM.
Related MCP Connectors
Hosted MCP server for LLM cost estimation, model comparison, and budget-aware routing.
Agent Cost Allocator MCP — multi-tenant LLM cost attribution for chargeback billing. Companion to
Agent Token Budget MCP — hard per-session token + spend cap with signed budget-exhausted
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/KitsuneTech1/token-guardian-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server