Skip to content

MCP - usage tracking#12397

Merged
24 commits merged intomainfrom
litellm_mcp_demo
Jul 9, 2025
Merged

MCP - usage tracking#12397
24 commits merged intomainfrom
litellm_mcp_demo

Conversation

@ghost
Copy link

@ghost ghost commented Jul 8, 2025

  • fix(common_daily_activity.py): initial commit with working mock BE endpoint for mcp usage

  • feat(ui/): show mcp server activity on UI

allows admin to know which mcp's are being used

  • feat(common_daily_activity.py): return activity by key

  • feat(ui/): show top api keys for a given model / mcp server

allow user to know which key is driving spend

  • fix(common_daily_activity.py): use known mcp server names

  • feat(server.py): log the namespaced tool name (includes server prefix)

allow accurate cost tracking

  • feat(db_spend_update_writer.py): log by mcp_namespaced_tool_name

store aggregate daily activity by mcp_namespaced_tool_name

Enables cost / usage tracking by mcp tool name

  • fix(server.py): add key/user metadata to mcp calls

  • refactor(common_daily_activity.py): update to return mcp activity in API

  • fix(common_daily_activity.py): handle empty key

  • fix(common_daily_activity.py): track when api key is empty

  • test(test_spend_management_endpoints.py): update tests

  • fix: fix ui linting error

  • fix: fix linting errors

  • test: add missing key

  • build(schema.prisma): add mcp tool tracking

  • fix(migration.sql): add schema migration file

  • feat(server.py): add request logging for mcp calls

enables storing the mcp calls

  • fix(new_usage.tsx): fix linting errors

  • fix: fix code qa errors

  • fix(activity_metrics.tsx): fix ui linting errors post-merge

  • fix(types/utils.py): fix linting error

  • fix(server.py): always have name

@vercel
Copy link

vercel bot commented Jul 8, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
litellm ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 9, 2025 4:44am

@ghost ghost merged commit c4af2eb into main Jul 9, 2025
36 of 46 checks passed
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants