Provides access to hiking trail data including search capabilities by national park and detailed trail information such as difficulty, length, elevation gain, ratings, route types, and descriptions.
AllTrails MCP Server
A Model Context Protocol (MCP) server that provides access to AllTrails data, allowing you to search for hiking trails and get detailed trail information directly through Claude Desktop.
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 formatus/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/
)
Installation Options
Option 1: With Virtual Environment (Recommended)
This approach isolates dependencies and prevents conflicts with other Python projects.
1. Clone the Repository
2. Create Virtual Environment
3. Install Dependencies
4. Verify Installation
Test that the server starts without errors:
You should see the server start without crashing. Press Ctrl+C to stop.
Prerequisites
- 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
Option 2: With System Python
If you prefer not to use a virtual environment, you can install dependencies globally.
1. Clone the Repository
2. Install Dependencies Globally
3. Verify Installation
Test that the server starts without errors:
You should see the server start without crashing. Press Ctrl+C to stop.
Claude Desktop Configuration
1. Locate Claude Desktop Config
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.
2. Add MCP Server Configuration
Add the following to your claude_desktop_config.json
file:
Option A: Using Virtual Environment (Recommended)
Option B: Using System Python
Or with absolute Python path:
Important: Replace /path/to/your/alltrails_mcp
with the actual absolute path to your project directory.
Other MCP Clients
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
3. Find Your Python Path
For Virtual Environment Users:
For System Python Users:
Use the output path in your configuration.
4. Install Dependencies
If Using Virtual Environment:
Dependencies are already installed in your virtual environment from step 3.
If Using System Python:
Install dependencies globally:
5. Restart Claude Desktop
Completely quit and restart Claude Desktop for the changes to take effect.
Usage Examples
Once configured, you can use these commands in Claude Desktop:
Search for Trails
By park name:
By location:
With specific criteria:
Using park slugs directly:
For specific activities:
Get Trail Details
By trail name:
Using trail slugs:
For planning purposes:
Combination Queries
Search and get details:
Compare trails:
Trip planning:
Natural Language Examples
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?"
Common Park Slugs
- 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
Troubleshooting
Server Not Connecting
- Check the logs:
- Verify your config file:
- Test the server manually:
Common Issues
- "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: Use
which python3
orwhich python
to verify the correct Python executable path
Debug Mode
For detailed debugging, check the MCP logs:
Project Structure
How It Works
- 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
License
MIT License
Copyright (c) 2025 Srinath Srinivasan
Acknowledgments
- Built using the Model Context Protocol
- Trail data sourced from AllTrails
- Inspired by the MCP community examples
Note: This tool scrapes publicly available data from AllTrails. Please use responsibly and in accordance with AllTrails' terms of service.
This server cannot be installed
A Model Context Protocol (MCP) server that provides access to publicly available AllTrails data, allowing you to search for hiking trails and get detailed trail information directly through Claude Desktop.
Related MCP Servers
- AsecurityAlicenseAqualityA Model Context Protocol (MCP) server for web research. Bring real-time info into Claude and easily research any topic.Last updated -3525269JavaScriptMIT License
- -securityFlicense-qualityA Model Context Protocol server built with mcp-framework that allows users to create and manage custom tools for processing data, integrating with the Claude Desktop via CLI.Last updated -325TypeScript
- AsecurityAlicenseAqualityA Model Context Protocol (MCP) server that enables Claude or other LLMs to fetch content from URLs, supporting HTML, JSON, text, and images with configurable request parameters.Last updated -31PythonMIT License
- AsecurityAlicenseAqualityA Model Context Protocol (MCP) server that enables Claude to use Monte Carlo Tree Search algorithms for deep, explorative analysis of topics, questions, or text inputs.Last updated -63PythonMIT License