
madebydia/oura-mcp-server
Developer toolsЭта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал
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
- Clone the repository:
git clone https://github.com/madebydia/oura-mcp-server.git
cd oura-mcp-server
- Install dependencies:
npm install
- Copy the example environment file:
cp .env.example .env
- Generate required secrets:
# Generate AUTH_TOKEN
openssl rand -hex 32
# Generate TOKEN_ENCRYPTION_KEY
openssl rand -hex 32
Quick Start - Railway Deployment (Recommended)
Step 1: Deploy to Railway
- 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
- Generate required secrets locally:
# Generate AUTH_TOKEN
openssl rand -hex 32
# Generate TOKEN_ENCRYPTION_KEY
openssl rand -hex 32
-
In Railway dashboard, add environment variables:
AUTH_TOKEN- Your generated auth tokenTOKEN_ENCRYPTION_KEY- Your generated encryption keyNODE_ENV- Set toproductionCORS_ORIGIN- Set to*or your specific domainPORT- Leave unset (Railway will auto-assign)
-
Wait for deployment to complete and note your Railway URL (e.g.,
https://your-app.up.railway.app)
Step 2: Register Oura OAuth Application
- Go to https://cloud.ouraring.com/oauth/applications
- Click “Create New Application”
- 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
- Save the Client ID and Client Secret
Step 3: Configure OAuth Credentials in Railway
Установка
docker run -p 3001:3001 --env-file .env oura-mcp-server