oura_mcp
AGENTS.md0 starsChanged 4 months agoMITView on GitHub
This file applies to the entire repository. It is the source of truth for Codex and other coding agents; more-specific AGENTS.md files would override it for their directory. my-oura-mcp is a privacy-sensitive MCP server for Oura Ring data. Preserve the same public tool schema and response shape for every client: - Claude Code and Codex use local stdio or an authenticated HTTP endpoint. - Claude.ai and ChatGPT use the public streamable-http endpoint and OAuth. - The server summarizes consumer health…
- Reads credentials
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 35,196 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository2 other files it gives its agents.
- oura-mcp-maintenanceSkill
- ouraSkill
The file
We split this AGENTS.md into the rules it gives an agent
10 rules. About 1 is common, 5 are distinctive, and 4 are very specific to this project.
≈1
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Very specific: line 17
Never print, commit, or put real values from .env, .oura/, bearer headers, or OAuth tokens into tests, documentation, fixtures, logs, or …
- Very specific: line 19
Do not broaden OURA_OAUTH_ALLOWED_REDIRECT_ORIGINS without an explicit, reviewed client origin.
- Distinctive: line 35
Read the relevant module and its tests before changing behavior.
- Distinctive: line 45
Add or update a regression test whenever externally observable behavior, OAuth policy, parsing, cache behavior, packaging, or documentation …
- Distinctive: line 48
Run the narrow test first, then the full gate:
- Distinctive: line 61
When changing transport, authentication, metadata, or setup instructions, verify the appropriate surface:
- Very specific: line 78
Keep tests network-free: mock Oura with respx and call MCP tools through mcp.call_tool() when testing the protocol boundary.
- Distinctive: line 81
Treat refresh tokens as single-use.
- Common: line 83
Use configuration defaults only for non-secret values.
- Very specific: line 89
Update both READMEs when user-facing setup or supported clients change.
≈ “Common” is an estimate: at least 1 in 5 of the 45,344 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Agent guide
This file applies to the entire repository. It is the source of truth for
Codex and other coding agents; more-specific AGENTS.md files would override
it for their directory.
Mission and boundaries
my-oura-mcp is a privacy-sensitive MCP server for Oura Ring data. Preserve
the same public tool schema and response shape for every client:
- Claude Code and Codex use local
stdioor an authenticated HTTP endpoint. - Claude.ai and ChatGPT use the public
streamable-httpendpoint and OAuth. - The server summarizes consumer health data; do not add diagnosis, treatment, or medical claims to tools, prompts, skills, or documentation.
Never print, commit, or put real values from .env, .oura/, bearer headers,
or OAuth tokens into tests, documentation, fixtures, logs, or issue text.
Do not broaden OURA_OAUTH_ALLOWED_REDIRECT_ORIGINS without an explicit,
reviewed client origin. It is an OAuth redirect allowlist, not a convenience
setting.
Repository map
| Path | Responsibility |
src/my_oura_mcp/ | Server, OAuth, Oura client, cache, output shaping |
tests/ | Offline unit and MCP protocol tests |
skills/oura/ | Client-neutral Oura analysis recipes; keep medical boundary |
skills/oura-mcp-maintenance/ | Focused maintenance skill for this repository |
docs/ | Deployment, design decisions, and agent workflow |
server.json | MCP Registry manifest; version must match pyproject.toml |
compose*.yml, Dockerfile | Production HTTP deployment |
Read the relevant module and its tests before changing behavior. Prefer a small focused patch; do not reformat unrelated files.
Standard workflow
- Inspect
git status --shortfirst and preserve unrelated working-tree changes. - State the owned files and acceptance criteria in the task brief from
docs/agents/task-template.mdfor any change larger than a one-file fix. - Add or update a regression test whenever externally observable behavior, OAuth policy, parsing, cache behavior, packaging, or documentation contract changes.
Run the narrow test first, then the full gate:
uv lock --check uv run pytest -q git diff --check- Report changed files, verification output, and any known limitation. Do not stage, commit, push, publish, or deploy unless explicitly asked.
Cross-client compatibility
When changing transport, authentication, metadata, or setup instructions, verify the appropriate surface:
| Surface | Required check |
Local stdio | uv run my-oura-mcp install; both Claude and Codex commands remain valid |
| Remote HTTP | /healthz, /mcp authentication, and OAuth discovery routes |
| Claude.ai / ChatGPT | Public HTTPS URL, dynamic registration allowlist, consent page wording |
| Registry / package | server.json, package version, wheel marker, README ownership token |
ChatGPT is a remote-MCP client: do not document a local ChatGPT connection. Codex supports both local stdio and remote HTTP. Keep this distinction clear in README and deployment documentation.
Code conventions
- Python 3.12+, typed public interfaces,
asyncfor network I/O. - Keep tests network-free: mock Oura with
respxand call MCP tools throughmcp.call_tool()when testing the protocol boundary. - Preserve explicit timezone handling and deterministic chronological ordering.
- Treat refresh tokens as single-use; never introduce concurrent writers to a token store.
- Use configuration defaults only for non-secret values. Validate public URLs as HTTPS and redirect origins as origins, not full paths.
Documentation conventions
The primary README is English; README.ru.md and docs/DEPLOY.md are Russian.
Update both READMEs when user-facing setup or supported clients change. Link
deeper process guidance rather than duplicating it. See
docs/agents/README.md for task and review templates.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

