AllTrails

by srinath1510

Not rated
GitHub

About

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

Details

Author
srinath1510
Categories
Search, Other

Option 1: With Virtual Environment (Recommended)

This approach isolates dependencies and prevents conflicts with other Python projects.

git clone <your-repo-url> cd alltrails_mcp
python3 -m venv alltrails_mcp_venv source alltrails_mcp_venv/bin/activate # On Windows: alltrails_mcp_venv\Scripts\activate

Test that the server starts without errors:

You should see the server start without crashing. Press Ctrl+C to stop.

- Python 3.8 or higher
- This server can be used with any MCP-compatible client. I use Claude Desktop with Pro subscription.
- macOS (tested) or other Unix-like system

If you prefer not to use a virtual environment, you can install dependencies globally.

git clone <your-repo-url> cd alltrails_mcp

Test that the server starts without errors:

You should see the server start without crashing. Press Ctrl+C to stop.

This approach runs the server in an isolated container.

For Docker-based deployment, you can configure Claude Desktop to use the containerized server:

{ "mcpServers": { "alltrails_mcp_server": { "command": "docker", "args": ["run", "-i", "--rm", "alltrails-mcp"] } } }

Find your Claude Desktop configuration file:

- macOS:~/Library/Application Support/Claude/claude_desktop_config.json
- Windows:%APPDATA%\Claude\claude_desktop_config.json

If it doesn't exist, create a json file named claude_desktop_config.json in the above directory.

Add the following to yourclaude_desktop_config.jsonfile:

Option A: Using Virtual Environment (Recommended)

{ "mcpServers": { "alltrails_mcp_server": { "command": "/path/to/your/alltrails_mcp/alltrails_mcp_venv/bin/python3", "args": ["/path/to/your/alltrails_mcp/server.py"] } } }
{ "mcpServers": { "alltrails_mcp_server": { "command": "python3", "args": ["/path/to/your/alltrails_mcp/server.py"] } } }
{ "mcpServers": { "alltrails_mcp_server": { "command": "/usr/bin/python3", "args": ["/path/to/your/alltrails_mcp/server.py"] } } }

Important:Replace/path/to/your/alltrails_mcpwith the actual absolute path to your project directory.

For other MCP-compatible clients, refer to their documentation for server configuration. The server implements the standard MCP protocol and should work with any compliant client.

Server Command:python3 server.py
Communication:Standard input/output (stdio)
Protocol Version:MCP 1.9.4

cd /path/to/your/alltrails_mcp source alltrails_mcp_venv/bin/activate which python3

Use the output path in your configuration.

Dependencies are already installed in your virtual environment from step 3.

Completely quit and restart Claude Desktop for the changes to take effect.

Once configured, you can use these commands in Claude Desktop:

Find trails in Great Smoky Mountains National Park
What are the best hiking trails in Yosemite?
Show me moderate difficulty trails in Yellowstone
Search for trails in us/california/yosemite-national-park
Find family-friendly trails in Zion National Park
Get details for Alum Cave Trail to Mount LeConte
Get details for trail us/tennessee/alum-cave-trail-to-mount-leconte
I need detailed information about Rainbow Falls Trail including difficulty and elevation
Find the most popular trails in Grand Canyon National Park and give me details about the top rated one
Search for trails in Great Smoky Mountains and tell me which ones are best for beginners
I'm visiting Yellowstone for 3 days. Find me a mix of easy and moderate trails with good views

The MCP server works with natural language, so you can ask questions like:

- "What are some good day hikes in the Smoky Mountains?"
- "Find me a challenging trail with waterfalls in Tennessee"
- "I want to hike to a summit with 360-degree views"
- "Show me trails that are good for photography"
- "Find dog-friendly trails in national parks"
- "What's the difficulty level of Charlies Bunion trail?"

