Labsco
srinath1510 logo

AllTrails

โ˜… 12

from srinath1510

Search for hiking trails and get detailed trail information from AllTrails.

๐Ÿ”ฅโœ“ VerifiedFreeAdvanced setup

AllTrails MCP Server

Trust Score

CI Python

โš ๏ธ DEPRECATED - PROJECT ARCHIVED

This project has been deprecated and is no longer functional.

Date: January 25, 2026
Reason: This project violated AllTrails' Terms of Service by scraping their website without authorization.

At the request of AllTrails' CTO, all scraping functionality has been disabled. This repository is maintained for historical purposes only and to preserve GitHub stars, but the code no longer works and should not be used.

What Happened?

AllTrails contacted me regarding this repository, citing:

  • Unauthorized scraping/data extraction in violation of their Terms of Service
  • Potential intellectual property violations
  • Redistribution of copyrighted content without a license

Alternatives

If you need trail data, please:


Original Description (For Historical Reference)

A Model Context Protocol (MCP) server that provides access to AllTrails data [DEPRECATED - NO LONGER FUNCTIONAL].

Features

  • ๐Ÿฅพ Search trails by national park
  • ๐Ÿ“ Get detailed trail information including difficulty, length, elevation gain, and descriptions
  • ๐Ÿ”๏ธ Comprehensive trail data from AllTrails including ratings, route types, and summaries
  • ๐Ÿค– Seamless Client integration via MCP protocol

Technical Specifications

Protocol Support

  • Protocol Version: MCP 1.9.4
  • Communication: Standard input/output (stdio)
  • Capabilities: Tools
  • Server Name: alltrails-mcp
  • Server Version: 0.1.0

Tools Available

search_trails

Search for trails in a specific national park using AllTrails data.

Parameters:

  • park (required): Park slug in format us/state/park-name (e.g., us/tennessee/great-smoky-mountains-national-park)

get_trail_details

Get detailed information about a specific trail by its AllTrails slug.

Parameters:

  • slug (required): Trail slug from AllTrails URL (the part after /trail/)

Development

Running Tests

Run the test suite using pytest:

pytest

Linting

Format and check code using ruff:

ruff check .
ruff format .

Project Structure

alltrails_mcp/
โ”œโ”€โ”€ app/
โ”‚   โ””โ”€โ”€ alltrails_scraper.py    # AllTrails scraping logic
โ”œโ”€โ”€ examples/
โ”‚   โ””โ”€โ”€ claude_desktop_config.json  # Example configuration file for Claude Desktop
โ”œโ”€โ”€ tests/                      # Test suite
โ”‚   โ”œโ”€โ”€ conftest.py             # Test fixtures
โ”‚   โ””โ”€โ”€ test_scraper.py         # Scraper tests
โ”œโ”€โ”€ server.py                   # MCP server implementation
โ”œโ”€โ”€ requirements.txt            # Python dependencies
โ”œโ”€โ”€ pyproject.toml              # Project configuration (Ruff, Pytest)
โ”œโ”€โ”€ alltrails_mcp_venv/         # Virtual environment
โ”œโ”€โ”€ README.md                   # This file
โ””โ”€โ”€ .gitignore                  # Git ignore file

How It Works

  1. MCP Protocol: Uses the Model Context Protocol to communicate with Claude Desktop
  2. Web Scraping: Scrapes AllTrails website for trail data using BeautifulSoup
  3. Data Processing: Formats and returns trail information in a structured format
  4. Tool Integration: Exposes tools that Claude can call to search and retrieve trail data

โš ๏ธ IMPORTANT NOTICE

This project is DEPRECATED and non-functional as of January 25, 2026.

The scraping functionality violated AllTrails' Terms of Service and has been completely disabled at their request. This repository exists only for historical/educational purposes.

DO NOT attempt to use, fork, or replicate this code for scraping AllTrails or any other website without explicit written permission from the website owner.

Respect Terms of Service. Respect copyright. Use official APIs when available.