Alltrails Mcp

io.github.chrischall由 GitHub 帳號 chrischall 發布v3.2.1更新於 Nov 7, 2026

Unofficial AllTrails MCP for Claude — search trails, get details, reviews, photos, saved lists

概覽

AI 產生的概覽

非官方 AllTrails MCP 伺服器,讓助理搜尋步道、查看詳情、評論、照片與天氣,並讀取你的收藏清單和登山紀錄。

可以做什麼
  • 依名稱搜尋 AllTrails,並把地名解析為位置記錄
  • 讀取步道詳情、評論、照片、天氣與 GPX 路線匯出
  • 查看已登入使用者的個人檔案、收藏清單及清單中的步道
  • 列出已完成的步道並瀏覽活動動態
  • 執行橋接健康檢查以診斷連線問題
適用情境
適合在對話中研究登山路線、比較步道、彙整評論,或調取自己在 AllTrails 的收藏清單與已完成步道。它是供個人使用的唯讀便利層,並非官方整合。
執行需求
需在本機執行,要求 Node.js 22.5 或更新版本以及 MCP 主機(如 Claude Desktop)。還需要 ContextMint Bridge 瀏覽器擴充功能、已登入的 alltrails.com 分頁,以及首次使用時的一次性配對碼確認。選用環境變數包括 ALLTRAILS_USER_ID、ALLTRAILS_LOCALE、ALLTRAILS_CALLER、ALLTRAILS_REQUEST_TIMEOUT_MS、ALLTRAILS_WS_PORT 與 ALLTRAILS_DEBUG_LOG。
安裝前請注意
非官方:它逆向使用 AllTrails 的內部 API,該 API 受 DataDome 防護並受 AllTrails 服務條款約束,可能隨時失效,自動存取也可能違反其條款。README 說明程式碼由 Claude 撰寫、未經人工稽核。請求在你已登入的瀏覽器分頁內執行,因此會使用你的工作階段;ALLTRAILS_DEBUG_LOG 會把請求中繼資料寫入 stderr。工具據稱皆為唯讀。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Alltrails Mcp,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

AllTrails MCP

[CI] [npm] [license]

A Model Context Protocol server that connects Claude to AllTrails, giving you natural-language access to trail search, trail details, reviews, photos, weather, and your own saved lists and hiking history.

[!WARNING] AI-developed project. This codebase was entirely built and is actively maintained by Claude. No human has audited the implementation. Review all code and tool permissions before use.

[!CAUTION] Unofficial and unsupported. AllTrails has no public API. This server reverse-engineers the internal API used by alltrails.com. That API is fronted by DataDome bot protection and governed by AllTrails' Terms of Service. It may break without notice, and automated access may violate their ToS — a prior third-party AllTrails project was disabled at AllTrails' request. Use this only for your own account, at your own discretion.

What you can do

Ask Claude things like:

  • "Find waterfall trails near Portland, Oregon"
  • "What's the AllTrails rating and length of trail 10236086?"
  • "Summarize the recent reviews for this trail"
  • "What trails have I marked completed?"
  • "Show me the trails on my saved 'weekend hikes' list"

Requirements

Acknowledgement of Terms

By using this MCP server, you acknowledge and agree to the following:

1. This server accesses AllTrails using your own signed-in session. It reuses the cookies from your own browser session; it cannot access anyone else's account or private data.

2. AllTrails' Terms of Service govern your use of this server, just as they govern your direct use of AllTrails. AllTrails restricts automated access and scraping, and fronts its API with bot protection. Automated use through this server may breach those terms. You are agreeing to AllTrails' terms every time you invoke a tool.

3. Personal use only. This project is not affiliated with, endorsed by, or sponsored by AllTrails, LLC. It is a personal automation tool. Do not use it to bulk-extract AllTrails' data, to build a competing product, or in any way that burdens their service.

4. You accept full responsibility for any consequences — technical (rate-limiting, CAPTCHA challenges, account action) or otherwise. The maintainer provides no warranty and no support.

This section is the maintainer's good-faith summary — it is not legal advice and does not modify or supersede AllTrails' actual ToS.

Installation

1. Clone and build

bash
git clone https://github.com/chrischall/alltrails-mcp.gitcd alltrails-mcpnpm installnpm run build

2. Add to Claude Desktop

Edit your Claude Desktop config file:

  • Mac: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json

