Skip to main content

ecoflow-token-usage-mcp

MCP server for querying your personal token balance and usage on llmapi.ecoflow.com. Exposes a single tool, get_token_usage, that returns remaining and consumed tokens together with their RMB equivalents.

Install & configure

Once published to PyPI, point any MCP client at uvx:

{
  "mcpServers": {
    "ecoflow-token-usage": {
      "command": "uvx",
      "args": ["ecoflow-token-usage-mcp"],
      "env": {
        "ANTHROPIC_AUTH_TOKEN": "sk-..."
      }
    }
  }
}

If ANTHROPIC_AUTH_TOKEN is not set in env, the server falls back to ~/.claude/settings.json and reads .env.ANTHROPIC_AUTH_TOKEN (the same field Claude Code uses).

Tool

get_token_usage

No arguments. Returns a JSON string:

{
  "name": "bin.ling",
  "total_available_tokens": 12345678,
  "total_used_tokens": 9876543,
  "available_rmb": 167.92,
  "used_rmb": 134.32,
  "tokens_per_rmb": 73529
}

Local development

git clone <this-repo>
cd token-usage-mcp
uv sync
uv run pytest -v

Run the server directly for ad-hoc testing:

uv run ecoflow-token-usage-mcp

Build & publish

uv build                 # produces dist/*.whl and dist/*.tar.gz
uv publish               # uploads to PyPI (requires API token)
git tag v0.1.0 && git push --tags

License

MIT — see LICENSE.

Metadata

Release files for ecoflow-token-usage-mcp 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ecoflow-token-usage-mcp 0.1.0
File Size Uploaded
ecoflow_token_usage_mcp-0.1.0.tar.gz 75.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ecoflow-token-usage-mcp 0.1.0
File Interpreter ABI Platform
ecoflow_token_usage_mcp-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 82.3 kB

Release files / ecoflow_token_usage_mcp-0.1.0.tar.gz

Download URL ecoflow_token_usage_mcp-0.1.0.tar.gz
Size 75.8 kB
Tags Source
SHA-256 checksum
How to use checksums
cbfe2897d3132de0a59ad3212b7fb610f36a08ef625346e0ae840a20e21c08b5
BLAKE2b-256 checksum
How to use checksums
102ac69d3a90defccf2ae877eb1709423bcdfb4b9d8619baa0fb05811bde527a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / ecoflow_token_usage_mcp-0.1.0-py3-none-any.whl

Download URL ecoflow_token_usage_mcp-0.1.0-py3-none-any.whl
Size 6.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6fc8d25f7f456f2ff9e4f9bef9dde5c8a513631e26872cabf3e51d3b9219fbab
BLAKE2b-256 checksum
How to use checksums
cf15a130fdac50440617acdcf700795bce1960e3f7cd27bedeef5169da9c043b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page