
Bicycle routes generator MCP
io.github.Marc-Armillas由 GitHub 帳號 Marc-Armillas 發布v0.5.0更新於 Oct 26, 2026
MTB and road cycling routes on real OpenStreetMap trails, saved as GPX with safety warnings.
發布方自己的服務:Guide Registry
概覽
依地點產生登山車與公路騎乘路線,採用真實 OpenStreetMap 路徑,輸出含海拔與安全提醒的 GPX 檔。
- 可以做什麼
- 依起點、目標距離、路面類型、爬升上限、隨機種子與途經點產生環狀或點對點路線
- 回傳 GPX 檔路徑,以及距離、爬升、最大坡度與路面比例摘要
- 提供機動車輛路段、陡坡、保護區、禁行路段與技術路段的警告
- 列出已儲存的路線
- 適用情境
- 想讓助理依地名規劃登山車或公路騎乘路線,並取得可匯入車錶的 GPX 檔與交通、陡坡提醒時適用。也適合透過更換隨機種子、距離或途經點快速取得替代環線。
- 執行需求
- 以 stdio 本機程序執行;Claude Desktop 擴充功能透過 uv 自動下載 Python,手動安裝則需要 uv(會代為安裝 Python)。需要連線至 Nominatim、BRouter(或 OpenRouteService)與 Overpass。透過環境變數設定:BIKE_GPX_DIR、BIKE_CONTACT(聯絡電子郵件或網址,Nominatim 政策建議提供)、BIKE_ENGINE、BIKE_BROUTER_URL、使用 OpenRouteService 時的 ORS_API_KEY、BIKE_PROTECTED_AREAS、BIKE_DATA_DIR。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Bicycle routes generator MCP,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
Bicycle routes generator MCP
English · Español
[Bicycle routes generator MCP server]
⬇️ Download the Claude Desktop extension (bicycle-routes-generator-mcp.mcpb)
Generates mountain bike and road cycling routes from a location and saves them as GPX with elevation. The track is computed by a routing engine (BRouter or OpenRouteService) on real OpenStreetMap trails and roads: neither the AI nor the application invents coordinates.
You can use it:
- With Claude (Claude Desktop or Claude Code) through a local MCP server: "make me a ~25 km MTB loop from Casa de Campo in Madrid, little climbing, on dirt tracks" (see what happens when you ask Claude).
- From the terminal, without AI:
bicycle-routes generate "Casa de Campo, Madrid" --km 25 --type tracks.
Every route comes with a summary (distance, climbing, maximum grade, % of pavement, dirt track and singletrack) and warnings: sections with motor traffic, grades over 12 %, protected areas, ways where bikes are not allowed and technical sections.
💾 GPX files go to
/tmp/bicycle-routesby default. macOS empties/tmpon restart and cleans up old files, so copy the routes you want to keep (or setBIKE_GPX_DIRto another folder).
⚠️ Always check the route on a map before riding. OpenStreetMap data may be incomplete or out of date, and does not reflect temporary closures or every local regulation. Climbing is computed from a digital elevation model (~90 m) and may differ from what a barometric watch or bike computer records (often by 10-20 %); short ramps may be smoothed out.
Easy install in Claude Desktop (.mcpb extension)
- Download
bicycle-routes-generator-mcp.mcpb(always the latest release), or build it withnpx @anthropic-ai/mcpb pack . dist/bicycle-routes-generator-mcp.mcpb. - Double-click the file (or drag it into Claude Desktop → Settings → Extensions) and click Install.
- Fill in the configuration: the GPX folder (
/tmp/bicycle-routesby default) and a contact email (required by the OpenStreetMap/Nominatim usage policy). The other fields are optional. - Ask Claude: "make me a 25 km MTB loop from Casa de Campo in Madrid on dirt tracks".
No need to install Python: this is a uv extension, so Claude Desktop downloads Python and the
dependencies automatically the first time (it can take a minute). .mcpb is the successor of
the .dxt format; older Claude Desktop versions that only support .dxt cannot run uv
extensions.
Manual install (CLI and Claude Code)
Requirements: macOS, Windows or Linux with uv (it installs Python for you).
Configuration (environment variables)
There are no keys or personal data in the code: everything is configured through environment
variables (or a .env file in the folder you run the CLI from).
Command-line usage
Trail types (--type):
tracks: favours wide dirt tracks, little singletrack and no extreme ramps.mixed(default): general MTB.singletrack: more singletrack, less pavement.road: road bike. Paved roads with little traffic; warns about unpaved sections and only about busy roads (main roads or heavy estimated traffic), not ordinary secondary roads.
Real example (abridged):
More examples with real output in docs/pruebas-reales.md (in Spanish).
Using it with Claude (MCP server)
The server exposes two tools:
generate_route(start, distance_km, max_climb_m?, trail_type?, loop=true, end?, name?, seed?, via?)→ GPX path, summary and warnings.viais a list of places the route must pass through, in order (e.g. "a loop from Casa de Campo passing through El Pardo and Aravaca").list_routes()→ saved routes.
Example: what happens when you ask Claude
You: "Make me a ~40 km MTB loop from Casa de Campo in Madrid."
1. Claude calls the tool, choosing the arguments from your request:
2. The MCP server computes the route on your computer (10-60 seconds):
- Looks up "Casa de Campo, Madrid" in Nominatim (OpenStreetMap) →
40.424, -3.756. - Generates 6 candidate loops with BRouter on real trails, adjusting each one to about 40 km.
- Scores them (distance, traffic, repeated trails, surface, forbidden access, climbing) and keeps the best one.
- Analyses it: climbing, grades, surface, sections with traffic, technical sections and protected areas (Overpass API).
- Saves the GPX with elevation in your GPX folder.
3. It returns this to Claude (real output, abridged; obtained with "seed": 2026 so it can
be reproduced: without a seed every request gives a different loop):
4. Claude answers you in your language, with the summary and every warning. For example (illustrative, Claude's wording varies):
I've created a 37.8 km loop from Casa de Campo with +336 m of climbing: 41 % dirt track, 31 % singletrack and 29 % paved. Watch out for 0.3 km on a road with traffic (km 27.3–27.6) and a steep descent of ~13 % at km 9.2. Climbing comes from an elevation model and may differ from your watch, so check the route on a map before riding. GPX:
/tmp/bicycle-routes/mtb-casa-de-campo-38-km-loop-20261017-163919.gpx
From there you can keep going in the same conversation:
Claude Code
Claude Desktop (without the extension)
The .mcpb extension is the easiest option (see above). To configure it by hand instead:
Settings → Developer → Edit config (claude_desktop_config.json):
Use the absolute path to uv (which uv on macOS/Linux, where uv on Windows), because
Claude Desktop does not always inherit the terminal's PATH. Restart Claude Desktop.
Building the extension
manifest.json describes the extension (uv type, tools and configuration fields) and
.mcpbignore keeps the tests, docs and your .env out of the package.
Publishing a release
-
Bump
versioninmanifest.json,pyproject.tomlandsrc/bicycle_routes/__init__.pytogether. -
Create and push a matching tag:
-
The
ReleaseGitHub Actions workflow runs the tests, buildsbicycle-routes-generator-mcp.mcpband attaches it to a new GitHub Release. The download link at the top of this README always points to the latest one. -
A second job publishes that version to the official MCP Registry as
io.github.Marc-Armillas/bicycle-routes-generator-mcp: it fills inserver.jsonwith the version, the release URL and the SHA-256 of the.mcpb, and logs in with GitHub OIDC (no secret needed). If the registry rejects it, the GitHub Release is already published.
Garmin, Wahoo and other platforms
The application is platform-independent: the output is a standard GPX file. Sending to
platforms is done by optional exporters sharing a common interface
(export(route, config) -> ExportResult, in src/bicycle_routes/exporters/).
- disk (default): saves the GPX in
BIKE_GPX_DIR. - garmin: delegates to an already installed Garmin MCP server (
upload_coursetool).- With Claude (recommended): nothing to configure. Ask "upload it to Garmin" and Claude
will call the Garmin MCP server's
upload_coursewith the generated GPX andactivity_type="mountain_biking"("road_biking"for road routes). - From the CLI: set
BIKE_GARMIN_MCP_COMMANDto the command that starts that server and use--garmin. Garmin credentials are handled by that server, never by this app. - Community Garmin MCP servers use Garmin Connect's unofficial web API and may stop working. The official API (Courses API) is only available to approved businesses.
- With Claude (recommended): nothing to configure. Ask "upload it to Garmin" and Claude
will call the Garmin MCP server's
- wahoo: not implemented. The Cloud API has
POST /v1/routes, but you must request an app and get it approved (notes inexporters/wahoo.py). - Komoot (API only for partners under contract) and Strava (its API cannot create routes): import the GPX manually on their websites.
Routing engines
-
BRouter (default, MIT, no key). Uses the
mtbprofile withStrictNOBicycleaccess=1(avoids ways taggedbicycle=no) andavoid_unsafe=1; forroad, thefastbikeprofile withconsider_traffic=1(the same routes asfastbike-lowtraffic). The publicbrouter.deserver makes no availability guarantees: the app sends at most 1 request per second and caches responses. For heavy use, run a local one (not yet tested in this project): -
OpenRouteService (optional):
BIKE_ENGINE=orsandORS_API_KEY(free plan: 2,000 routes/day, 40/min). Profilecycling-mountain, orcycling-roadforroad.
How the loop is generated
- The place is geocoded with Nominatim (or the coordinates you give are used).
- 3-4 waypoints are placed on a circle passing through the start, with a random orientation
(reproducible with
--seed). - The engine routes start → waypoints → start on real trails.
- The radius is adjusted until the requested distance is approached (about 2-4 requests).
- Six candidates are generated and the best one is picked by distance, traffic, repeated trails, surface, forbidden access, climbing and grades.
With via points (--via / via), your points replace the random ones: the engine routes
start → via 1 → … → via N → start (or → end, for point-to-point), in the given order. The
distance comes from those points, not from --km; a warning is added if it differs by more
than 15 %.
External services and their policies
- Nominatim (place lookup): usage policy. At most 1 request/second, an identifying User-Agent, cached results, no autocomplete or bulk queries. For heavy use, run your own Nominatim.
- Overpass API (protected areas): about 10,000 requests/day per IP as a guideline; one cached query per route.
- brouter.de: public server without guarantees; use a local one for heavy use.
Development
Layout:
The core does not depend on the CLI or the MCP server, so it could later be offered as a remote server (HTTP transport) by changing only the exporter and the transport.
License and attribution
Code under the MIT license. See NOTICE.
Trail and place data © OpenStreetMap contributors, under the ODbL license. Generated GPX files include this attribution in their metadata; keep it if you share them. BRouter elevation: SRTM (CGIAR-CSI).
來源:README.md,提交 c5d1cf3
工具
0版本歷史
1- v0.5.0最新Oct 18, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分
