Next.js logo

CoachStack MCP Server

A Streamable HTTP Model Context Protocol (MCP) server for CoachStack, secured with Supabase JWT auth and powered by Microsoft Graph.

Getting Started

  1. Clone the repository and install dependencies with pnpm install
  2. Set up environment variables in .env:
    • SUPABASE_URL
    • SUPABASE_SERVICE_ROLE_KEY
    • SUPABASE_JWT_SECRET
    • MICROSOFT_CLIENT_ID / MICROSOFT_CLIENT_SECRET
  3. Run the development server with pnpm run dev
  4. Connect your MCP Client (Claude, Cursor, etc.) to http://localhost:3000/api/mcp

Key Features

  • 🔐
    Session Validation: Validates Supabase JWTs and extracts user context for per-user M365 calendar access.
  • 📅
    Calendar Tools: Create, update, cancel, and find availability on Microsoft 365 calendars via the Graph API.
  • 🔑
    M365 Connect: Coaches connect their Microsoft 365 account once via /api/connect-m365; tokens are stored securely in Supabase.