Public
Remote MCP server wrapping the Oura Ring API v2 for Claude
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
A remote MCP server that lets Claude (web + iPhone) read your Oura Ring data. It wraps the Oura API v2, handles the one-time Oura OAuth2 flow, and stores the refresh token in Val Town blob storage so it survives restarts.
Rendering mermaid diagram...
main.ts— HTTP entrypoint / router (/,/auth,/callback,/mcp/<secret>)mcp.ts— MCP JSON-RPC handler and the tool catalogueoura.ts— Oura token storage/refresh + authenticated GET helper
At https://cloud.ouraring.com/oauth/applications, create an application. Set the Redirect URI to your val's callback URL:
https://<your-val-url>/callback
Grab the Client ID and Client Secret.
This val needs three env vars:
| Key | Value |
|---|---|
OURA_CLIENT_ID | from your Oura OAuth app |
OURA_CLIENT_SECRET | from your Oura OAuth app |
MCP_SECRET | a long random string you invent — guards the endpoint |
Visit https://<your-val-url>/auth?key=<MCP_SECRET> in a browser, approve access, and
you'll see "✅ Connected to Oura."
Add this as a custom connector / MCP server in Claude:
https://<your-val-url>/mcp/<MCP_SECRET>
- The MCP URL itself is the credential — the
MCP_SECRETpath segment is unguessable. Wrong secrets and wrong methods return a plain404, indistinguishable from any miss. /authis gated behind?key=<MCP_SECRET>so randoms can't start the flow or overwrite your stored tokens.- The root
/returns a bareokunless?key=<MCP_SECRET>is supplied, in which case it shows connection status and ready-to-copy URLs.
get_daily_sleep, get_daily_readiness, get_daily_activity, get_daily_stress,
get_daily_spo2, get_sleep, get_workouts, get_sessions, get_heartrate,
get_personal_info.