Skip to main content
Glama

bosch-flow-mcp

CI License: GPL v3 Python 3.13+ PyPI Glama MCP Server

MCP server for Bosch eBike Flow (Smart System / BES3). Tracks battery health, charge cycles, component versions, service history, live state-of-charge, and per-ride activity data (distance, elevation, power, assist-mode, CO2).

Disclaimer

This is an unofficial, community-built project. It is not affiliated with, authorised by, or endorsed by Robert Bosch GmbH, Bosch eBike Systems, or SingleKey ID. "Bosch", "eBike Flow", and related marks belong to their owners and are used here only to describe interoperability.

  • It signs in with your own Bosch eBike Flow account (via the standard SingleKey ID login) and reads only your own data. It is read-only - it never modifies your bike, battery, or account.

  • It uses the same public OAuth client (one-bike-app, PKCE) that the official Bosch eBike Flow app uses. No credentials, secrets, or protection measures are extracted, bypassed, or circumvented - every identifier here is already publicly documented.

  • When you supply your own EU Data Act API credentials, the official Data Act API is used. Otherwise the same app API your phone already uses is queried with your own login.

  • This is an undocumented, unofficial interface that may change or stop working at any time if Bosch alters their systems.

  • You are responsible for ensuring your use complies with Bosch's and SingleKey ID's terms of service in your jurisdiction.

  • Provided with no warranty under GPLv3+ (see LICENSE). Use at your own risk.

Related MCP server: Mi Fitness MCP

Features

  • Battery state snapshots over time (charge cycles, energy delivered, degradation trends)

  • Components and firmware versions (drive unit, battery, ConnectModule, head unit, remote, ABS)

  • Service book history and software update log (EU Data Act client only)

  • Live state-of-charge from ConnectModule via mobile API

  • Battery capacity tester results (EU Data Act client only)

  • Per-ride activities: distance, elevation, speed, cadence, measured rider power, calories, rider-vs-motor energy share, assist-mode split, CO2, ABS events, plus a per-point GPS/speed/elevation/power track

  • Auto-sync on demand - tools fetch fresh data without a cron job

Requirements

  • Python 3.13+ (tested on 3.13, 3.14 and 3.15, on Linux, macOS and Windows, in CI)

  • uv (recommended) or pip

  • A Bosch eBike Flow account (free, register at the Bosch eBike Flow app)

  • A BES3 Smart System eBike registered in the app

Install

pip install bosch-flow-mcp

Or run it without installing with uvx bosch-flow-mcp. For development from a clone:

git clone https://github.com/partymola/bosch-flow-mcp
cd bosch-flow-mcp
uv venv --python 3.13 .venv
uv pip install -e .

Auth

.venv/bin/bosch-flow-mcp auth

Opens your browser to Bosch login. The auth flow uses the one-bike-app public client with PKCE - no API keys or registration needed. Just your Bosch Flow account.

