MO

madebydia/oura-mcp-server

Developer tools

Эта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал

9 stars 17 forks Качество 62 Тренд 21MIT

Oura MCP server for poke.com and other agents.

Обзор

MCP (Model Context Protocol) server that enables AI assistants to access your Oura Ring health data through OAuth2-authenticated API calls. Built for seamless integration with Poke and other MCP-compatible clients. Deploy to Railway for production use or run locally for development. - - Secure authentication with automatic token refresh - - Access sleep, readiness, activity, heart rate, workouts, and more - - Both SSE and Streamable HTTP transports - - AES-256-GCM encryption for OAuth tokens at rest - - Reduce API calls with intelligent data caching - - Built-in protection against API quota exhaustion - - Easy remote access for mobile and cloud integrations - Node.js 18 or higher - Oura Ring (all generations supported - Gen 2, Gen 3, and Gen 4) - Oura account with API access - Railway account (recommended for production deployment) or ngrok (for local development) 1.

README

Показан фрагмент оригинального README. Открыть оригинал.

Oura MCP Server

MCP (Model Context Protocol) server that enables AI assistants to access your Oura Ring health data through OAuth2-authenticated API calls.

Built by @madebydia

Built for seamless integration with Poke and other MCP-compatible clients. Deploy to Railway for production use or run locally for development.

Features

  • OAuth2 with PKCE - Secure authentication with automatic token refresh
  • 9 MCP Tools - Access sleep, readiness, activity, heart rate, workouts, and more
  • Dual Transport Support - Both SSE and Streamable HTTP transports
  • Token Encryption - AES-256-GCM encryption for OAuth tokens at rest
  • Smart Caching - Reduce API calls with intelligent data caching
  • Rate Limiting - Built-in protection against API quota exhaustion
  • ngrok Support - Easy remote access for mobile and cloud integrations

Prerequisites

  • Node.js 18 or higher
  • Oura Ring (all generations supported - Gen 2, Gen 3, and Gen 4)
  • Oura account with API access
  • Railway account (recommended for production deployment) or ngrok (for local development)

Installation

  1. Clone the repository:
git clone https://github.com/madebydia/oura-mcp-server.git
cd oura-mcp-server
  1. Install dependencies:
npm install
  1. Copy the example environment file:
cp .env.example .env
  1. Generate required secrets:
# Generate AUTH_TOKEN
openssl rand -hex 32

# Generate TOKEN_ENCRYPTION_KEY
openssl rand -hex 32

Step 1: Deploy to Railway

  1. Click the button below to deploy to Railway:

Or manually:

  • Go to Railway
  • Create new project from GitHub repo
  • Connect your fork of this repository
  1. Generate required secrets locally:
# Generate AUTH_TOKEN
openssl rand -hex 32

# Generate TOKEN_ENCRYPTION_KEY
openssl rand -hex 32
  1. In Railway dashboard, add environment variables:

    • AUTH_TOKEN - Your generated auth token
    • TOKEN_ENCRYPTION_KEY - Your generated encryption key
    • NODE_ENV - Set to production
    • CORS_ORIGIN - Set to * or your specific domain
    • PORT - Leave unset (Railway will auto-assign)
  2. Wait for deployment to complete and note your Railway URL (e.g., https://your-app.up.railway.app)

Step 2: Register Oura OAuth Application

  1. Go to https://cloud.ouraring.com/oauth/applications
  2. Click “Create New Application”
  3. Fill in:
    • Application Name: “Personal MCP Server” (or your choice)
    • Redirect URI: https://your-app.up.railway.app/oauth/callback
    • Scopes: Select all available scopes
  4. Save the Client ID and Client Secret

Step 3: Configure OAuth Credentials in Railway

Открыть полный README на GitHub

Установка

docker run -p 3001:3001 --env-file .env oura-mcp-server
Новичок в MCP? Начните с руководства на mcpskill.org →