Oura Ring Mcp Python — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited Oura Ring Mcp Python (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
A Python implementation of a Model Context Protocol (MCP) server for accessing Oura Ring health data with OAuth2 authentication.
# Clone or download this repository
cd oura-mcp-python
# Create virtual environment (recommended)
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install the package
pip install -e .cd oura-mcp-python
uv pip install -e .Personal MCP Serverhttp://localhost:8000/oauth/callbackcp .env.example .env # copy the template
# then edit .env with your credentialsNote:.envis gitignored;.env.exampleis the committed template.
# Run this in Python to generate TOKEN_ENCRYPTION_KEY
import secrets
print("TOKEN_ENCRYPTION_KEY:", secrets.token_hex(32))Edit your .env file:
# Oura OAuth Credentials
OURA_CLIENT_ID=your_client_id_here
OURA_CLIENT_SECRET=your_client_secret_here
OURA_REDIRECT_URI=http://localhost:8000/oauth/callback
# Token Encryption
TOKEN_ENCRYPTION_KEY=<generated_encryption_key>
# Server Configuration (optional; defaults shown)
HOST=0.0.0.0
PORT=8000# Using the installed command
oura-mcp
# Or directly with Python
python -m oura_mcp.server
# Or with uvicorn for development
uvicorn oura_mcp.server:create_app --factory --reload --port 8000http://localhost:8000/oauth/authorizeCheck the health endpoint:
curl http://localhost:8000/healthExpected response:
{
"status": "healthy",
"oauth_connected": true,
"server": "Oura MCP Server (Python)",
"version": "1.0.0"
}Add this to your Claude Desktop config file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"oura": {
"command": "npx",
"args": ["-y", "mcp-remote", "http://localhost:8000/mcp"],
"env": {
"API_KEY": "YOUR_AUTH_TOKEN_HERE"
}
}
}
}Alternative: Direct stdio connection (if running locally)
{
"mcpServers": {
"oura": {
"command": "python",
"args": ["-m", "oura_mcp.server"],
"cwd": "/path/to/oura-mcp-python",
"env": {
"OURA_CLIENT_ID": "your_client_id",
"OURA_CLIENT_SECRET": "your_client_secret",
"OURA_REDIRECT_URI": "http://localhost:8000/oauth/callback"
}
}
}
}Restart Claude Desktop after saving.
Get user's personal information and ring details.
Get sleep data for a date range.
Parameters:
start_date (required): YYYY-MM-DDend_date (optional): YYYY-MM-DDinclude_detailed (optional): Include detailed sleep period dataGet daily readiness scores.
Parameters:
start_date (required): YYYY-MM-DDend_date (optional): YYYY-MM-DDGet activity data for a date range.
Parameters:
start_date (required): YYYY-MM-DDend_date (optional): YYYY-MM-DDGet heart rate data in 5-minute intervals.
Parameters:
start_datetime (required): ISO 8601 format (e.g., 2024-01-01T00:00:00)end_datetime (optional): ISO 8601 formatGet workout sessions.
Parameters:
start_date (required): YYYY-MM-DDend_date (optional): YYYY-MM-DDGet user-created tags and notes.
Parameters:
start_date (required): YYYY-MM-DDend_date (optional): YYYY-MM-DDGet guided and unguided session data.
Parameters:
start_date (required): YYYY-MM-DDend_date (optional): YYYY-MM-DDGet aggregated health insights based on recent data.
Parameters:
days (optional): Number of days to analyze (default: 7)Check if the Oura account is connected and tokens are valid.
GET /healthGET /oauth/authorize - Start OAuth flow
GET /oauth/callback - OAuth callback (automatic)
GET /oauth/status - Get connection status
POST /oauth/disconnect - Disconnect and clear tokensPOST /mcp - MCP JSON-RPC endpoint (Streamable HTTP)Run on your machine with the server accessible at localhost.
OURA_REDIRECT_URI to your deployed URLFROM python:3.11-slim
WORKDIR /app
COPY . .
RUN pip install -e .
EXPOSE 8000
CMD ["oura-mcp"]docker build -t oura-mcp-python .
docker run -p 8000:8000 --env-file .env oura-mcp-python/oauth/authorize to connect your Oura account.envTOKEN_ENCRYPTION_KEY hasn't changedPOST /oauth/disconnect) and reconnectingOURA_REDIRECT_URI exactly matches what's configured in your Oura OAuth applicationhttp://localhost:8000/oauth/callbackcurl http://localhost:8000/healthmcp-remote is available: npx -y mcp-remote --helppip install -e ".[dev]"
pytestruff format .
ruff check --fix .MIT
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.