bikerouter-mcp

bikerouter-mcp

Enables planning bike routes using the BRouter engine, with support for waypoints, route profiles, and exporting routes as GPX or other formats.

Category
访问服务器

README

bikerouter-mcp

An MCP server that plans bike routes with bikerouter.de — the BRouter-Web frontend by Norbert Renner on top of the BRouter engine by Arndt Brenschede, routing on OpenStreetMap data.

Point any MCP client (Claude Code, Claude Desktop, …) at it and ask things like "plan a gravel route from Cologne to Bonn along the Rhine and give me the GPX".

What it can do

Tool Purpose
plan_route Route through 2+ waypoints (coordinates or place names) and return distance, ascent/descent, estimated riding time, surface and way-type breakdown, turn instructions, a shareable bikerouter.de link, and optionally a saved GPX/GeoJSON/KML/CSV file.
compare_profiles Route the same waypoints with several profiles (e.g. trekking vs gravel vs fastbike) and compare distance, time, climb and paved share side by side.
geocode_place Turn a place name, address or POI into coordinates (via Photon, the geocoder bikerouter.de uses).
list_profiles List the known routing profiles, optionally verifying which ones the routing host actually serves.
get_profile_options Read a profile's .brf source and list the parameters it exposes (avoid_unsafe, allow_ferries, totalMass, bikerPower, …) for use with plan_route's profile_options.

Sample plan_route output:

**Route** (profile: `trekking`)
Alexanderplatz, Berlin → Brandenburger Tor, Berlin

- Distance: **5.2 km**
- Estimated riding time: **20 min** (⌀ 15.6 km/h, from the profile's physics model)
- Ascent: **80 m** / descent: **60 m**
- Elevation: 35–55 m (start 35 m, end 55 m)

- Surfaces: asphalt 76.9% (4 km), gravel 23.1% (1.2 km)
- Way types: cycleway 38.5% (2 km), residential 38.5% (2 km), track 23.1% (1.2 km)

Open in bikerouter.de: https://bikerouter.de/#map=14/52.518154/13.396327/standard&lonlats=…&profile=trekking

Install

cd bikerouter-mcp
npm install     # also builds via the prepare script
npm test

Register it with Claude Code:

claude mcp add bikerouter -- node /absolute/path/to/bikerouter-mcp/dist/index.js

or add it to claude_desktop_config.json / any other MCP client:

{
  "mcpServers": {
    "bikerouter": {
      "command": "node",
      "args": ["/absolute/path/to/bikerouter-mcp/dist/index.js"]
    }
  }
}

No API key is needed — the service is free and unauthenticated.

Configuration

All optional, set as environment variables:

Variable Default Meaning
BIKEROUTER_HOST https://brouter.de Host serving the BRouter /brouter routing endpoint. bikerouter.de is only the web frontend and 404s here, so this defaults to brouter.de. Point it at http://localhost:17777 to use your own BRouter server.
BIKEROUTER_WEB_URL https://bikerouter.de Web UI used for the shareable map links.
BIKEROUTER_PROFILES_URL <host>/brouter/profiles2/, then <host>/profiles/, then <web>/profiles/ Where .brf profile sources live (used by get_profile_options).
BIKEROUTER_GEOCODER_URL https://photon.komoot.io/api Photon-compatible geocoder.
BIKEROUTER_DEFAULT_PROFILE trekking Profile used when the caller does not name one.
BIKEROUTER_TIMEOUT_MS 60000 HTTP timeout. Long routes can take a while.
BIKEROUTER_USER_AGENT bikerouter-mcp/0.1.0 Sent with every request.

How it maps onto the BRouter API

Requests are plain GET /brouter calls, exactly as documented in BRouter's ServerHandler.java:

/brouter?lonlats=lon,lat|lon,lat&nogos=lon,lat,radius,weight|…&profile=trekking
        &alternativeidx=0&format=geojson&timode=1&straight=0&profile:avoid_unsafe=true
  • waypoints → lonlats (place names are geocoded first, biased towards the previous waypoint)
  • avoid_areas → nogos (omit weight for a hard no-go)
  • straight_from → straight (beeline legs)
  • profile_options → profile:NAME=VALUE
  • alternative_index → alternativeidx (1–3 for alternative routes)
  • turn_instructions → timode (voice hints in the GeoJSON response)

The GeoJSON response is summarised locally: track length, filtered ascend, total-time and total-energy come from the track properties, descent is derived from the filtered ascent and the net height change, and the surface / way-type / smoothness breakdown is aggregated from the messages table (WayTags weighted by Distance).

Limitations worth knowing

  • Routing quality is OpenStreetMap quality. Missing surface or access tags produce odd detours; always sanity-check a route on the returned map link before riding it.
  • BRouter has no street names, so turn instructions read "in 1.2 km turn right" without a road name. That is a property of the engine, not of this server.
  • Estimated riding time comes from the profile's physics model (rider mass, power, drag). Override totalMass, bikerPower, maxSpeed via profile_options for a realistic figure.
  • Elevation needs SRTM coverage; above ~60°N/S the track comes back without elevations and the summary says so.
  • The public service is a free, community-run instance — keep request volume modest, or run your own BRouter server and set BIKEROUTER_HOST.
  • Profiles differ per server. list_profiles ships a catalog of the stock BRouter/BRouter-Web profiles; pass verify: true to check what a given host really serves.

Tests

npm test builds the server and runs node --test:

  • unit tests for URL building, waypoint validation, .brf parameter parsing and the GeoJSON summariser
  • an end-to-end test that speaks MCP over stdio to the real server binary against a stub BRouter host, covering routing, GPX export, profile listing and BRouter's plain-text error responses

The tests never touch the public service, so they run offline.

Credits and licence

Server code: MIT. It is a client only — routing is done by BRouter (MIT) through BRouter-Web / bikerouter.de, on map data © OpenStreetMap contributors (ODbL).

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选