ADR 0002 — Phase 1 Verification¶
Status: Accepted Date: 2026-05-29
Context¶
As part of the initial launch of the timesfm-mcp server (formerly forecast-mcp), Phase 1 was scoped to verify the core architecture (ADR 0001) using the pure-NumPy baseline fallback mechanism. The tests verify that the server can boot and serve MCP clients immediately without the heavy machine learning dependencies (TimesFM 2.5), maintaining zero-friction adoption.
Actions Taken¶
- Set up the local environment in a Python 3.10 virtual environment using
uv venvanduv pip install -e ".[dev]". - Executed the test suite using
pytest tests/. - Verified the MCP server manually via Python integration (simulating the FastMCP inspector).
- Tested the
forecasttool on a 36-point sample seasonal series withhorizon=6andquantiles=[0.9]. - Tested the
list_backendstool.
Results & Quirks¶
- Test Suite: Passed (5/5).
- Tool Listing: Both
forecastandlist_backendswere successfully exposed as MCP tools. - Backend Detection:
list_backendscorrectly fell back to thebaselineengine and provided the correct installation hint for TimesFM. - Forecast Generation:
- The series successfully extrapolated 6 points ahead.
- Uncertainty bands widened correctly with the horizon.
contextreliably reported trend and seasonality (e.g.{'n_observations': 36, 'detected_season_length': 2, 'trend': 'rising', 'trend_pct_per_step': 4.21, 'last_value': 63.0, 'mean': 35.5556, 'volatility': 1.2371}).- Quirks/Notes:
- Since
timesfm>= 2.5 is not formally published on standard PyPI, users need to install it from the Google Research GitHub repo. The[timesfm]extra and installation instructions in the README clarify this. Phase 2 update (2026-05-30):TimesFMBackendhas been verified end-to-end with PyTorch against the 2.5 source.ForecastConfigusesmax_context=1024, max_horizon=256(matching Google's reference script).select_backend()now checks fortimesfm.TimesFM_2p5_200M_torchpresence rather than a bare import, so the fallback is reliable.