- Great Smoky Mountains:us/tennessee/great-smoky-mountains-national-park
- Yosemite:us/california/yosemite-national-park
- Yellowstone:us/wyoming/yellowstone-national-park
- Grand Canyon:us/arizona/grand-canyon-national-park
- Zion:us/utah/zion-national-park

cat ~/Library/Application\ Support/Claude/claude_desktop_config.json
cd /path/to/your/alltrails_mcp source alltrails_mcp_venv/bin/activate python3 server.py

- "Connection closed" errors: Usually indicates a Python path or virtual environment issue

Path configuration issues: Check that all paths in the config are absolute and correct

- Import errors: Ensure all dependencies are installed in the correct Python environment (virtual environment vs system Python)
- Python path errors: Usewhich python3orwhich pythonto verify the correct Python executable path

For detailed debugging, check the MCP logs:

# macOS tail -f ~/Library/Logs/Claude/mcp.log # The server also outputs debug information to stderr
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

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

- Built using theModel Context Protocol
- Trail data sourced from
AllTrails
- Inspired by the MCP community examples

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.

Search global news using natural language. Webz.io News Search API returns the most relevant articles and content, with filters for source, country, language, date, sentiment, and category.

Unlock geospatial intelligence through Mapbox APIs like geocoding, POI search, directions, isochrones and more.

Search and compare 184,900 beaches, lakes and swimming spots worldwide with current planning conditions and direct BeachFinder links.

Free business data API and MCP server. Find restaurants, cafes, hotels, shops and 37+ business categories in any city worldwide. Uses OpenStreetMap data. No API key required. REST API + MCP Streamable HTTP endpoint.

Provides access to the Israeli transport API for geocoding and transit directions.

Provides geolocation and nearby POI (Point of Interest) information using the Gaode Map API.

Provides geocoding services by integrating with the Nominatim API.

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, butthe code no longer works and should not be used.

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

- UseAllTrails' official website
- Contact AllTrails directly about API access
- Respect website Terms of Service and copyright

Original Description (For Historical Reference)

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

- 🥾Search trailsby national park
- 📍Get detailed trail informationincluding difficulty, length, elevation gain, and descriptions
- 🏔️Comprehensive trail datafrom AllTrails including ratings, route types, and summaries
- 🤖Seamless Client integrationvia MCP protocol

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

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

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

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

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

Option 1: With Virtual Environment (Recommended)

This approach isolates dependencies and prevents conflicts with other Python projects.

git clone <your-repo-url> cd alltrails_mcp
python3 -m venv alltrails_mcp_venv source alltrails_mcp_venv/bin/activate # On Windows: alltrails_mcp_venv\Scripts\activate

Test that the server starts without errors:

You should see the server start without crashing. Press Ctrl+C to stop.

- Python 3.8 or higher
- This server can be used with any MCP-compatible client. I use Claude Desktop with Pro subscription.
- macOS (tested) or other Unix-like system

If you prefer not to use a virtual environment, you can install dependencies globally.

git clone <your-repo-url> cd alltrails_mcp

Test that the server starts without errors:

You should see the server start without crashing. Press Ctrl+C to stop.

This approach runs the server in an isolated container.

For Docker-based deployment, you can configure Claude Desktop to use the containerized server:

{ "mcpServers": { "alltrails_mcp_server": { "command": "docker", "args": ["run", "-i", "--rm", "alltrails-mcp"] } } }

Find your Claude Desktop configuration file:

- macOS:~/Library/Application Support/Claude/claude_desktop_config.json
- Windows:%APPDATA%\Claude\claude_desktop_config.json

If it doesn't exist, create a json file named claude_desktop_config.json in the above directory.

Add the following to yourclaude_desktop_config.jsonfile:

Option A: Using Virtual Environment (Recommended)

