agentleFS
AntVslAntVsl/oura_mcp/AGENTS.md

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.

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
  1. Very specific:

    Never print, commit, or put real values from .env, .oura/, bearer headers, or OAuth tokens into tests, documentation, fixtures, logs, or …

    line 17
  2. Very specific:

    Do not broaden OURA_OAUTH_ALLOWED_REDIRECT_ORIGINS without an explicit, reviewed client origin.

    line 19
  3. Distinctive:

    Read the relevant module and its tests before changing behavior.

    line 35
  4. Distinctive:

    Add or update a regression test whenever externally observable behavior, OAuth policy, parsing, cache behavior, packaging, or documentation …

    line 45
  5. Distinctive:

    Run the narrow test first, then the full gate:

    line 48
  6. Distinctive:

    When changing transport, authentication, metadata, or setup instructions, verify the appropriate surface:

    line 61
  7. Very specific:

    Keep tests network-free: mock Oura with respx and call MCP tools through mcp.call_tool() when testing the protocol boundary.

    line 78
  8. Distinctive:

    Treat refresh tokens as single-use.

    line 81
  9. Common:

    Use configuration defaults only for non-secret values.

    line 83
  10. Very specific:

    Update both READMEs when user-facing setup or supported clients change.

    line 89

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

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 stdio or an authenticated HTTP endpoint.
  • Claude.ai and ChatGPT use the public streamable-http endpoint 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

PathResponsibility
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.jsonMCP Registry manifest; version must match pyproject.toml
compose*.yml, DockerfileProduction HTTP deployment

Read the relevant module and its tests before changing behavior. Prefer a small focused patch; do not reformat unrelated files.

Standard workflow

  1. Inspect git status --short first and preserve unrelated working-tree changes.
  2. State the owned files and acceptance criteria in the task brief from docs/agents/task-template.md for any change larger than a one-file fix.
  3. Add or update a regression test whenever externally observable behavior, OAuth policy, parsing, cache behavior, packaging, or documentation contract changes.
  4. Run the narrow test first, then the full gate:

    uv lock --check
    uv run pytest -q
    git diff --check
  5. 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:

SurfaceRequired check
Local stdiouv run my-oura-mcp install; both Claude and Codex commands remain valid
Remote HTTP/healthz, /mcp authentication, and OAuth discovery routes
Claude.ai / ChatGPTPublic HTTPS URL, dynamic registration allowlist, consent page wording
Registry / packageserver.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, async for network I/O.
  • Keep tests network-free: mock Oura with respx and call MCP tools through mcp.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.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.