Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add instructions/sandraschi/plexmcp/agents-mdgit clone --depth 1 https://github.com/sandraschi/plexmcpWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.02046 | $0.02046 |
| Opus 5 | $0.01023 | $0.01023 |
| Sonnet 5 | $0.00409 | $0.00409 |
| Haiku 4.5 | $0.00205 | $0.00205 |
Grade A, and why
plexmcp 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 2d 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.
How it starts
The opening of the file, as written. The whole thing — 181 lines — stays where its author put it; the contents beside it link to each section on GitHub.
PlexMCP — Agent Context
Project Overview
PlexMCP is an industrialized FastMCP 3.2 server for Plex Media Server. It provides 22 MCP tools (portmanteau) for library/media/search/playlist management, plus an optional FastAPI + Next.js webapp for browsing.
- Python 3.12+, FastMCP 3.2.0,
uvpackage manager - PlexAPI 4.17+, httpx 0.28.1+
- Webapp: Next.js 15.2, Tailwind CSS, FastAPI backend
- Ports: backend 10740, frontend 10741
Key Commands
# Lint
ruff check src/plex_mcp/ webapp/backend/ # Python
cd webapp/frontend && biome check . # JS/TS
# Test
uv run pytest tests/test_portmanteau_*.py --tb=short -q
# Start webapp
cd webapp && powershell -ExecutionPolicy Bypass -File .\start.ps1
# Start MCP server only (stdio)
uv run plex-mcp-advanced
# Justfile
just lint # ruff + biome
just test # pytest
just fix # ruff --fix + biome
just webapp # start web interface
Architecture
src/plex_mcp/
app.py # FastMCP instance creation (heavy, lazy-loaded by webapp)
prefabs.py # Prefab card builders (9 cards using prefab_ui)
tools/portmanteau/ # 20 @mcp.tool() portmanteau tools
tools/agentic.py # 2 agentic tools (dynamic registration)
services/ # PlexService, PlexMediaService, RAG, enrichment
models/ # Pydantic v2 models (MediaItem, LibrarySection, etc.)
webapp/
backend/app/
main.py # FastAPI app, lazy FastMCP mount
api/
images.py # Image proxy (follow_redirects=True critical!)
llm.py # Ollama/OpenAI-compatible chat + model listing
movies.py # Movie listing endpoint
library.py # Library listing endpoint
mcp/client.py # Direct import tool caller (not HTTP subprocess)
frontend/
app/
layout.tsx # Root layout (suppressHydrationWarning on <html>)
page.tsx # Server component (force-dynamic)
movies/ # Movies page (useSearchParams needs Suspense)
settings/ # Settings page (LLM model elicitation)
utils/
plex-media-ui.ts # plexImageUrl() -> /image/{path}
api.ts # All API fetch wrappers
next.config.js # Rewrites for /api/* and /image/* -> backend
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.
- 2d ago First seen · 181 lines · 2,046 tokens per session scan A 8e31d72dddeb
plexmcp AGENTS.md is an instructions file published in the GitHub repository sandraschi/plexmcp (2 stars, last pushed 15d ago), licensed MIT. It adds 2,046 tokens to every session, about $0.0102 per session on Opus 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.
Other instructions, from other repositories
blender-mcp AGENTS.md
Instructions for sandraschi/blender-mcp, covering blender-mcp agent context and quick ref.
blender-mcp CLAUDE.md
Instructions for sandraschi/blender-mcp, covering blender-mcp — ai-powered blender automation, commands, architecture and code style & standards.
blender-mcp copilot-instructions.md
Instructions for sandraschi/blender-mcp: You have access to a Blender 3D automation server. You can control Blender scenes, objects, materials, rendering, and physics through MCP tools.
streamfog-mcp AGENTS.md
AGENTS.md instructions for sandraschi/streamfog-mcp, covering agent instructions — streamfog-mcp, identity, commands, ports (fleet-registered) and architecture.
discord-mcp AGENTS.md
Instructions for sandraschi/discord-mcp, covering discord-mcp — agent guide, standards, key files and quick ref.
pdf-mcp CLAUDE.md
Claude Code instructions for sandraschi/pdf-mcp, covering pdf-mcp — claude / agent context, do, don't and commands.