🚀 What's New
Package Restructure
- Migrated from flat module layout to proper
src/renfe_mcp/package structure - Added hatchling build system for proper packaging
- New entry point:
python -m renfe_mcp.server
Centralized Configuration
- Pydantic-based configuration with environment variable support
- All settings use
RENFE_prefix (e.g.,RENFE_API_KEY,RENFE_DEV_MODE) - Validation and type safety for all configuration options
Exception Hierarchy
- Comprehensive exception classes:
StationNotFoundError,NetworkError,RateLimitError, etc. - Machine-readable error codes and structured error details
- Better error messages for debugging
Structured Logging
- Correlation IDs for request tracing
- Colored console output
LogContextfor operation timing
Bug Fixes
- Fixed Unicode encoding error for Spanish station names (á, é, í, ó, ú, ñ)
⚠️ Breaking Changes
- Entry point changed:
python main.py→python -m renfe_mcp.server - Imports changed:
from main import ...→from renfe_mcp.server import ... - Update your Claude Desktop config to use the new command
📦 Installation
git clone https://github.com/belgrano9/renfe_mcp_server.git
cd renfe_mcp_server
uv sync
uv run python -m renfe_mcp.server🔧 Configuration
.env file
RENFE_DEV_MODE=true # Disable auth for development
RENFE_LOG_LEVEL=DEBUG # Set log level