Important: Open browser DevTools (F12) and switch to the Network tab before logging in. After login, the browser redirects to an iOS URI (onebikeapp-ios://) that desktop browsers can't open. Copy the full redirect URL from DevTools (right-click > Copy URL on the oauth2redirect entry) and paste it at the prompt.

Tokens are saved to config/bosch_tokens.json and auto-refresh via offline_access.

EU Data Act users: if you have registered your own euda client and placed its ID in config/bosch_config.json, auth uses that instead - it opens the browser and completes automatically through a local http://localhost:4200 callback, with no DevTools step.

Sync

.venv/bin/bosch-flow-mcp sync                     # all data types
.venv/bin/bosch-flow-mcp sync --types bikes,batteries

Data types: bikes, batteries, components, service, software_updates, capacity.

Fetches your data and stores it locally. The source depends on your sign-in:

  • A standard Bosch eBike Flow account (the default) reads bikes, batteries, components, current firmware, and live state-of-charge from the mobile app API - works for any account, including non-EU.

  • Service-book history, software-update history, and capacity-tester results come only from the EU Data Act API, which requires registering your own euda client at the Bosch Data Act portal. With a standard sign-in those types report unavailable (with a note) rather than a silent empty result, and the Data Act API returns nothing for accounts registered outside the EU.

You can also use the bosch_sync MCP tool, or rely on automatic sync (each get_* tool triggers a sync if data is stale).

Run bosch-flow-mcp --version to print the installed package version.

Register with Claude Code

claude mcp add -s user bosch-flow -- /full/path/to/bosch-flow-mcp/.venv/bin/bosch-flow-mcp

Then ask Claude questions like:

  • "What's my bike's battery health this year?"

  • "Show me charge cycle trends by month"

  • "What firmware version is my drive unit on?"

  • "Have there been any service records for my bike?"

  • "How far and how hard were my rides this week?"

Available tools

Tool

Description

bosch_sync

Sync one or more data types (default: all)

bosch_get_bikes

List registered bikes

bosch_get_bike

Single bike with full details

bosch_get_batteries

Battery snapshots - latest or historical range

bosch_get_soc

Live state-of-charge from ConnectModule

bosch_get_capacity

Battery capacity tester results (EU Data Act client only)

bosch_get_components

Components with part numbers and firmware versions

bosch_get_service_records

Service book entries (EU Data Act client only)

bosch_get_software_updates

Software update history (EU Data Act client only)

bosch_battery_trends

Charge cycle and energy trends by period

bosch_get_activities

Per-ride summaries (distance, elevation, power, mode, CO2) over a date range

bosch_get_activity_detail

Per-point track for one ride (GPS/speed/elevation/cadence/power)

API credits

This server uses the Bosch Mobile API (obc-rider-profile.prod.connected-biking.cloud) as the primary data source, the rider-activity API (obc-rider-activity.prod.connected-biking.cloud) for per-ride data, and optional Data Act API (api.bosch-ebike.com) support for additional endpoints.

Authentication uses the one-bike-app public client (the same OAuth client as the Bosch eBike Flow mobile app). The auth approach was documented by the marq24/ha-bosch-ebike-flow Home Assistant integration and the open-ebike/open-ebike-backend project.

Configuration

Variable

Default

Description

BOSCH_FLOW_MCP_DB_PATH

bosch_flow.db in the package root

SQLite database path

BOSCH_FLOW_MCP_CONFIG_DIR

config/ in the package root

Directory for tokens and client config

Data safety

  • OAuth tokens are created at 0600 on POSIX - Windows ignores the mode and governs access by inherited ACLs; the token files and bosch_flow.db are gitignored.

  • A pre-commit hook (scripts/check-no-data.sh) blocks committing database files, files under config/, and large files. It does not read file contents. Install it after cloning:

    ln -sf ../../scripts/check-no-data.sh .git/hooks/pre-commit
  • Tests use temporary SQLite databases and fictional identifiers - no real bike or account data ever enters the repo.

Contributing

See CONTRIBUTING.md for development setup, the test workflow, and the pre-commit hook. Changes are tracked in CHANGELOG.md.

License

GPLv3+. See LICENSE.

Available Tools

12 tools
bosch_get_activitiesA

List e-bike rides with per-ride summary metrics.

Live read from the Bosch rider-activity API (no cache). Each ride includes distance, elevation gain/loss, avg/max speed, cadence, measured rider power, calories, rider-vs-motor energy share, assist-mode distance split (metres per mode), CO2 (emissions / car-equivalent / saved), and ABS/brake events. Heart rate is not recorded by the bike (it has no HR sensor) - pair with a wrist device for HR.

Args: start_date: Window start (YYYY-MM-DD, YYYY-MM, or "30d"). Default 30 days before the end or today, whichever is earlier. end_date: Window end. Default today. bike_id: Optional bike UUID filter. limit: Optional cap on rides returned (most recent first).

Inputs: limit, bike_id, end_date, start_date.

bosch_get_activity_detailA

Get the per-point track for one ride (GPS + speed/elevation/cadence/power).

Live read. Returns a downsampled track (~500 points per ride): per-point cumulative distance (m), speed (km/h), elevation (m), cadence, rider power (W), and GPS lat/lon. Get the activity_id from bosch_get_activities.

Args: activity_id: The ride UUID from bosch_get_activities.

Inputs: activity_id (required).

bosch_get_batteriesA

Get battery state and health for your Bosch eBike.

Returns charge level, remaining energy, total capacity, charge cycles (total / on-bike / off-bike), lifetime energy delivered, and software version.

Each sync captures a snapshot, building a time series of battery health. Use latest_only=False with a date range to see history.

Args: bike_id: Optional bike UUID to filter to one bike. start_date: Start date (YYYY-MM-DD, YYYY-MM, or Nd like "30d"). Default: 30 days before the end date or today, whichever is earlier. end_date: End date. Default: today. latest_only: If True (default), return only the most recent snapshot per bike. Set to False to return all snapshots in the date range.

Inputs: bike_id, end_date, start_date, latest_only.

bosch_get_bikeB

Get detailed profile for a single Bosch eBike.

Returns full bike details including brand, model, frame number, and the cached raw API response which may include component info.

Args: bike_id: The bike UUID from bosch_get_bikes.

Inputs: bike_id (required).

bosch_get_bikesA

List all Bosch eBikes registered to your Flow account.

Returns bike names, brand, and frame numbers. Uses local cache (auto-syncs if stale). Run bosch_sync first if the list is empty.

Returns a list of bikes with id, name, brand_name, and frame_number.

Inputs: no named parameters.

bosch_get_capacityA

Get battery capacity tester diagnostic results.

Shows battery health data from Bosch's official capacity tester tool, typically done at dealer service appointments. Includes remaining capacity percentage vs. original specification.

Capacity-tester data comes only from the EU Data Act API; with a standard Bosch eBike Flow sign-in this is empty and the result explains why.

Args: part_number: Optional battery part number to filter results. serial_number: Optional battery serial number to filter results.

Inputs: part_number, serial_number.

bosch_get_componentsA

List registered components for your Bosch eBike with software versions.

Shows the bike's components - drive unit, battery, ConnectModule, head unit, remote control, ABS - with part numbers, serial numbers, and firmware versions. The source depends on your sign-in: a standard Bosch eBike Flow account reads them from the bike profile (mobile app API); an EU Data Act (euda) client reads them from the Data Act registrations endpoint.

Useful for tracking firmware versions and identifying components for warranty or service purposes.

Args: bike_id: Optional bike UUID to filter to one bike. component_type: Optional component type filter, e.g. "driveUnit", "battery", "headUnit", "connectedModule", "remoteControl". Matched against the types your bikes registered, ignoring case, so every stored spelling of a type answers together. A value none of them match is refused, naming the types that are held.

Inputs: bike_id, component_type.

bosch_get_service_recordsA

Get the digital service book history for your Bosch eBike.

Returns all service records logged by Bosch dealers and service centres, including dates and descriptions of work performed.

Service records come only from the EU Data Act API; with a standard Bosch eBike Flow sign-in this is empty and the result explains why (register a euda client).

Args: bike_id: Optional bike UUID to filter to one bike. start_date: Start date (YYYY-MM-DD, YYYY-MM, or Nd). Default: all records. end_date: End date. Default: today.

Inputs: bike_id, end_date, start_date.

bosch_get_socA

Get live state-of-charge from the Bosch ConnectModule.

Returns real-time battery percentage, charging status, remaining energy, and reachable range per assist mode (eco/tour/sport/turbo).

Requires a ConnectModule on the bike. Data is only available when the bike is powered on, charging, or recently active.

Note: This calls the Bosch mobile API live - no caching.

Args: bike_id: The bike UUID from bosch_get_bikes.

Inputs: bike_id (required).

bosch_get_software_updatesA

Get software update installation history for your Bosch eBike.

Returns all firmware/software update reports, showing which components were updated, from which version to which version, and when.

This history comes only from the EU Data Act API; with a standard Bosch eBike Flow sign-in it is empty (current firmware is still available via components).

Args: bike_id: Optional bike UUID to filter to one bike. start_date: Start date (YYYY-MM-DD, YYYY-MM, or Nd). Default: all records. end_date: End date. Default: today.

Inputs: bike_id, end_date, start_date.

bosch_syncA

Sync Bosch eBike data to the local cache.

Fetches data from Bosch and stores it in SQLite. The source depends on your sign-in: a standard Bosch eBike Flow account uses the mobile app API; an EU Data Act (euda) client uses the Data Act API. Run this to populate the cache before using other bosch_get_* tools, or to refresh after a ride or charge cycle.

Bikes are identified automatically from your Bosch Flow account. Battery snapshots build a time series for health trend analysis.

Service records, software-update history and capacity-tester data are only available with a euda (EU Data Act) client; with a standard sign-in they report status "unavailable" rather than an empty result.

Args: data_types: What to sync. Options: "all", "bikes", "batteries", "components", "service", "software_updates", "capacity". Comma-separated for multiple, e.g. "bikes,batteries". Default: "all".

Returns a per-type summary: status (ok/empty/unavailable/error/auth_error/ rate_limited), record count, and a message explaining any non-ok result.

Inputs: data_types.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.9/5.0

    Scored across 12 tools

    Disambiguation4/5

    Most tools target clearly distinct resources (live SOC, ride activities, activity track, bikes, components, service records, updates, capacity tests). The mild overlap sits between bosch_get_batteries (cached snapshots/health), bosch_battery_trends (aggregated trends), and bosch_get_soc (live state) — but the descriptions clearly separate live vs. cached vs. derived, so an agent can choose correctly.

    Naming Consistency4/5

    All names are snake_case with a uniform bosch_ prefix, giving a predictable namespace. The only deviation is bosch_battery_trends and bosch_sync, which drop the get_ verb, but they remain readable and clearly scoped.

    Tool Count5/5

    Twelve tools is well within a comfortable range and each covers a distinct slice of the eBike data domain (rides, battery, components, service, updates). No redundant or filler tools are present.

    Completeness4/5

    The surface covers the full read lifecycle: sync, bikes/bike, components, batteries/SOC/trends/capacity, activities/detail, service records, and software updates. Minor gaps exist — no write operations (e.g. tagging or notes on rides) and no explicit charge-session or motor-statistics view — but core workflows are covered.

    Maintenance

    ActivityActive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers