Skip to main content

MCP server for querying ecoflow LLM token usage and balance

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ecoflow_token_usage_mcp-0.1.0.tar.gz (75.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ecoflow_token_usage_mcp-0.1.0-py3-none-any.whl (6.5 kB view details)

Uploaded Python 3

File details

Details for the file ecoflow_token_usage_mcp-0.1.0.tar.gz.

File metadata

  • Download URL: ecoflow_token_usage_mcp-0.1.0.tar.gz
  • Upload date:
  • Size: 75.8 kB
  • Tags: Source
  • Uploaded using 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}

File hashes

Hashes for ecoflow_token_usage_mcp-0.1.0.tar.gz
Algorithm Hash digest
SHA256 cbfe2897d3132de0a59ad3212b7fb610f36a08ef625346e0ae840a20e21c08b5
MD5 1a657be7274d8e2869f89d490c6e00d0
BLAKE2b-256 102ac69d3a90defccf2ae877eb1709423bcdfb4b9d8619baa0fb05811bde527a

See more details on using hashes here.

File details

Details for the file ecoflow_token_usage_mcp-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: ecoflow_token_usage_mcp-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.5 kB
  • Tags: Python 3
  • Uploaded using 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}

File hashes

Hashes for ecoflow_token_usage_mcp-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6fc8d25f7f456f2ff9e4f9bef9dde5c8a513631e26872cabf3e51d3b9219fbab
MD5 9b90a23b85f3ba7325f08009be72b384
BLAKE2b-256 cf15a130fdac50440617acdcf700795bce1960e3f7cd27bedeef5169da9c043b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page