quota-mcp
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
quota-mcp
把各家 AI 平台的额度查询做成 MCP 工具,接进 Claude Code、Cursor 这类客户端后,在对话里问一句「我的 AI 额度还剩多少」就能拿到汇总表。
An MCP server that reports your AI provider quotas — balance and usage ratio — inside any MCP client. Providers are described in a plain JSON config; API tokens live in separate files and never enter the config or the repo.
工具
工具 | 干什么 |
get_quota_summary | 全平台汇总表:占比型给已用 / 上限 / 剩余 / 占比,余额型给当前值;取数失败的平台标注原因,不影响其他平台 |
get_platform_detail | 单平台明细,参数支持名字部分匹配(如 deepseek、claude) |
Related MCP server: chatgpt-quota-mcp
安装
要求 Python 3.10 及以上。推荐用 uv,不必自己建虚拟环境:
uv run server.py --once # 跑一次看结果
uv run server.py # 以 MCP 服务端身份启动不用 uv 的话:
pip install -r requirements.txt
python server.py --once接入客户端
在项目的 .mcp.json 里加一段(路径换成你自己的):
{
"mcpServers": {
"quota-mcp": {
"command": "uv",
"args": ["run", "D:/path/to/quota-mcp/server.py"]
}
}
}接上后在对话里说「查一下我的 AI 额度」即可。
配置
配置文件查找顺序:环境变量 QUOTA_MCP_CONFIG > 本目录 config.json > 旁挂的 ../quota-panel/config.json。样例见 config.example.json。
字段 | 描述 | 大白话 |
request.url / method / where | 请求地址、方法、参数放哪里 | where 填 query 走查询串,填 body 走 JSON 体 |
request.headers / params | 每行一条「名字: 值」 | 值写 |
extract.used / limit | 取值表达式 | 如 |
display.kind / unit | 显示方式 | percent 给占比,amount 只给一个数(余额这种没有上限的用它) |
baseline / period | 周期增量换算 | 接口只返回历史累计总额时用;周期起点读同目录 |
令牌单独放在和配置同目录的文件里,配置里用 @文件名 引用:
quota-panel/
├── config.json
├── cache.json
└── deepseek.token # 里面只放一串令牌,不要换行以外的其他内容运行效果
示例输出(数值仅作演示):
平台 | 类型 | 已用 / 余额 | 上限 | 剩余 | 占比 |
示例平台 A | 占比 | ✅ 12.40$ | 50.00$ | 37.60$ | 24.8% |
示例平台 B | 余额 | ¥ 88.20 | - | - | - |
示例平台 C | - | ❌ key 不对或已过期 | - | - | - |
边界
只读
cache.json(周期基线),不写 —— 记账交给宿主程序,两边各记一套会算出两个数60 秒缓存:同一轮对话里连续追问共享一次取数,不会反复打平台接口
默认不走系统代理,需要时在平台配置里打开
use_system_proxy单个平台失败只影响它自己那一行,不中断整批查询
报错信息里的完整地址会被隐去,避免把查询串里的令牌带进对话
文件结构
quota-mcp/
├── server.py # 全部实现,单文件无构建步骤
├── config.example.json # 配置样例,令牌全部占位
├── requirements.txt # 不用 uv 时的依赖清单
├── .gitignore # 挡住 config.json 与 *.token
├── LICENSE
└── README.md许可证
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
Use AI models for chat, image, and video generation from Claude Code and other MCP hosts.
Connect MCP clients to 2,000+ AI models without managing provider API keys.
Read-only AI/LLM cost tools with current MCP discovery and attributable Registry transport.
A paid remote MCP for AI SDK eval dashboard, built to return verdicts, receipts, usage logs, and aud
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceSurface Claude Code token usage, estimated cost, and plan-limit status in any MCP client. Enables agents to query usage data from local logs and Anthropic API.MIT
- FlicenseAqualityDmaintenanceMCP server that exposes a single tool to retrieve ChatGPT/Codex quota via the signed-in Codex CLI, reporting rate-limit windows and usage percentages.1-
- AlicenseAqualityBmaintenanceEnables querying OpenCode Go subscription quota (rolling, weekly, and monthly usage) and Zen prepaid balance as MCP tools.211 npmMIT
- AlicenseNot gradedqualityAmaintenanceTracks AI subscription account usage and quota across StepFun and Command Code, exposing balances, expiry dates, and rate-limit windows to agents via read-only MCP tools and a REST management API.MIT