stremio-mcp: Instructions file for Codex

AGENTS.md

stremio-mcp AGENTS.md is an instructions file for Codex, OpenCode from netixc/stremio-mcp. It costs 1,406 tokens per session, scanned A, original, MIT.

A project instruction file for the stremio-mcp Python repository. It records the required setup, test, compilation, build, and change-checking commands.

In plain words
What is it for?
Setting up the repository with uv, running unit tests, compiling source and tests, building the package, and choosing checks based on which files changed.
Why use it?
It gives coding agents the project’s expected verification process and Python-version constraints. This reduces the chance of making changes without running the checks used by the project.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md.

This is netixc/stremio-mcp's own configuration. It tells Codex and OpenCode how to work on stremio-mcp itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything stremio-mcp configures →

Reuse

Borrowing it

Nothing to install: this file belongs to netixc/stremio-mcp. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/netixc/stremio-mcp/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/netixc/stremio-mcp

Made for: Codex, OpenCode.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for stremio-mcp AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/netixc/stremio-mcp/agents-md/github.svg)](https://agentmods.dev/instructions/netixc/stremio-mcp/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/netixc/stremio-mcp/agents-md"><img src="https://agentmods.dev/badge/instructions/netixc/stremio-mcp/agents-md/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for stremio-mcp AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/netixc/stremio-mcp/agents-md"><img src="https://agentmods.dev/badge/instructions/netixc/stremio-mcp/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,406 This file is loaded in full into every session.
When invoked 1,406 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.01406 $0.01406
Opus 5.5 $0.00562 $0.00562
Sonnet 5.5 $0.00281 $0.00281
Haiku 4.5 $0.00141 $0.00141

Measured 2mo ago against content hash 18a788ec0270, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

stremio-mcp AGENTS.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

AGENTS.md · 51 lines

How it starts

The opening of the file, as written. The whole thing — 51 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Project Instructions

Authoritative commands

Run commands from the repository root with Python 3.10+ and uv installed.

  • Locked setup: uv sync --locked. This creates or updates .venv from uv.lock; it may download packages but does not use TMDB, Stremio, or ADB credentials.
  • Unit tests: uv run --locked python -m unittest discover -s tests -v.
  • Source compilation: uv run --locked python -m compileall -q src tests.
  • Package build: uv build. This creates ignored artifacts under dist/.
  • Full CI-equivalent verification: run locked setup, unit tests, source compilation, and package build in that order. CI runs the first three checks on Python 3.10 through 3.14 and builds on 3.12.
  • These checks provide no linting, type checking, or coverage gate. Existing unit tests mock dispatch boundaries and do not contact TMDB, Stremio, or an Android device.

Change-to-check mapping

  • Changes to src/stremio_mcp.py or tests/ → run unit tests and source compilation.
  • Changes to pyproject.toml or uv.lock → run uv sync --locked, unit tests, and uv build.
  • Packaging or Python-version compatibility changes → run the full CI-equivalent verification; consult .github/workflows/ci.yml for the supported Python matrix.

Project-specific constraints

  • pyproject.toml and uv.lock are the install and CI dependency sources. Keep them synchronized when dependencies change.
  • Runtime configuration is read from environment variables when src/stremio_mcp.py is imported. TMDB_API_KEY enables network search, STREMIO_AUTH_KEY enables credentialed library access, and ANDROID_TV_HOST enables commands to a physical Android TV.
  • Do not run live MCP calls or ADB commands with real configuration as routine verification: search and library reads contact external services; library add/remove mutates the user's Stremio account; playback, navigation, volume, and power mutate a physical device.
  • All outbound HTTP goes through the single AsyncHTTPClient in src/stremio_mcp.py. Never add a synchronous HTTP call or a per-call client: synchronous I/O in an async MCP handler blocks the event loop and freezes unrelated device controls, and a second client escapes the configured timeout, response-size, and pool bounds. Every request needs explicit connect/read/write/pool timeouts.
  • Credentials must never reach a log record, a traceback, or a returned MCP error. Describe network failures with the category/host/status that HTTPClientError.summary() produces; never log a prepared URL, a request payload, or a raw upstream exception. redact_secrets() and SecretRedactingFilter are the backstop, not the primary defence. Prove any new failure path with a sentinel-secret test.
  • Library mutations require an explicit IMDb ID and content type, use _id for Stremio datastore identity, preserve watch state on re-add/remove, and verify each write with a follow-up read. Cover these boundaries with mocks; never use a real account for routine tests.
  • Library reads return typed outcomes (LibraryRead/LibraryListRead/MetaRead) that separate an authoritative not-found from an error. Mutations must fail closed: abort without writing on any read error, _id mismatch, duplicate row, unrequested extra row, or type mismatch. Never infer "absent" from a failed read.
  • Native adb is the transport boundary. Modern Android Wireless Debugging uses TLS (STLS), which pure-Python ADB clients (including the former adb-shell dependency) do not support; do not replace native ADB with a client that lacks this protocol or that cannot run shell diagnostics for playback status.
  • Wireless Debugging exposes separate, often ephemeral pairing and connection ports. Never assume the pairing port is the runtime port or that modern devices use legacy port 5555. Official wireless debugging on TV requires Android 13+; hosts should use a current Platform Tools release (minimum wireless-era 30.0.0+, prefer latest stable).
  • On macOS, Local Network permission applies to the adb binary. The supported pattern is for a permitted GUI terminal to start the shared ADB server, while MCP and other tools use it as localhost clients; automated tooling must not run adb kill-server or adb start-server or otherwise manage that server lifecycle.
  • A series deep link requires both season and episode; movies and series use different Stremio URI forms. Preserve this distinction and cover dispatch or URI changes with mocked tests.
  • Playback parsing must remain scoped to Stremio's media-session block because other Android sessions can overwrite state. Preserve support for numeric and named states, monotonic position extrapolation, and extractor-based duration fallback in mocked tests.
  • Claimed media-session PLAYING must be corroborated with a started Stremio-owner AudioTrack before reporting healthy playback; otherwise demote to stalled and do not extrapolate position. Stremio often freezes raw position/updated even during real play, so dual-sampling the session alone cannot prove liveness.
  • media_stop success is a post-condition (no active playback), not ADB accepting KEYCODE_MEDIA_STOP. Stremio/VLC commonly ignores STOP while accepting pause/play; keep the bounded verify → pause+back → am force-stop com.stremio.one path and fail closed if the session still plays.
  • Live TV dogfood: after starting a stream, wait for buffering/settle before treating playback_status or pause/resume/stop samples as authoritative (early samples often look stalled/unknown at position 0). Never press select/enter on the launcher — that can open an unrelated app; only center while com.stremio.one is focused.
  • dist/, .venv/, and Python cache files are generated outputs; do not edit them directly or include them in source changes.

Read the full file on GitHub · 51 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2mo ago First seen · 51 lines · 1,406 tokens per session scan A 18a788ec0270

Subscribe to this mod's changes

stremio-mcp AGENTS.md is an instructions file published in the GitHub repository netixc/stremio-mcp (6 stars, last pushed 1mo ago), licensed MIT. It adds 1,406 tokens to every session, about $0.0056 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

stremio-mcp AGENTS.md compared with instructions from other repositories

stremio-mcp AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
stremio-mcp AGENTS.mdnetixc/stremio-mcpInstructions file61mo agoMITA1,406Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143kyesterdayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149kyesterdayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file274k2d agoMITA4,313Codex, OpenCode