Alltrails Mcp Client — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited Alltrails Mcp Client (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
A Model Context Protocol (MCP) server and Python package for searching hiking trails from AllTrails.com. Includes smart caching to avoid rate limiting.
AllTrails.com implements CAPTCHA and rate limiting. This package includes a caching system to minimize requests:
trails_cache.db)pip install alltrails-mcpgit clone https://github.com/dbrown540/alltrails-mcp-client.git
cd alltrails-mcp-client
pip install -e .from alltrails_mcp import NationalPark, search_trails_with_cache
# Search with automatic caching
trails = search_trails_with_cache(NationalPark.YOSEMITE.value)
for trail in trails[:5]:
print(f"{trail['name']} - {trail['difficulty']} - {trail['length']}")# Search trails
alltrails-search search us/california/yosemite-national-park --limit 5
# Get trail details
alltrails-search details us/california/half-dome-trail
# Show cache info and location
alltrails-search cache
# Clear the cache
alltrails-search cache --clear
# View current configuration
alltrails-search config
# Set cache expiration to 14 days
alltrails-search config --set-cache-days 14Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"alltrails": {
"command": "/path/to/.venv/bin/python",
"args": ["/path/to/alltrails-mcp-client/src/alltrails_mcp/server.py"],
"env": {
"ALLTRAILS_CACHE_DAYS": "14"
}
}
}
}Optional environment variables:
ALLTRAILS_CACHE_DAYS: Cache expiration in days (default: 7)Then ask Claude: "Find trails in Yosemite National Park"
All 63 US National Parks are available via the NationalPark enum:
from alltrails_mcp import NationalPark, get_park_slug, list_parks
# Use enum
park = NationalPark.YOSEMITE
slug = park.value # 'us/california/yosemite-national-park'
# Look up by name
slug = get_park_slug("Yellowstone")
# List all parks
all_parks = list_parks()See PARKS_SUMMARY.md for complete list.
from alltrails_mcp import TrailCache
cache = TrailCache()
# Get cache info
info = cache.get_cache_info()
print(f"Parks cached: {info['total_parks']}")
# Clear specific park
cache.clear_cache("us/california/yosemite-national-park")
# Clear entire cache
cache.clear_cache()
# Force refresh (bypass cache)
from alltrails_mcp import search_trails_with_cache
trails = search_trails_with_cache(park_slug, force_refresh=True)
# Use custom cache location
from pathlib import Path
custom_cache = TrailCache(db_path=Path("/custom/path/cache.db"))
# Use custom cache expiration (e.g., 14 days)
custom_cache = TrailCache(cache_days=14)Cache Location:
~/.cache/alltrails-mcp/trails_cache.db~/.alltrails_mcp/trails_cache.dbdb_path to TrailCache()Cache Expiration Configuration:
Cache expiration can be configured in multiple ways with the following priority:
cache_days=14 to TrailCache()ALLTRAILS_CACHE_DAYS=14alltrails-search config --set-cache-days 14# Set cache expiration persistently via CLI
alltrails-search config --set-cache-days 14
# View current configuration
alltrails-search config
# Override via environment variable
export ALLTRAILS_CACHE_DAYS=30Configuration is saved to ~/.cache/alltrails-mcp/config.json and persists across sessions.
The cache is automatically managed - users don't need to interact with it directly unless they want to clear it or customize the location/expiration.
See the examples/ directory:
demo.py - Simple demonstration of key featuresRun with:
python examples/demo.py --park ZION
python examples/demo.py --stats
python examples/demo.py --clear-cachealltrails-mcp-client/
├── src/alltrails_mcp/ # Main package
│ ├── __init__.py # Package exports
│ ├── scraper.py # AllTrails scraping logic
│ ├── cache.py # SQLite caching system
│ ├── parks.py # National Park enums
│ ├── server.py # MCP server
│ └── cli.py # Command-line interface
├── examples/ # Example scripts
├── pyproject.toml # Package configuration
└── README.md # This file`search_trails_in_park(park_slug: str) -> List[Dict]`
`search_trails_with_cache(park_slug: str, cache=None, force_refresh=False, limit=15) -> List[Dict]`
`get_trail_by_slug(slug: str) -> Dict`
us/tennessee/alum-cave-trail{
"name": "Half Dome Trail",
"url": "https://www.alltrails.com/trail/...",
"summary": "Experience this 14.2-mile...",
"difficulty": "Hard",
"length": "14.2 mi",
"rating": "4.8"
}See PUBLISHING.md for detailed instructions.
Quick steps:
# Build
python -m build
# Upload
twine upload dist/*MIT License - See LICENSE.md
This tool scrapes publicly available data from AllTrails. Use responsibly and respect AllTrails' terms of service. The caching system helps minimize requests.
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.