mc3000-mcp
MCP server for monitoring and controlling SKYRC MC3000 battery chargers over Bluetooth Low Energy.
README
mc3000-mcp
<!-- mcp-name: io.github.nietonchique/mc3000-mcp -->
Safe MCP server and companion agent skill for monitoring and controlling SKYRC MC3000-compatible battery chargers over Bluetooth Low Energy.
The BLE protocol was recovered from the official Android app (MC3000 4.1.2). The production charger.* MCP tools expose safe charger operations: inspect slot state, read charger-stored voltage curves, validate battery profiles, dry-run profile writes, require explicit confirmation for live writes/starts, and provide emergency stop tools.
Status: alpha. Protocol framing, MCP stdio behavior, safety validation, and fake-client flows are tested. Live testing has confirmed MC3000 BLE operation on NiMH Charge, Discharge, Refresh, Break-in, and Cycle modes. Hardware behavior still depends on charger firmware/revision and BLE availability.
Safety warning
This software can control a physical battery charger. Wrong chemistry, current, voltage, or slot selection can damage cells or create a fire risk.
- The LLM/agent is not the safety layer; limits and dangerous-action gates are enforced in the MCP server.
- Verify battery chemistry, capacity, cell count, voltage/cutoff, temperature policy, and slot before applying any profile.
- API slot numbers are zero-based (
0..3), matching Android app internals. Physical slot 1 is API slot0. charger.apply_profileis dry-run by default. Live writes requireconfirmation_token=APPLY_PROFILE_SLOT_<slot>.charger.startrequires a separateconfirmation_token=START_SLOT_<slot>.- Keep the charger in sight while testing. Do not expose this MCP server to untrusted clients.
- Factory/calibration reset opcodes are documented for research but intentionally not exposed as production tools.
See SECURITY.md and docs/safety-model.md before using live hardware.
Features
- BLE discovery using the same advertised names as the Android app.
- Connect/disconnect over BLE FFE0/FFE1.
- Read one slot or all four slots.
- Parse slot status: chemistry, mode, status, time, voltage, current, capacity, temperature, internal resistance, LED state.
- Read firmware/hardware version and basic device settings.
- Read the app-compatible charger-stored voltage time-series (
0x56) and export it as JSON/CSV. - Validate battery profiles against conservative chemistry/device limits.
- Build/apply 40-byte MC3000 profiles with chemistry and mode-aware defaults.
- Dry-run-by-default production tools plus explicit confirmation tokens for writes/starts.
- Emergency stop for one slot or all slots.
- Companion
charger-agentskill for Hermes Agent workflows. - Legacy
mc3000_*low-level tools for protocol/debug work.
MC3000 vs MC5000 selection
Model selection is based on the charger/protocol, not the inserted battery. If the physical charger is known, configure/use that model explicitly. If it is unknown, use only read-only probes: MC3000 status is opcode 0x55, while MC5000 slot status is opcode 0x91 with a slot bitmask and a different response layout. Unknown devices must not receive profile writes or start commands.
MC5000 support is being added conservatively from protocol facts in kolinger/skyrc-mc3000: status parsing can be implemented/read-only first; profile writes/start remain MC3000-only until verified on real MC5000 hardware.
Install
From source:
git clone https://github.com/nietonchique/mc3000-mcp.git
cd mc3000-mcp
python -m venv .venv
. .venv/bin/activate
python -m pip install -e '.[test]'
Once published to PyPI, install/run with one of:
pipx install mc3000-mcp
pipx run mc3000-mcp
# or
uvx mc3000-mcp
Linux BLE access requires BlueZ/DBus. Confirm the adapter is powered:
bluetoothctl show
If scans return no devices, make sure the charger is powered on, not connected to the phone app, and close enough to the PC BLE adapter.
Configure as an MCP server
Local source checkout:
hermes mcp add mc3000 --command "$(pwd)/.venv/bin/mc3000-mcp"
hermes mcp test mc3000
Published package / pipx:
hermes mcp add mc3000 --command "pipx run mc3000-mcp"
hermes mcp test mc3000
Common client config examples are in examples/claude-desktop.json, examples/codex.json, and examples/cursor.json.
Install the companion Hermes skill
The MCP server enforces safety. The skill teaches the agent the safe workflow: ask for missing battery facts, choose conservative profiles, show dry-run summaries, require explicit confirmation, monitor after start, and stop on unsafe state.
Install from this repository:
hermes skills install \
https://raw.githubusercontent.com/nietonchique/mc3000-mcp/main/skill/SKILL.md \
--name charger-agent
Use it explicitly:
hermes -s charger-agent
# or inside a running session:
# /skill charger-agent
The raw SKILL.md is intentionally self-contained. Additional repository files under skill/profiles/ and skill/checklists/ are examples/checklists for humans and future bundle-style registries; the server-side safety rules remain in mc3000_mcp.safety.
Production MCP tools
Preferred tools are namespaced as charger.* and enforce dry-run/confirmation on dangerous actions:
| Tool | Purpose |
|---|---|
charger.scan_devices |
Read-only BLE scan. |
charger.connect |
Connect to a selected device. |
charger.get_status |
Read current charger status. |
charger.read_slots |
Read one slot or all slots. |
charger.get_voltage_curve |
Read charger-stored voltage time-series (0x56), app-compatible and no polling. |
charger.export_voltage_curve |
Export that voltage curve as JSON or CSV. |
charger.list_profiles |
List bundled example profiles. |
charger.validate_profile |
Validate a battery profile against enforced limits. |
charger.apply_profile |
Validate and apply a profile; dry-run by default, live write requires APPLY_PROFILE_SLOT_<slot>. |
charger.start |
Start a slot; requires START_SLOT_<slot>. |
charger.stop_slot |
Emergency stop for one slot. |
charger.stop_all |
Emergency stop for all slots. |
charger.export_session_log |
Export redacted in-memory command/session log. |
Legacy mc3000_* tools remain for low-level protocol work and backwards compatibility.
Safe workflow examples
Dry-run a bundled conservative NiMH AA profile for physical slot 4 / API slot 3:
{
"name": "charger.apply_profile",
"arguments": {
"slot": 3,
"profile_id": "nimh-aa-conservative-charge"
}
}
Apply after explicit confirmation:
{
"name": "charger.apply_profile",
"arguments": {
"slot": 3,
"profile_id": "nimh-aa-conservative-charge",
"dry_run": false,
"confirmation_token": "APPLY_PROFILE_SLOT_3"
}
}
Start after a separate explicit confirmation:
{
"name": "charger.start",
"arguments": {
"slot": 3,
"confirmation_token": "START_SLOT_3"
}
}
Export the charger-stored voltage curve as CSV:
{
"name": "charger.export_voltage_curve",
"arguments": {
"slot": 3,
"format": "csv"
}
}
Emergency stop all slots:
{"name": "charger.stop_all", "arguments": {}}
More examples: docs/examples.md.
Voltage curves
The Android app's graph is a voltage curve, not a generic telemetry logger. It requests opcode 0x56, receives a charger-stored sample interval plus up to 120 millivolt points, and plots/exports time vs voltage. Current, capacity, temperature, and resistance are status fields, not historical curve series.
This project exposes that same data as:
mc3000_get_voltage_curve— low-level protocol/debug tool.charger.get_voltage_curve— production-safe JSON time-series.charger.export_voltage_curve— JSON/CSV export.
No background polling is required for the app-compatible voltage curve.
Documentation map
SECURITY.md— hardware safety and disclosure policy.docs/supported-devices.md— confirmed devices and compatibility policy.docs/safety-model.md— what is enforced in code vs guidance.docs/profile-schema.md— battery profile schema and examples.docs/ble-protocol-notes.md— GATT/framing/opcode notes.docs/reverse-notes.md— detailed reverse-engineering notes.docs/examples.md— safe dry-run/apply/start/stop/curve examples.docs/publishing.md— release/listing/skill distribution checklist.skill/SKILL.md— companion agent playbook.server.json— draft Official MCP Registry metadata.
Protocol short version
- Service UUID:
0000FFE0-0000-1000-8000-00805f9b34fb - Write/notify characteristic UUID:
0000FFE1-0000-1000-8000-00805f9b34fb - Device names:
SimpleBLEPeripheral,Charger,HitecCharger - Normal command: 20 bytes, checksum in byte 19.
- Profile command (
0x11): 40 bytes, checksum in byte 39, written as two 20-byte chunks. - Voltage curve command (
0x56): charger-stored voltage curve for a zero-based slot. - Status/curve slot args are zero-based; start/stop use slot bitmasks.
Development
python -m pip install -e '.[test]'
python -m pytest -q
python -m ruff check .
python -m ruff format --check .
python -m mypy src tests
Local MCP stdio smoke test without hardware:
python -m mc3000_mcp.server <<'EOF'
{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05"}}
{"jsonrpc":"2.0","id":2,"method":"tools/list","params":{}}
{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"charger.list_profiles","arguments":{}}}
EOF
Build/publish checks:
python -m build
python -m twine check dist/*
Repository hygiene
The repository intentionally does not include the APK, decompiled Java, local reverse-engineering scratch outputs, virtualenvs, or build caches. Those are excluded by .gitignore.
License
Apache-2.0. See LICENSE.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。