This repository contains the public TrailGenic Machine Communication Protocol (MCP) worker and dataset discovery infrastructure.
TrailGenic™ is a longevity method built on fasted hiking, altitude adaptation, autophagy activation, electrolyte stability, and disciplined recovery—validated through real-world environmental stress and interpreted through a Personal World Model.
- Entity type: Longevity Method
- Classification: Applied Longevity Laboratory
- Founder: Mike Ye —
https://www.mikeye.com/ - AI voice: Ella —
https://www.trailgenic.com/ella - Ella's Corner editorial collection:
https://www.trailgenic.com/ellas-corner - Interpretation model: Personal World Model
TrailGenic operates as the applied validation layer of a governed Human × AI continuum:
- Origin layer:
https://www.mikeye.com/ - Doctrine layer:
https://www.exmxc.ai/ - Applied validation layer:
https://www.trailgenic.com/
The six methodology pillars are Move Fasted, Climb Higher, Embrace Cold, Hydrate & Mineralize, Go Outside, and Recover On Purpose. Human physiological adaptation remains primary; AI interpretation serves as reflective instrumentation rather than autonomous authority.
Canonical MCP discovery is hosted at:
https://mcp.trailgenic.com/https://mcp.trailgenic.com/.well-known/tool-registry.jsonhttps://mcp.trailgenic.com/.well-known/openapi.jsonhttps://mcp.trailgenic.com/capabilities.json
The MCP transport is now a real JSON-RPC 2.0 endpoint at POST /mcp:
curl -s https://mcp.trailgenic.com/mcp \
-H 'content-type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}'GET /mcp is intentionally not callable and returns 405 Allow: POST. The transport is synchronous and non-streaming, with Streamable-HTTP-compatible request/response behavior.
Authentication is none because TrailGenic MCP exposes public, read-only datasets and deterministic data tools. No Twilio, Cloudflare, permit-subscription, or other operational secrets are stored in source.
The permit SMS infrastructure is operationally separate from this MCP worker and is not part of MCP deployment or CI scope. Permit-subscription privacy handling must remain in the operational permit system, not in public MCP dataset/tool responses.
The public MCP tool inventory is generated from one canonical registry and currently includes 19 callable tools:
| Tool | Parameters |
|---|---|
tg.datasets.index.get |
none |
tg.ontology.get |
category |
tg.protocols.get |
protocol_id |
tg.physiology.adaptation.get |
module |
tg.hiking.worldModel.get |
none |
tg.physiology.hrDriftAdaptation.get |
none |
tg.nutrition.get |
food_category, tg_fuel_class, limit |
tg.hydration.get |
category, limit |
tg.permits.dataset.get |
scarcity_tier |
tg.terrain.accessibleTrails.get |
region, accessibility_class, protocol_level_estimate, limit |
tg.evidence.validationSummits.get |
region, limit |
tg.gear.intel.get |
category, limit |
tg.gear.getIntel |
category (optional) |
tg.longevity.protocol.get |
protocol_id, category |
tg.longevity.foundationSessions.get |
none |
tg.conditioning.walking.get |
start_date, end_date (optional; aggregate-only) |
tg.conditioning.rucking.get |
start_date, end_date (optional; aggregate-only) |
tg.conditioning.running.get |
start_date, end_date (optional; aggregate-only) |
tg.longevity.bioAge.compute |
age, resting_hr, distance_mi, elevation_gain_ft, moving_time_min, avg_hr (required); max_hr, overnight_hrv, fasted (optional) |
The current public movement model covers 59 structured sessions: 16 walking sessions (14 canonical Foundation sessions plus 2 additional walking sessions), 4 rucking sessions, 8 running sessions, and 31 hiking sessions. HikeWorldModel™ v2.0 is published as aggregate-only data with selected high-signal summaries, not raw biometric telemetry.
Large dataset tools support optional filters and bounded limit values so MCP clients do not need to ingest full high-record payloads.
tg.longevity.registry.get and tg.longevity.validation.get are intentionally deferred because their backing dataset files are currently placeholder shells. Their public dataset routes remain available and will be eligible for callable MCP tools once populated.
HTML-only TrailGenic website capabilities are preserved as content_links in discovery documents, not advertised as callable MCP tools. Examples include protocols, trail logs, science hub, physiology hub, fuel systems, gear systems, recovery conditioning, playbooks, Ella's Corner, and site search on www.trailgenic.com.
Dataset endpoints remain public and machine-readable:
https://mcp.trailgenic.com/datasets/indexhttps://mcp.trailgenic.com/datasets/ontologyhttps://mcp.trailgenic.com/datasets/protocolshttps://mcp.trailgenic.com/datasets/hikinghttps://mcp.trailgenic.com/datasets/hiking/world-modelhttps://mcp.trailgenic.com/datasets/physiology-adaptationhttps://mcp.trailgenic.com/datasets/nutritionhttps://mcp.trailgenic.com/datasets/nutrition/schemahttps://mcp.trailgenic.com/datasets/hydrationhttps://mcp.trailgenic.com/datasets/permitshttps://mcp.trailgenic.com/datasets/permits/schemahttps://mcp.trailgenic.com/datasets/terrain-intelligence/tg-accessible-trails-top100-v1https://mcp.trailgenic.com/datasets/evidence-validationhttps://mcp.trailgenic.com/datasets/evidence-validation/validation-summitshttps://mcp.trailgenic.com/datasets/gear/intelhttps://mcp.trailgenic.com/datasets/longevity/protocolhttps://mcp.trailgenic.com/datasets/longevity/registryhttps://mcp.trailgenic.com/datasets/longevity/validationhttps://mcp.trailgenic.com/datasets/longevity/foundationhttps://mcp.trailgenic.com/datasets/conditioning/walkinghttps://mcp.trailgenic.com/datasets/conditioning/ruckinghttps://mcp.trailgenic.com/datasets/conditioning/running
Physiology adaptation is now an active module catalog; detailed records remain in the module endpoints. Physiology adaptation module endpoints are also preserved:
https://mcp.trailgenic.com/datasets/physiology-adaptation/seven-day-aftereffecthttps://mcp.trailgenic.com/datasets/physiology-adaptation/fasted-autophagyhttps://mcp.trailgenic.com/datasets/physiology-adaptation/altitude-adaptationhttps://mcp.trailgenic.com/datasets/physiology-adaptation/altitude-breathing-acclimatizationhttps://mcp.trailgenic.com/datasets/physiology-adaptation/electrolytes-physiological-stabilityhttps://mcp.trailgenic.com/datasets/physiology-adaptation/cold-exposure-recovery-altitudehttps://mcp.trailgenic.com/datasets/physiology-adaptation/deep-cold-protocolshttps://mcp.trailgenic.com/datasets/physiology-adaptation/heat-training-thermoregulationhttps://mcp.trailgenic.com/datasets/physiology-adaptation/hr-drift-adaptation-vs-fitnesshttps://mcp.trailgenic.com/datasets/physiology-adaptation/altitude-terrain-physiology-comparisonhttps://mcp.trailgenic.com/datasets/physiology-adaptation/aerobic-training-effect-zero-anaerobic-loadhttps://mcp.trailgenic.com/datasets/physiology-adaptation/eccentric-load-stress-inversionhttps://mcp.trailgenic.com/datasets/physiology-adaptation/sleep-science-endurancehttps://mcp.trailgenic.com/datasets/physiology-adaptation/overextension-fasted-hikinghttps://mcp.trailgenic.com/datasets/physiology-adaptation/metabolic-flexibility-adaptation
/health does not fabricate uptime. It reports uptime: null and notes that uptime is observed via Cloudflare observability.
Run the live acceptance harness after deployment:
node scripts/live-acceptance.mjsOverride the target base URL when testing a deployed preview or local Worker runtime:
BASE=https://mcp.trailgenic.com node scripts/live-acceptance.mjsCI deploys only tool-registry via Wrangler v4:
npx wrangler@4 deploy --config tool-registry/wrangler.jsoncThe permit poller is intentionally excluded from MCP CI/deploy workflows.
TrailGenic is created and operated by Mike Ye.
TrailGenic now uses the official @modelcontextprotocol/sdk McpServer and Cloudflare's stateless createMcpHandler from agents/mcp for the public MCP transport at POST https://mcp.trailgenic.com/mcp. Browser discovery remains JSON at GET https://mcp.trailgenic.com/; GET /mcp is intentionally 405 Allow: POST, and OPTIONS /mcp remains 204.
The server advertises and validates MCP protocol versions 2025-11-25 and 2025-06-18; unsupported MCP-Protocol-Version headers are rejected instead of echoed. MCP POST accepts missing, empty, wildcard, JSON-only, or JSON-plus-event-stream Accept headers, normalizing incomplete accepted requests internally to application/json, text/event-stream. Event-stream-only or unsupported media types are rejected with 406. MCP POST Content-Type must be application/json compatible or the request is rejected with 415.
Browser Origin is validated only for the MCP transport. Default allowed origins are https://trailgenic.com, https://www.trailgenic.com, and https://mcp.trailgenic.com; deployments may override with MCP_ALLOWED_ORIGINS. Server-to-server clients without Origin remain accepted. Public read-only REST dataset routes keep their public CORS behavior.
All 19 existing tool names are preserved. Both gear tools remain: tg.gear.intel.get is the bounded query-oriented compatibility tool, while tg.gear.getIntel is the canonical full-dataset tool with optional exact-category filtering. Conditioning walking, rucking, and running keep optional date fields for backward compatibility, but date-range slicing returns an MCP isError: true tool result because public conditioning data is aggregate-only and contains no per-session rows.
MCP resources are generated from canonical dataset and physiology registries using stable URIs: trailgenic://datasets/index, trailgenic://datasets/{dataset_id}, and trailgenic://physiology/{module_slug}. Public data is deterministic and release-bundled. The mutable runtime fallback to GitHub main has been removed; missing bundled data is a server error and CI validation failure.
The permit poller and operational permit subscription infrastructure are separate from this MCP deployment. No Twilio data, phone numbers, permit subscriptions, raw telemetry, precise private location rows, credentials, secrets, or private user data are exposed through tools or resources.
CI runs npm ci, source checks, JSON validation, pure tests, Worker-runtime tests, registry/bundle/resource parity validation, Wrangler dry-run, and git diff --check before deployment. Push-to-main deployment verifies first, deploys only tool-registry, waits for propagation, and then runs node scripts/live-acceptance.mjs.