Add the alltrails entry inside "mcpServers" (create the key if it doesn't exist):

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

Replace /absolute/path/to/alltrails-mcp with the path where you cloned the repo.

3. Restart Claude Desktop

Quit completely (Cmd+Q on Mac, not just close the window) and relaunch.

4. Verify

Ask Claude: "Search AllTrails for trails near me."

Authentication

AllTrails fronts its internal API with DataDome bot protection, and DataDome fingerprints the HTTP client itself — a cookie copied out of the browser and replayed from Node gets rejected even while the browser sails through. So the fetchproxy bridge is required: every API request runs as a same-origin fetch inside your own signed-in alltrails.com tab, reusing your authenticated session. There is no stored-cookie mode.

Requirements: the ContextMint Bridge browser extension installed (Chrome: download the chrome zip from the releases page and load it unpacked — use Chrome for now; Safari support will ship inside the ContextMint app, which has no public download yet), a signed-in alltrails.com tab open, and a one-time pair-code approval on first use (the trust persists).

ContextMint Bridge is the fetchproxy browser extension under its new name, from the same maintainer — fetchproxy's own README (https://github.com/chrischall/fetchproxy#extension) points to it. Its source is public at https://github.com/nullnet-app/contextmint-bridge: build it yourself, or check a release zip against the .sha256 file published beside it (shasum -a 256 -c contextmint-bridge-chrome-<version>.zip.sha256).

The x-at-key app key AllTrails' own client sends is never stored in this repo or your config — the server captures the live value from your tab's own API traffic on first need, keeps it in memory only, and re-captures automatically if AllTrails rotates it. The alltrails_healthcheck tool round-trips a probe through the bridge and tells you which hop broke.

Configuration

Env varRequiredPurpose
ALLTRAILS_USER_IDNoNumeric user id for the per-user tools; defaults to the signed-in user via /api/alltrails/me.
ALLTRAILS_WS_PORTNofetchproxy concentrator port (default 37149, shared by the whole fetchproxy fleet — override only for local dev/tests).
ALLTRAILS_LOCALE / ALLTRAILS_CALLERNoOverride the corresponding request headers.
ALLTRAILS_REQUEST_TIMEOUT_MSNoPer-request timeout in ms (default 30000), applied on both paths.
ALLTRAILS_DEBUG_LOGNo1/true/yes/on logs each request/response to stderr — method, path, status, response size, and a redacted 200-char request-body prefix (response bodies are never logged).

Available tools

All tools are read-only — this server never writes to AllTrails.

ToolWhat it does
alltrails_searchSearch AllTrails by trail or place name — free-text queries use the same suggestions endpoint as the alltrails.com search box (types: ["trail"] narrows to trails only)
alltrails_resolve_locationResolve a place name to AllTrails location records (country/state/city/area/POI) with each one's kind, coordinates, slug, and disambiguation label
alltrails_get_trailTrail details — name, overview, length, elevation gain, difficulty, rating, route type, location (detail: basic/medium/offline picks what AllTrails sends us)
alltrails_get_trail_reviewsUser reviews for a trail — {user, rating, comment} each
alltrails_get_trail_photosPhotos for a trail — slim records with a fetchable image url
alltrails_get_trail_gpxExport a trail's route as GPX 1.1 (track points + elevation)
alltrails_get_trail_weatherWeather overview for a trail
alltrails_get_profileThe signed-in user's profile
alltrails_list_user_listsA user's saved lists / favorites
alltrails_get_list_itemsThe trails saved in a list, by list id — ordered {trailId, type, order, notes, addedAt}, hydrate each via get_trail
alltrails_list_completed_trailsA user's completed trails
alltrails_get_activity_feedA user's activity feed (feed: local/timeline/personal for the items, omit for the directory; cursor paginates)
alltrails_healthcheckRound-trips a probe through the fetchproxy bridge and reports role/port/timing plus a plain-English hint about which hop broke

The per-user tools default to the signed-in user (resolved via /api/alltrails/me or ALLTRAILS_USER_ID); pass userId to target a public profile.

Response shape: view

alltrails_search, alltrails_get_trail, alltrails_get_trail_reviews, alltrails_get_trail_photos, alltrails_get_list_items and alltrails_get_activity_feed take a view parameter with two rungs (the feed has a third, brief):

viewWhat you get
compactThe default. The slim projection described in the table above — the fields a caller acts on. Nothing to pass.
fullAllTrails' whole untouched record.
briefalltrails_get_activity_feed only: one line per item, who: what — <ISO date | no date> — <recorded|reviewed|…>, reading the timeline feed when none is named. The context-groups (mcp-host) canonical what's new read.

Compact is the default deliberately. These projections existed before, behind compact: false and a tool description asking the caller to please opt in — and an efficiency that has to be requested is one that usually is not. Ask for view: "full" when you need a field the projection drops; the commonest is route geometry from alltrails_get_trail.

view is not detail. alltrails_get_trail also takes detail (basic/medium/offline), and that one is a passthrough to AllTrails — it decides what the API sends us. view decides what this server hands you. Route geometry needs both: detail: "offline" to fetch it and view: "full" to keep it. The collision is exactly why the fleet parameter is named view.

One projection is not a subset: alltrails_get_trail_photos' url is derived by the compact rung (AllTrails' record carries no image URL), so view: "full" does not contain it.

