SuperAPIAI Directory

bicycle-routes-generator-mcp

github.com · AI developer platforms

bicycle-routes-generator-mcp is an MCP server for Claude that generates mountain bike and road bike routes (loops, point-to-point, via points) based on real OpenStreetMap data and saves them as GPX files with elevation and safety warnings. Routes are computed by the BRouter or OpenRouteService routing engines; the AI and the application itself do not fabricate coordinates. Users can request routes in natural language through Claude Desktop or Claude Code, or generate them directly in the terminal using the CLI. Each route comes with a summary (distance, ascent, maximum gradient, percentage of paved/unpaved/singletrack) and warnings (segments with motor vehicle traffic, gradients over 12%, protected areas, segments where bicycles are prohibited, technical sections). GPX files are saved by default to /tmp/bicycle-routes, which can be changed via an environment variable. The project is under the MIT license, and data comes from OpenStreetMap contributors (ODbL license).

Open website Alternatives
PricingOpen source开源项目(可免费自部署)
PlatformsLinux

About this tool

bicycle-routes-generator-mcp is an MCP (Model Context Protocol) server aimed primarily at Claude users, for generating bicycle routes based on real OpenStreetMap data. It supports mountain bikes and road bikes, can generate loops, point-to-point routes, and routes that include via points, and ultimately outputs GPX files with elevation information along with safety warnings.

Purpose: Users can make route requests to Claude in natural language, for example "Starting from Casa de Campo in Madrid, generate a mountain bike loop of about 25 km with little climbing, on dirt roads," and Claude will call this MCP server to generate the route. Routes can also be generated directly in the terminal using CLI commands without relying on AI.

Main capabilities:

  • Route generation: Computes routes on real OpenStreetMap paths and roads based on BRouter (default, MIT license, no key required) or OpenRouteService (optional, requires an API key).
  • Route types: Supports tracks (prefers wide dirt roads, few singletracks, no extreme gradients), mixed (default, general mountain bike), singletrack (more singletracks, less pavement), road (road bike, paved roads with little traffic, warns about unpaved segments and busy roads).
  • Route summary: Each route provides distance, ascent, maximum gradient, percentage of paved surface, percentage of dirt roads, and percentage of singletrack.
  • Safety warnings: Includes segments with motor vehicle traffic, segments with gradients over 12%, protected areas, roads where bicycles are prohibited, and technical sections.
  • Via points: Supports specifying places that must be passed through in order, for example "a loop starting from Casa de Campo, passing through El Pardo and Aravaca."
  • Loop generation algorithm: Geocodes places via Nominatim, places 3-4 via points on a circle (random direction, reproducible with a seed), the routing engine computes the route start→via points→start, adjusts the radius to approach the requested distance, generates 6 candidate routes and scores them based on distance, traffic, repeated paths, surface, prohibited passage, ascent, and gradient, and selects the best route.
  • GPX output: Saved by default to /tmp/bicycle-routes, which can be changed via the BIKE_GPX_DIR environment variable.
  • Exporter: Supports disk (saves locally by default) and garmin (delegates to an installed Garmin MCP server to upload courses). wahoo is not implemented. Komoot and Strava require manual GPX import.

Usage:

  1. Claude Desktop extension installation: download the bicycle-routes-generator-mcp.mcpb file, double-click or drag it into Claude Desktop's extension settings to install, fill in the GPX folder and contact email (required by the Nominatim usage policy), then make a route request to Claude. This extension uses uv; on first run it automatically downloads Python and dependencies.
  2. Manual installation (CLI and Claude Code): requires uv. Configure via environment variables; no keys or personal information are hardcoded. CLI command example: bicycle-routes generate "Casa de Campo, Madrid" --km 25 --type tracks.
  3. MCP server tools: generate_route(start, distance_km, max_climb_m?, trail_type?, loop=true, end?, name?, seed?, via?) returns the GPX path, summary, and warnings; list_routes() lists saved routes.

Use cases: cycling enthusiasts planning mountain bike or road bike routes; needing to quickly generate GPX files with elevation and safety information; iteratively adjusting routes through Claude conversations; uploading routes to Garmin devices.

Limitations:

  • Route data comes from OpenStreetMap and may be incomplete or outdated, does not reflect temporary closures or all local regulations, and routes should be checked on a map before riding.
  • Climbing is calculated based on a digital elevation model with approximately 90 m resolution and may differ by 10-20% from records from barometric watches or bike computers; short climbs may be smoothed.
  • The public brouter.de server does not guarantee availability; the application limits to at most 1 request per second and caches responses; for heavy use, it is recommended to set up a local BRouter.
  • The Nominatim usage policy requires at most 1 request per second, an identifying User-Agent, caching results, and prohibits autocomplete or bulk queries; for heavy use, it is recommended to set up a local Nominatim.
  • The Overpass API is used for protected area queries, with a guideline of approximately 10,000 requests per IP per day; one cached query per route.
  • The Garmin community MCP server uses an unofficial web API and may stop working; the official API is only available to approved enterprises.
  • Wahoo export is not implemented; Komoot and Strava require manual GPX import.
  • The project code uses the MIT license; route and place data come from OpenStreetMap contributors under the ODbL license; this attribution is included in the metadata of generated GPX files and should be retained when sharing.
Up/Down to navigate · Enter to open · ESC to closeBrowse all tools