{ "mcpServers": { "alltrails_mcp_server": { "command": "/path/to/your/alltrails_mcp/alltrails_mcp_venv/bin/python3", "args": ["/path/to/your/alltrails_mcp/server.py"] } } }
{ "mcpServers": { "alltrails_mcp_server": { "command": "python3", "args": ["/path/to/your/alltrails_mcp/server.py"] } } }
{ "mcpServers": { "alltrails_mcp_server": { "command": "/usr/bin/python3", "args": ["/path/to/your/alltrails_mcp/server.py"] } } }

Important:Replace/path/to/your/alltrails_mcpwith the actual absolute path to your project directory.

For other MCP-compatible clients, refer to their documentation for server configuration. The server implements the standard MCP protocol and should work with any compliant client.

Server Command:python3 server.py
Communication:Standard input/output (stdio)
Protocol Version:MCP 1.9.4

cd /path/to/your/alltrails_mcp source alltrails_mcp_venv/bin/activate which python3

Use the output path in your configuration.

Dependencies are already installed in your virtual environment from step 3.

Completely quit and restart Claude Desktop for the changes to take effect.

Once configured, you can use these commands in Claude Desktop:

Find trails in Great Smoky Mountains National Park
What are the best hiking trails in Yosemite?
Show me moderate difficulty trails in Yellowstone
Search for trails in us/california/yosemite-national-park
Find family-friendly trails in Zion National Park
Get details for Alum Cave Trail to Mount LeConte
Get details for trail us/tennessee/alum-cave-trail-to-mount-leconte
I need detailed information about Rainbow Falls Trail including difficulty and elevation
Find the most popular trails in Grand Canyon National Park and give me details about the top rated one
Search for trails in Great Smoky Mountains and tell me which ones are best for beginners
I'm visiting Yellowstone for 3 days. Find me a mix of easy and moderate trails with good views

The MCP server works with natural language, so you can ask questions like:

- "What are some good day hikes in the Smoky Mountains?"
- "Find me a challenging trail with waterfalls in Tennessee"
- "I want to hike to a summit with 360-degree views"
- "Show me trails that are good for photography"
- "Find dog-friendly trails in national parks"
- "What's the difficulty level of Charlies Bunion trail?"

- Great Smoky Mountains:us/tennessee/great-smoky-mountains-national-park
- Yosemite:us/california/yosemite-national-park
- Yellowstone:us/wyoming/yellowstone-national-park
- Grand Canyon:us/arizona/grand-canyon-national-park
- Zion:us/utah/zion-national-park

cat ~/Library/Application\ Support/Claude/claude_desktop_config.json
cd /path/to/your/alltrails_mcp source alltrails_mcp_venv/bin/activate python3 server.py

- "Connection closed" errors: Usually indicates a Python path or virtual environment issue

Path configuration issues: Check that all paths in the config are absolute and correct

- Import errors: Ensure all dependencies are installed in the correct Python environment (virtual environment vs system Python)
- Python path errors: Usewhich python3orwhich pythonto verify the correct Python executable path

For detailed debugging, check the MCP logs:

# macOS tail -f ~/Library/Logs/Claude/mcp.log # The server also outputs debug information to stderr
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

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

- Built using theModel Context Protocol
- Trail data sourced from
AllTrails
- Inspired by the MCP community examples

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.

Search global news using natural language. Webz.io News Search API returns the most relevant articles and content, with filters for source, country, language, date, sentiment, and category.

Unlock geospatial intelligence through Mapbox APIs like geocoding, POI search, directions, isochrones and more.

Search and compare 184,900 beaches, lakes and swimming spots worldwide with current planning conditions and direct BeachFinder links.

Free business data API and MCP server. Find restaurants, cafes, hotels, shops and 37+ business categories in any city worldwide. Uses OpenStreetMap data. No API key required. REST API + MCP Streamable HTTP endpoint.

Provides access to the Israeli transport API for geocoding and transit directions.

Provides geolocation and nearby POI (Point of Interest) information using the Gaode Map API.

Provides geocoding services by integrating with the Nominatim API.

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.