Troubleshooting

403 Forbidden — AllTrails' DataDome protection rejected the request. This usually means the tab isn't signed in (or DataDome is challenging it) — sign into alltrails.com in an open tab and retry.

"AllTrails bridge: …" — the bridge itself failed before reaching AllTrails (extension not running, pairing not approved, no tab). Run alltrails_healthcheck for a diagnosis, and check the ContextMint Bridge extension popup.

"AllTrails: capturing the x-at-key app key failed…" — the key is read off a request your tab makes while the call is waiting, and an idle tab makes none. Refreshing first does not help: the extension only listens for the duration of the call, so a reload that finished before it started happened while nothing was listening. Run the tool again and reload a signed-in www.alltrails.com tab while it is running.

Empty / unexpected results — the internal AllTrails endpoints are undocumented and change over time; responses may shift. Enable ALLTRAILS_DEBUG_LOG=1 to trace each request's method, path, status and response size on stderr.

Development

bash
npm test         # run the vitest suitenpm run build    # tsc → dist/, then esbuild bundle → dist/bundle.jsnpm run dev      # node --env-file=.env dist/index.js (requires built dist)

vitest.config.ts enforces 100% coverage on src/** (except the stdio entry point). Main is protected — all changes land via PR. See CLAUDE.md for the full PR + release flow.

Project structure

src/  index.ts          MCP server entry (runMcp + StdioServerTransport)  protocol.ts       Wire-level constants (BASE_URL, app key, headers)  transport.ts      createAllTrailsTransport(): the fetchproxy bridge transport  client.ts         AllTrailsClient — bridge requests, live x-at-key capture, 429 retry  config.ts         Env parsing (api key, headers, timeout, port, user id, debug)  validate.ts       parseAllTrails(): zod validation of responses at call sites  tools/    _shared.ts      Response helpers + resolveUserId    trails.ts       get_trail, reviews, photos, weather, gpx export    explore.ts      search, list by state/country    user.ts         profile, saved lists, completed trails, activity feed    healthcheck.ts  alltrails_healthcheck (bridge diagnostics)tests/              Mirrors src/; mocks AllTrailsClient.request via vi.spyOn

Request flow

Every API request runs as a same-origin fetch inside your signed-in alltrails.com tab, via the fetchproxy bridge (src/transport.ts, the shared createFetchproxyTransport factory). The browser carries its own cookies; the server attaches only the AllTrails protocol headers (x-at-key etc.), which an in-tab fetch doesn't add on its own. There is no Node-direct mode — DataDome fingerprints the HTTP client, so only in-tab requests are reliable.

See Authentication for installing the ContextMint Bridge extension.

License

MIT

來源:README.md,提交 0df6945

工具

13

alltrails_get_trail

Get AllTrails trail

Get details for a single AllTrails trail by its numeric trail id. Returns name, location, length, elevation gain, difficulty, rating, route type, and (at higher detail levels) route geometry. Returns a slim projection by default (name, overview, length in m+mi, elevation gain, difficulty, rating, route type, location); pass view:"full" for the whole record and geometry.

輸入參數viewdetailtrailId必填

alltrails_get_trail_reviews

Get AllTrails trail reviews

Get user reviews for an AllTrails trail by its numeric trail id. Returns just { user, rating, comment } per review by default; pass view:"full" for the whole records.

輸入參數viewlimittrailId必填

alltrails_get_trail_photos

Get AllTrails trail photos

Get photos for an AllTrails trail by its numeric trail id. Returns just { id, title, likeCount, user, uploadedAt, url } per photo by default — the url serves the actual image; pass view:"full" for the whole records.

輸入參數viewtrailId必填

alltrails_get_trail_gpx

Export AllTrails trail GPX

Export an AllTrails trail's route as a GPX 1.1 document (track points with per-point elevation), built from the trail's offline-detail route geometry. Returns raw GPX XML suitable for saving to a .gpx file or importing into navigation apps.

輸入參數trailId必填

alltrails_get_trail_weather

Get AllTrails trail weather

Get the weather overview for an AllTrails trail by its numeric trail id.

輸入參數trailId必填

alltrails_resolve_location

Resolve AllTrails location

Resolve a place name to AllTrails location records — country / state / city / area / point of interest — with each one's kind, coordinates, URL slug, and disambiguation label. Useful for pinning down which "Oregon" (state vs the towns) or getting a place's coordinates/slug. NOTE: the returned id is an Algolia search id and is NOT the id the trail-listing tools take; to find trails for a place, feed the resolved name back into alltrails_search.

輸入參數kindslimitquery必填

alltrails_get_profile

Get AllTrails profile

Get the signed-in AllTrails user profile (via /api/alltrails/me). Requires a signed-in session. Returns identity fields { id, username, slug, firstName, lastName, location, isPro } by default; pass view:"full" for the whole record (includes email and account settings).

輸入參數view

alltrails_list_user_lists

List AllTrails user lists

List an AllTrails user's saved lists (favorites, custom lists). Defaults to the signed-in user; pass a userId to target a specific public profile. Returns slim { id, name, itemCount, visibility } entries by default (feed an id to alltrails_get_list_items); pass view:"full" for the whole records.

輸入參數viewuserId

alltrails_get_list_items

Get AllTrails list items

Get the trails saved in an AllTrails list by its numeric list id (from alltrails_list_user_lists, or a public "list" record from alltrails_search). Items are sparse references: each carries a trailId (hydrate with alltrails_get_trail), the curator's order, and any notes — not trail details. Returns slim { trailId, type, order, notes, addedAt } entries sorted by order by default; pass view:"full" for the whole records.

輸入參數viewlistId必填

alltrails_list_completed_trails

List AllTrails completed trails

List the trails an AllTrails user has marked completed. Defaults to the signed-in user; pass a userId to target a specific public profile. Returns slim trail summaries (name, length, elevation, difficulty, rating) by default; pass view:"full" for the whole records.

輸入參數viewuserId

alltrails_get_activity_feed

Get AllTrails activity feed

Get an AllTrails user's activity feed (recorded hikes and posts). Defaults to the signed-in user; pass a userId to target a specific public profile. Without a feed argument this returns the feed DIRECTORY (the available feeds: local, timeline (following), personal (own posts)) — pass feed to get the actual items. Returns slim projections by default; pass view:"full" for the whole records, or view:"brief" for one line per item (brief reads the timeline when no feed is named).

輸入參數feedviewcursoruserIdmaxItems

alltrails_healthcheck

Verify the ContextMint Bridge connection end-to-end

Round-trips a small public www.alltrails.com URL (/api/alltrails/v3/trails/10236086?detail=basic) through ContextMint Bridge (your signed-in browser tab) and returns diagnostics: the bridge's role (host/peer/null), port, version, the extension link (linked / pair pending / not attached / never answered), the elapsed round-trip time, and a plain-English hint distinguishing 'bridge never came up' from 'extension not connected' from 'this browser can't serve a capability' from 'real www.alltrails.com-side problem'. Read-only, no auth required. Call this when a real tool fails and you want to know which hop broke.

無需輸入參數。

版本歷史

15
  1. v3.2.1最新Nov 4, 2026
  2. v3.1.11Oct 29, 2026
  3. v3.1.10Oct 17, 2026
  4. v3.1.9Oct 16, 2026
  5. v3.1.8Oct 10, 2026
  6. v3.1.7Oct 7, 2026
  7. v3.1.6Oct 5, 2026
  8. v3.1.5Oct 3, 2026
  9. v3.1.4Sep 28, 2026
  10. v3.1.3Sep 25, 2026
  11. v3.1.2Sep 23, 2026
  12. v3.1.1Sep 23, 2026
  13. v3.1.0Sep 20, 2026
  14. v3.0.0Sep 18, 2026
  15. v2.3.5Sep 16, 2026

評分

已滿足適用檢查項的 90%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分
  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具必需15 分
  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分