Skip to main content
Glama
apex-mcp-server

apex-mcp-server

by sac2665

apex-mcp-server

A read-only Model Context Protocol server for the Apex Rides API, deployed as a Cloudflare Worker. It authenticates against AWS Cognito with a service account and exposes four read-only tools over MCP's Streamable HTTP transport.

Tools

Tool

Description

popular_classes

Top popular workouts by session count in a date range.

search_classes

Search workouts with filters (paginated).

get_class

Detailed info for a single on-demand class.

list_instructors

List all instructors (including archived).

All tools are GET-based. There are no write operations and no generic passthrough.

Related MCP server: garmin-mcp

Setup & Deploy

1. Install

npm install

2. Set secrets

npx wrangler secret put APEX_SERVICE_PASSWORD   # the Cognito service user password
npx wrangler secret put MCP_SHARED_SECRET       # a strong random string

For local development, create a .dev.vars file (git-ignored) with the same keys:

APEX_SERVICE_PASSWORD=...
MCP_SHARED_SECRET=...

3. Deploy

npx wrangler deploy

Usage

Connect an MCP client to the worker's MCP endpoint, with the shared secret as the first path segment:

https://<worker>.workers.dev/<MCP_SHARED_SECRET>/mcp

Any request whose first path segment is missing or does not match MCP_SHARED_SECRET gets a 401.

The transport is MCP Streamable HTTP (a single endpoint handles both the GET stream and POST messages). The legacy Node-only SSE transport does not run on Cloudflare Workers, so it is not used here.

Notes & Guardrails

  • No client secret. SECRET_HASH is omitted entirely since the Cognito app client has no secret.

  • Token caching. The access token is cached in module scope and refreshed via REFRESH_TOKEN_AUTH when near expiry.

  • Date validation. popular_classes validates from/to against YYYY-MM-DD and appends T23:59:59Z to include the full final day.

  • Name search. Since the Apex API has no text search, search_classes fetches up to 500 results and filters client-side when name is provided.

  • Read-only enforcement. Only the four GET-based tools above are implemented.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      D
      maintenance
      A stateless MCP server for Cloudflare Workers that exposes read-only Garmin Connect data (activities, health, sleep, training status, HRV, VO2 max) for a single securely linked personal account.
      -
    • A
      license
      Not graded
      quality
      B
      maintenance
      Remote MCP server for Garmin Connect on Cloudflare Workers (free tier), providing 139 tools and 5 resources covering activities, health, training, workouts, nutrition, challenges, devices, gear, weight, women's health, courses, FIT-file analysis, and user profile, with OAuth 2.1 login flow.
      854 npm
      1
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Deploys to Cloudflare Workers as a read-only MCP server that lets authorized GitHub users query only the repositories where its GitHub App is installed, with 32 read operations covering code, commits, pull requests, issues, Actions, artifacts, and organization members.
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      A remote MCP server that gives MCP clients read-only, OAuth-authenticated access to Google Health API data such as activity, sleep, heart, body, nutrition and ECG records. It exposes tools for profiles, paired devices, data points, daily summaries and time-window rollups, and is deployed on Cloudflare Workers.
      55 npm
      1
      MIT