trails-mcp
Provides trail search and geocoding using OpenStreetMap data via Waymarked Trails and Nominatim, enabling finding routes by name, place, or bounding box, and retrieving route details, elevation, and geometry.
Resolves Wikipedia URLs for routes, providing direct access to their Wikipedia pages for additional information.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@trails-mcp Find hiking trails near Zermatt"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
trails-mcp
A multi-service MCP server for outdoor / mapping data. Service 1 wraps the open Waymarked Trails API (recreational routes from OpenStreetMap) and adds OpenStreetMap Nominatim geocoding so trails can be found by place name. Service 2 adds Windy point forecasts for trail weather, marine, and air-quality planning.
Trail search is read-only and needs no API keys. Windy forecasts require a
Point Forecast API key (WINDY_API_KEY).
What the AI can do
Search trails by name or reference code (
GR20,E5, "Pennine Way")Find trails near a place name in one step ("hiking trails near Zermatt")
Find trails inside a lon/lat bounding box
Get full route details: length, operator, description, website, Wikipedia, OSM tags, bbox, sub/super-routes, and (optionally) the full path geometry
Get a route's elevation profile
Get route geometry clipped to a map box (GeoJSON)
Resolve a route's Wikipedia link
Get a guidepost (signpost node)
Get a route's waymarking symbol (SVG shield)
Geocode any place name to coordinates
Get weather/marine/air-quality forecasts at any lat/lon (Windy Point Forecast API)
Browse all Windy models, parameters, and pressure levels with descriptions
All six Waymarked Trails flavours are supported via a flavour parameter on each tool:
hiking (default), cycling, mtb, riding, skating, slopes.
Coordinates: the upstream API speaks Web Mercator (EPSG:3857) internally. This server accepts and returns WGS84 lon/lat everywhere — the conversion is automatic. Route geometry is summarised by default (
geometry_detail: "summary") to keep responses small; pass"full"for every coordinate or"none"to omit geometry.
Related MCP server: bergauf
Tools
Tool | Purpose |
| Health/last-update of a flavour |
| Fuzzy name/ref search |
| Geocode a place + return nearby routes (primary entrypoint) |
| Routes inside an explicit lon/lat box |
| Batch summary lookup by relation id |
| Full route detail (geometry trimmed by default) |
| Elevation profile |
| Route geometry clipped to a box (GeoJSON) |
| Wikipedia URL for a route |
| Guidepost node detail |
| Waymarking symbol SVG |
| Place name → coordinates (Nominatim) |
| Weather/marine/AQ forecast at lat/lon (Windy; requires API key) |
| Catalog of Windy models, parameters, levels (no API call) |
Install & build
npm install
npm run build # compiles src/ -> dist/
npm test # unit tests for the geo/conversion helpersRequires Node >= 18.18 (developed on Node 22).
Connect to an MCP client
The same stdio command works everywhere; only the config file differs. Run npm run build
first — the config points at dist/index.js.
Claude Code
Either run:
claude mcp add trails -- node /Users/chiragahuja/Desktop/trails-mcp/dist/index.js…or add to ~/.claude.json (global) or a project .mcp.json:
{
"mcpServers": {
"trails": {
"command": "node",
"args": ["/Users/chiragahuja/Desktop/trails-mcp/dist/index.js"]
}
}
}Cursor
Add to ~/.cursor/mcp.json (global) or <project>/.cursor/mcp.json (project-scoped):
{
"mcpServers": {
"trails": {
"command": "node",
"args": ["/Users/chiragahuja/Desktop/trails-mcp/dist/index.js"]
}
}
}Live-development (no build step)
Point the client at the TypeScript source via tsx instead of the built file:
{
"mcpServers": {
"trails": {
"command": "npx",
"args": ["tsx", "/Users/chiragahuja/Desktop/trails-mcp/src/index.ts"]
}
}
}Try it
Use the MCP Inspector:
npm run inspectOr, in a connected client, prompt:
Find hiking trails near Zermatt and show details of the longest one.
…which chains find_routes_near_place → get_route_details.
Configuration (env vars)
Copy .env.example to .env.dev and set your Windy Point Forecast key (create one at
api.windy.com). For local dev, npm run dev loads
.env.dev automatically. For MCP clients, pass env vars in the server config:
{
"mcpServers": {
"trails": {
"command": "node",
"args": ["/path/to/trails-mcp/dist/index.js"],
"env": { "WINDY_API_KEY": "your_point_forecast_key" }
}
}
}Variable | Default | Purpose |
| (unset) | Windy Point Forecast API key (Map/Webcam keys do not work) |
|
|
|
|
| User-Agent sent to upstream APIs (Nominatim requires a descriptive one) |
Architecture
src/
core/ registry, tool type, http, errors, rate limiter, logger, result helpers
geo/ Mercator <-> lon/lat conversion, bbox helpers, geometry trimming
services/
index.ts registerAllServices() — the single place new services plug in
geocoding/ Nominatim client + geocode_place (shared, rate-limited)
waymarked/ Waymarked Trails client, response shapers, and one file per tool
windy/ Windy Point Forecast client, parameter catalog, forecast shapingAdding another service = create src/services/<name>/ with a register() function and add
one call in src/services/index.ts. No existing tool files change. Tool names are namespaced
to avoid collisions, and the registry rejects duplicates.
Attribution & usage
Trail data: © OpenStreetMap contributors, served by Waymarked Trails (Sarah Hoffmann), ODbL.
Geocoding: OpenStreetMap Nominatim — used within its usage policy (max 1 request/sec, descriptive User-Agent), enforced in-process.
Please be considerate with request volume; these are free community services.
License
MIT (this wrapper). Upstream data/services keep their own licenses.
Available Tools
14 toolsfind_routes_in_bboxFind trails in a lon/lat bounding boxA
Find recreational routes that pass through an explicit WGS84 lon/lat bounding box. Use this when you already have coordinates (e.g. from geocode_place or a map viewport). For a place name, use find_routes_near_place instead.
Inputs: min_lon (required), min_lat (required), max_lon (required), max_lat (required), +3 more.
find_routes_near_placeFind trails near a placeA
Find recreational routes near a named place in one step: geocodes the place with OpenStreetMap, then returns routes whose path passes through a bounding box around it. This is the primary way to answer 'what trails are near '. Returns summary route entries; follow up with get_route_details for any id.
Inputs: place (required), radius_km, limit, flavour, +1 more.
geocode_placeGeocode a place nameA
Convert a place name (city, region, landmark, mountain pass, etc.) into geographic coordinates using OpenStreetMap's Nominatim geocoder. Returns candidate matches with lat/lon and a bounding box. Use this when you have a place name and need coordinates — for example before calling find_routes_in_bbox. To find trails near a place in one step, prefer find_routes_near_place instead.
Inputs: query (required), limit, language.
get_guidepostGet guidepost detailsA
Get details of a guidepost (waymarking signpost node) by its OSM node id: name, elevation, lon/lat position, and OSM tags. Guidepost ids come from map tiles or other tools, not from route searches.
Inputs: id (required), flavour, language.
get_point_forecastGet weather forecast at coordinatesA
Fetch machine-readable weather, marine, or air-quality forecast data for a lat/lon point from the Windy Point Forecast API (https://api.windy.com/point-forecast). Requires WINDY_API_KEY. Returns shaped timesteps with decoded wind direction, precipitation type, and WMO weather codes plus a parameterGuide explaining each requested variable. Pick a regional model when available (iconEu for Europe, hrrrConus for US, arome for France). Use list_forecast_options to browse all models, parameters, and pressure levels.
Inputs: lat (required), lon (required), model, parameters, +2 more.
get_route_detailsGet full trail detailsA
Get full information about a single route by its OSM relation id: name, reference, network, total length, operator, description, website, Wikipedia, bounding box (lon/lat), raw OSM tags, and any sub-/super-routes. Geometry is summarised by default to keep the response small — set geometry_detail to 'full' for every coordinate or 'none' to omit it.
Inputs: id (required), geometry_detail, flavour, language.
get_route_elevationGet a trail's elevation profileA
Get the elevation profile of a route by its OSM relation id: minimum/maximum elevation and elevation points (lon, lat, ele in metres, pos along the way) per segment. Note: elevation data is only available on some flavours/servers; if unavailable a not_found result is returned.
Inputs: id (required), simplify, flavour, language.
get_routes_by_idsGet trail summaries by idsA
Fetch summary entries for multiple routes at once by their OSM relation ids. Returns the same compact shape as the search tools. For full detail on a single route use get_route_details.
Inputs: ids (required), flavour, language.
get_route_segmentsGet trail geometry clipped to a boxA
Get the on-map geometry of one or more routes, clipped to a WGS84 lon/lat bounding box, as GeoJSON (reprojected to lon/lat). Useful for drawing the part of a trail inside a map viewport. Geometry is summarised by default; set geometry_detail to 'full' for all coordinates.
Inputs: ids (required), min_lon (required), min_lat (required), max_lon (required), +3 more.
get_route_symbolGet a route's waymarking symbolA
Fetch the waymarking symbol (route shield) SVG for a given symbol_id. The symbol_id is the value returned as 'symbol_id' by the search/detail tools. Returns the symbol as an image plus the raw SVG markup.
Inputs: symbol_id (required), flavour.
get_route_wikilinkGet a trail's Wikipedia linkB
Resolve the Wikipedia article URL for a route by its OSM relation id (if the route is tagged with one). Returns the URL; returns a not_found result if the route has no Wikipedia link.
Inputs: id (required), flavour, language.
list_forecast_optionsList Windy forecast models, parameters, and levelsA
Return the full catalog of Windy Point Forecast models, parameters, and pressure levels with descriptions and model–parameter compatibility. Does not call the Windy API (no quota used). Use before get_point_forecast to choose valid model/parameter combinations.
Inputs: category.
search_routes_by_nameSearch trails by nameA
Fuzzy-search recreational routes by name or reference code (e.g. 'GR20', 'E5', 'Pennine Way'). Returns summary route entries (id, name, ref, network group, symbol). Use get_route_details with a returned id for full information. To search by location instead of name, use find_routes_near_place.
Inputs: query (required), limit, page, flavour, +1 more.
trails_statusWaymarked Trails server statusA
Check whether a Waymarked Trails map flavour is online and when its OpenStreetMap data was last refreshed. Useful as a health check.
Inputs: flavour.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 14 tools
All tools have clearly distinct purposes supported by detailed descriptions. Overlap between find_routes_in_bbox and find_routes_near_place is explicitly disambiguated in descriptions, and no two tools do the same thing.
Tool names predominantly follow a verb_noun pattern (e.g., find_routes_near_place, get_route_details), but trails_status breaks the pattern by being a noun phrase without a verb. The variety of verbs (find, get, list, search, geocode) is acceptable given the diverse operations.
With 14 tools covering route search, details, elevation, segments, symbol, wikilink, geocoding, forecast, and health check, the count is well-scoped for a comprehensive trail information server.
The tool set covers the full lifecycle of querying routes: search by name, location, bbox; get details, elevation, segments, symbol, wikilink; batch retrieval; geocoding; forecast; and server status. No obvious gaps for a read-only API.
Maintenance
Related MCP Connectors
Plan your hike. Get your developer token at https://Infoseek.ai/mcp
Look up U.S. rail-trails: search, nearby trails, trail facts, trailheads and closures.
Routing, geocoding, places, matrix and map tools for location-aware AI workflows.
Global weather via Open-Meteo: forecast, historical, marine, air quality, geocoding, elevation.
Related MCP Servers
- FlicenseAqualityDmaintenanceAllows you to search for hiking routes on Wikiloc using geographic and textual queries.14-
- FlicenseNot gradedqualityCmaintenanceLets an LLM plan hikes anywhere in Switzerland by combining named routes, elevation profiles, weather forecasts, and public transport.7-
- AlicenseNot gradedqualityDmaintenanceEnables searching hiking trails from AllTrails.com via MCP, with smart caching to avoid rate limiting.MIT
- AlicenseAqualityDmaintenanceEnables users to get weather forecasts, snow conditions, air quality, and location search via the Open-Meteo API, with guided prompts for ski trips and outdoor activities.11MIT