{"id":30901352,"url":"https://github.com/nwthomas/oura-ring-mcp-server","last_synced_at":"2026-06-19T08:32:36.099Z","repository":{"id":313268519,"uuid":"1047602933","full_name":"nwthomas/oura-ring-mcp-server","owner":"nwthomas","description":"Oura Ring API model context protocol implementation","archived":false,"fork":false,"pushed_at":"2026-03-26T23:22:06.000Z","size":1319,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-27T08:35:37.869Z","etag":null,"topics":["llm","mcp","model-context-protocol-server","oauth2","oura-ring","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nwthomas.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2025-08-30T19:37:11.000Z","updated_at":"2026-03-26T23:22:07.000Z","dependencies_parsed_at":"2025-09-05T00:11:13.043Z","dependency_job_id":"d46a459c-277f-4f6d-b265-bec1d1a34915","html_url":"https://github.com/nwthomas/oura-ring-mcp-server","commit_stats":null,"previous_names":["nwthomas/oura-ring-mcp-server"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/nwthomas/oura-ring-mcp-server","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nwthomas%2Foura-ring-mcp-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nwthomas%2Foura-ring-mcp-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nwthomas%2Foura-ring-mcp-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nwthomas%2Foura-ring-mcp-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nwthomas","download_url":"https://codeload.github.com/nwthomas/oura-ring-mcp-server/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nwthomas%2Foura-ring-mcp-server/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34523982,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-19T02:00:06.005Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["llm","mcp","model-context-protocol-server","oauth2","oura-ring","python"],"created_at":"2025-09-09T06:56:02.047Z","updated_at":"2026-06-19T08:32:36.093Z","avatar_url":"https://github.com/nwthomas.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003e NOTE: This project has been updated to use OAuth2 ahead of Oura Ring's deprecation of Personal Access Tokens (PATs). Because of that, this MCP will work for you in 2026 (and beyond) after following the setup steps.\n\n# Oura Ring MCP Server\n\nThis repository contains a Model Context Protocol (MCP) implementation wrapping calls to the Oura Ring API. It can be used by any LLM that implements the MCP client protocol in order to interface with it. It's currently setup to run locally.\n\n## Table of Contents\n\n- [Setup](#setup)\n\n  - [Oura Ring Application Setup](#oura-ring-application-setup)\n  - [Server Setup](#server-setup)\n  - [Claude Desktop Setup](#claude-desktop-setup)\n\n- [Oura Ring API Overview](#oura-ring-api-overview)\n- [Built With](#built-with)\n- [Resources](#resources)\n\n## Setup\n\n### Oura Ring Application Setup\n\nYou'll have to jump through a few hooks initially to authorize this server as an \"app\" with Oura Ring as well as to have access to your account, but it should be smooth sailing after initial setup.\n\nThis server doesn't have a front-end by design (as your AI model - using something like Claude Desktop - will be the puppeteer after setup), so a few of the initial steps that would normally be a flow in a web/mobile app will be manual.\n\nFirst, go to the [Oura Ring Developer Applications Dashboard](https://developer.ouraring.com/applications) and sign up your new MCP server application. You should \"Add New\" and fill it out like this:\n\n![Oura Ring Developer Dashboard new application](./assets/oura-ring-new-application.png)\n\nFor the above picture, there's a field for \"Redirect URIs\" which is a webhook callback URL. Unless you run a webhook service of your own, you can use [Webhook.site](https://webhook.site) for a quick test link. Copy the \"Your unique URL\" from the below screenshot into the \"Redirect URIs\" in the above screenshot on the Oura Ring new application dashboard:\n\n![Webhook.site callback url dashboard](./assets/webhook-site-example.png)\n\nDon't close the `webhook.site` url tab down yet.\n\nNext, click \"Create Application\" for the Oura Ring new application flow. You'll then see the dashboard list your `Client id` and `Client secret`. Copy those into your local `.env` (using the `.env.example` file I included in this repository) for the `OURA_RING_CLIENT_ID` and `OURA_RING_CLIENT_SECRET` values.\n\nThen, copy the `Example Authorization Url` from the Oura Ring Application Dashboard and open it in a tab in your browser. You'll be doing the OAuth2 flow manually to get your token. Approve all permissions with the \"Submit Consent\" button:\n\n![Oura Ring Connect with Oura](./assets/oura-ring-submit-consent.pn.png)\n\nAfter you do that, the `webhook.site` dashboard will update with a callback that just got made to their service. Grab the `code` from that (below is a non-functional example token) and set it as the `OURA_RING_USER_CODE` value:\n\n![webhook.site callback code example](./assets/webhook-site-callback-code.pn.png)\n\nCongratulations, you now have all the secrets setup you need locally to proceed with using the MCP server. The actual access/refresh token fetch is automatic when you're using the MCP server.\n\n\u003e NOTE: If the `tokens.json` file - which stores your tokens locally and is _not_ checked into Git - gets deleted, you'll need to do this setup again. Oura Ring made it so that you can only get a `refresh_token` and `access_token` set from a user's code token once. Thereafter, you can only fetch new `access_token`s with the `refresh_token`. If you lose the `refresh_token`, it's game over and you'll have to do this setup again.\n\n### Server Setup\n\nFirst, you'll need to ensure that you have `uv` and the right Python versions.\n\nRun these commands (assuming you don't already have them installed):\n\n```sh\n# Install uv\ncurl -LsSf https://astral.sh/uv/install.sh | sh\nuv --version\n\n# First, install pyenv\nbrew update\nbrew install pyenv\ncurl https://pyenv.run | bash\n\n# Then, add these to your shell\nexport PATH=\"$HOME/.pyenv/bin:$PATH\"\neval \"$(pyenv init -)\"\neval \"$(pyenv virtualenv-init -)\"\n\n# Restart your shell using one of these commands\nsource ~/.zshrc\nsource ~/.bashrc\n\n# Install Python 3.14.0 in Pyenv and set it as global\npyenv install 3.14.0\npyenv global 3.14.0\n\n# Finally, verify via these commands\npython --version\npyenv version\n```\n\nNext, you'll need to setup the environment for this repository and install dependencies. You can do that with this command (assuming you already completed the above Python version and `uv` install process) as `uv` automatically manages the virtual environment:\n\n```sh\n# Synchronize dependencies inside an automatic virtual environment\nmake sync\n```\n\nFinally, you can run the project with the following command:\n\n```sh\nmake run\n```\n\n### Claude Desktop Setup\n\nThis MCP server is currently setup to be run/accessed by a model locally (on your local computer with something like [Claude Desktop](https://claude.com/download)). You can follow the [Anthropic local MCP server](https://modelcontextprotocol.io/docs/develop/connect-local-servers) setup options to run it locally. It will integrate with any LLM that has MCP client wrappers setup.\n\nIn order to use this MCP server, you will need to register with the Oura Ring developer portal and get your own keys to plug into a `.env` file (copied over from the `.env.example`). See earlier steps in this `README` file for that.\n\nIf you're using [Claude Desktop](https://claude.com/download), you can easily set up the connection to this repo (after adding the appropriate environment variables to your `.env` file) by [following this guide](https://modelcontextprotocol.io/docs/develop/connect-local-servers). For brevity, here's a snippet you can add to your `claude_desktop_config.json` file that will work for this repository:\n\n```json\n{\n  \"mcpServers\": {\n    \"oura-ring\": {\n      \"command\": \"/Users/\u003cyour username here\u003e/.local/bin/uv\",\n      \"args\": [\n        \"--directory\",\n        \"/Users/\u003cyour username here\u003e/\u003cpath to repository here\u003e/oura-ring-mcp-server\",\n        \"run\",\n        \"main.py\"\n      ]\n    }\n  }\n}\n```\n\nThis MCP server will work with other agents, but you will need to figure out the connections. Any setup following the MCP client protocol should be able to utilize it.\n\n## Oura Ring API Overview\n\nDifferent data has different sync policies for different types of data they collect:\n\n- Sleep data only syncs when users open the app\n- Daily activity and stress sync in the background without using the app\n\nThis can explain any descrepencies you see when your LLM tries to fetch most recent data. You might not have the most recent sleep data available until you (as a human) open up your Oura Ring app next.\\\n\nMore information can be found in the [Oura Ring API Documentation](https://cloud.ouraring.com/v2/docs), particularly the section on [core concepts](https://cloud.ouraring.com/v2/docs#section/Core-Concepts)).\n\n## Built With\n\n- [MCP Python SDK](https://github.com/modelcontextprotocol/python-sdk)\n- [Pydantic](https://docs.pydantic.dev/latest/)\n- [Pytest](https://docs.pytest.org/en/stable/)\n- [uv](https://github.com/astral-sh/uv)\n\n## Resources\n\n- [Model Context Protocol overview](https://modelcontextprotocol.io/docs/getting-started/intro), [architecture concepts](https://modelcontextprotocol.io/docs/learn/architecture), and [MCP server concepts](https://modelcontextprotocol.io/docs/learn/server-concepts)\n- [Model Context Protocol Github repository](https://github.com/modelcontextprotocol) and [Python SDK](https://github.com/modelcontextprotocol/python-sdk/tree/main)\n- [Oura Ring API Documentation](https://cloud.ouraring.com/v2/docs)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnwthomas%2Foura-ring-mcp-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnwthomas%2Foura-ring-mcp-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnwthomas%2Foura-ring-mcp-server/lists"}