Skip to content

v0.4.0 - Architecture Improvements & Package Restructure

Latest

Choose a tag to compare

@belgrano9 belgrano9 released this 24 Nov 08:57

🚀 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
  • LogContext for operation timing

Bug Fixes

  • Fixed Unicode encoding error for Spanish station names (á, é, í, ó, ú, ñ)

⚠️ Breaking Changes

  • Entry point changed: python main.pypython -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