Borrowing it
Nothing to install: this file belongs to chrischall/alltrails-mcp. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/chrischall/alltrails-mcp/main/CLAUDE.mdgit clone --depth 1 https://github.com/chrischall/alltrails-mcpWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/instructions/chrischall/alltrails-mcp/claude-md)<a href="https://agentmods.dev/instructions/chrischall/alltrails-mcp/claude-md"><img src="https://agentmods.dev/badge/instructions/chrischall/alltrails-mcp/claude-md/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/instructions/chrischall/alltrails-mcp/claude-md"><img src="https://agentmods.dev/badge/instructions/chrischall/alltrails-mcp/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.05189 | $0.05189 |
| Opus 5 | $0.02594 | $0.02594 |
| Sonnet 5 | $0.01038 | $0.01038 |
| Haiku 4.5 | $0.00519 | $0.00519 |
Grade A, and why
alltrails-mcp CLAUDE.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 160 lines — stays where its author put it; the contents beside it link to each section on GitHub.
alltrails-mcp
Unofficial MCP server for AllTrails. Read-only access to trail search, trail details, reviews, photos, weather, and a signed-in user's saved lists / completed trails / activity feed. stdio transport.
AllTrails has no public API. This reverse-engineers the internal one (alltrails.com), which is fronted by DataDome bot protection and governed by AllTrails' ToS. It may break at any time and automated use may violate their terms. This project is one of a fleet of sibling MCP servers (ofw-mcp is the canonical template); it copies that fleet's auth/validation/packaging patterns.
Commands
npm run build # tsc → dist/, then esbuild bundle → dist/bundle.js
npm test # vitest run (all tests)
npm run test:watch # vitest in watch mode
npm run dev # node --env-file=.env dist/index.js (requires built dist)
dist/ is gitignored — it is produced at build/release time and shipped in the npm package (package.json files).
Architecture
src/
index.ts MCP server entry — runMcp() from @chrischall/mcp-utils (builds McpServer, applies registrars with client as deps, prints banner, wires shutdown + stdio transport)
protocol.ts Wire-level constants (BASE_URL, embedded x-at-key app key, header/UA defaults)
transport.ts createAllTrailsTransport(): the fetchproxy bridge transport (createFetchproxyTransport, port 37149, domains alltrails.com, defaultSubdomain www, createServer test seam)
client.ts AllTrailsClient — bridge requests (transport.fetch inside the signed-in tab), live x-at-key capture (memory-only), 429 wait-and-replay, non-JSON interstitial guard
config.ts env-driven header/UA/api-key/user-id/timeout/ws-port/debug getters
validate.ts parseAllTrails(): zod validation of AllTrails responses at call sites (lenient reads / strict where a mistype must halt)
gpx.ts decodePolyline() (generalized Google polyline varint decoder) + trailToGpx() (offline-detail route geometry → GPX 1.1) + OfflineTrailSchema
tools/
_shared.ts response helpers + resolveUserId (arg → ALLTRAILS_USER_ID → /api/alltrails/me users[0].id) + the compact projections, applied BY DEFAULT via the fleet `view` param (summarizeTrail/TrailDetail/Review/Photo/SearchResult/FeedItem/ListItem/Location + their loose schemas + ALLTRAILS_VIEWS)
trails.ts get_trail, get_trail_reviews, get_trail_photos, get_trail_weather, get_trail_gpx
explore.ts search, resolve_location (suggestions → place records: kind/coords/slug)
user.ts get_profile, list_user_lists, get_list_items (GET /lists/{id}/items — sparse trailId refs), list_completed_trails, get_activity_feed (feed?: local|timeline|personal follows the actual feed; omitted → directory)
healthcheck.ts alltrails_healthcheck via registerBridgeHealthcheckTool (probes a real trail-detail path through the client)
tests/ mirrors src/; mocks AllTrailsClient.request via vi.spyOn; client tests inject a stub FetchproxyTransport; transport tests use the createServer seam
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 3d ago Changed · +12 lines · +583 tokens per session aeb9dd41a632
- 8d ago First seen · 148 lines · 4,606 tokens per session scan A e7c58a3a2300
alltrails-mcp CLAUDE.md is an instructions file published in the GitHub repository chrischall/alltrails-mcp (0 stars, last pushed today), licensed MIT. It adds 5,189 tokens to every session, about $0.0259 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other instructions, from other repositories
next.js AGENTS.md
AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.
codex AGENTS.md
AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.
vscode buildNext.instructions.md
Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).
vscode oss-third-party-notices.instructions.md
Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).
langchain AGENTS.md
AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.
deepseek-harness AGENTS.md
AGENTS.md instructions for deepseek-ai/deepseek-harness, covering agents.md, pre-stable apis and released session data, repository layout, commands and host sandbox failures.