{"id":51224806,"url":"https://github.com/saagpatel/cost-tracker","last_synced_at":"2026-06-28T10:03:12.811Z","repository":{"id":365885272,"uuid":"1242282484","full_name":"saagpatel/cost-tracker","owner":"saagpatel","description":"MCP server exposing Claude Code session cost data via ccusage CLI and bridge-db cost_records","archived":false,"fork":false,"pushed_at":"2026-06-19T09:38:23.000Z","size":117,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-19T11:17:33.471Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/saagpatel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-05-18T09:33:33.000Z","updated_at":"2026-06-19T09:38:03.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/saagpatel/cost-tracker","commit_stats":null,"previous_names":["saagpatel/cost-tracker"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/saagpatel/cost-tracker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saagpatel%2Fcost-tracker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saagpatel%2Fcost-tracker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saagpatel%2Fcost-tracker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saagpatel%2Fcost-tracker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/saagpatel","download_url":"https://codeload.github.com/saagpatel/cost-tracker/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saagpatel%2Fcost-tracker/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34884278,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-28T02:00:05.809Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-06-28T10:03:12.093Z","updated_at":"2026-06-28T10:03:12.803Z","avatar_url":"https://github.com/saagpatel.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cost-tracker\n\n`cost-tracker` is a local Python 3.12 MCP server for live in-session cost\nvisibility. It is intentionally small: parse local usage data, apply threshold\nlogic, optionally read bridge-db context, and expose the result over stdio via\nthe `cost-tracker` entrypoint.\n\n## Current State\n\nCurrent portfolio truth should be checked in\n`/Users/d/Projects/GithubRepoAuditor/output/portfolio-truth-latest.json`; recent\nruns mark this repo as `active-infra`. The repo still has minimum-viable\ncontext, so treat `AGENTS.md`, `pyproject.toml`, and the live source tree as the\nrestart authority until a deeper roadmap or handoff exists.\n\n## Setup\n\n```bash\nuv sync --group dev\n```\n\n## Run\n\n```bash\nuv run cost-tracker\n```\n\n## MCP Tools\n\nRead-only visibility tools:\n\n- `cost_today` - today's Claude Code spend from live `ccusage`\n- `cost_session` - most-recent active session/workflow spend\n- `cost_monthly_trend` - recent monthly Claude Code trend\n- `cost_month_to_date` - current month-to-date Claude Code actuals\n- `cost_top_days` - highest-spend recent days\n- `cost_top_sessions` - high-cost workflow/session groups with attribution caveats\n- `cost_bridge_staleness` - live-vs-persisted bridge-db delta check\n- `cost_top_projects` - bridge-db cost records grouped by project\n- `cost_alert_thresholds_check` - today's spend against local thresholds\n\nWrite-capable manual tool:\n\n- `cost_record` - inserts one cost row into bridge-db `cost_records`\n\n`cost-oracle` remains the report-only monthly automation under\n`/Users/d/.codex/automations/cost-oracle/automation.toml`. This MCP server is a\nlocal visibility/helper surface, not the scheduled cost-report authority.\n\n## Verify\n\n```bash\nuv run pytest\nuv run ruff check .\n```\n\n## Key Files\n\n- `src/cost_tracker/server.py` - MCP server surface\n- `src/cost_tracker/ccusage.py` - usage parsing\n- `src/cost_tracker/thresholds.py` - threshold logic\n- `src/cost_tracker/bridge_db.py` - bridge-db integration helper\n\nKeep changes local, inspectable, and focused on cost visibility.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaagpatel%2Fcost-tracker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsaagpatel%2Fcost-tracker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaagpatel%2Fcost-tracker/lists"}