Skip to content

Expose provider usage limits to agents through an MCP tool #39185

Closed as not planned

Description

@harschware

Summary

T3 Code already fetches subscription usage for each provider and shows it in Usage → Limits. For Claude it calls api/oauth/usage with the Claude Code login token (apps/server/src/usage/cliproxyApi.ts), and similar code covers Codex and other providers. None of this is available through the T3 MCP tools, so an agent running inside T3 can't check how much quota is left.

Request

Add a read-only MCP tool, for example t3_usage_read, that returns the usage data T3 already collects, for each provider and account:

Why

  • Budget-aware long runs. Agents could pace or pause multi-hour work on their own, for example to stop at a given share of the weekly allowance, instead of the user running /usage and pasting in the result.
  • Fewer API calls. Coordinators could read T3's cached snapshot instead of each agent calling the provider separately.
  • Delegation choices. delegate_task could pick a provider that has quota left.

Notes

  • It returns only numbers T3 already shows; it never exposes tokens or credentials.
  • It can return T3's cached reading, so agent polling doesn't add calls to the provider.

Activity

  1. juliusmarminge commented on Nov 19, 2026

    @juliusmarminge
    Member

    Thanks for writing this up. It asks for new behaviour rather than reporting a defect, so it does not belong in the bug tracker and I'm closing it as not planned here. Feature ideas are discussed in Discussions: please post it there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions