lastfm-mcp: Instructions file for Codex

AGENTS.md

lastfm-mcp AGENTS.md is an instructions file for Codex, OpenCode from rianvdm/lastfm-mcp. It costs 4,365 tokens per session, scanned C, original, MIT.

Repository instructions for a Cloudflare Worker that provides an MCP server connected to Last.fm listening data. They describe the project’s local development, build, deployment, linting, formatting, and test commands.

In plain words
What is it for?
Use them when changing, checking, or deploying this repository, including its Cloudflare KV storage, secrets, tests, and TypeScript source.
Why use it?
They give a coding agent the project-specific commands and infrastructure details needed to work without guessing.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: mentions Claude Code; mentions AGENTS.md; mentions Codex.

This is rianvdm/lastfm-mcp's own configuration. It tells Codex and OpenCode how to work on lastfm-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 lastfm-mcp configures →

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is import type { Env } from '../types/env'.

Reuse

Borrowing it

Nothing to install: this file belongs to rianvdm/lastfm-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/rianvdm/lastfm-mcp/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/rianvdm/lastfm-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 lastfm-mcp AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/rianvdm/lastfm-mcp/agents-md/github.svg)](https://agentmods.dev/instructions/rianvdm/lastfm-mcp/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/rianvdm/lastfm-mcp/agents-md"><img src="https://agentmods.dev/badge/instructions/rianvdm/lastfm-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 lastfm-mcp AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/rianvdm/lastfm-mcp/agents-md"><img src="https://agentmods.dev/badge/instructions/rianvdm/lastfm-mcp/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 4,365 This file is loaded in full into every session.
When invoked 4,365 The same file — it is already loaded in full.
Security scan C 1 finding. 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.04365 $0.04365
Opus 5.5 $0.01746 $0.01746
Sonnet 5.5 $0.00873 $0.00873
Haiku 4.5 $0.00436 $0.00436

Measured 15d ago against content hash f25ac1b16bec, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade C, and why

lastfm-mcp AGENTS.md scanned grade C with 1 finding 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 15d 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.

Hidden instructionshighPrompt injection

Directives inside HTML comments, invisible characters or bidirectional overrides are read by the model and not by the person reviewing the file.

4. The release name and body follow Rian's side-project release notes contract (`~/git/product-ai/05-personal/side-projects/release-notes-contract.md`): `lastfm-mcp vX.Y.Z — <tagline>`, then an opening paragraph before i
AGENTS.md · 222 lines

How it starts

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

AGENTS.md

Guidance for coding agents (Claude Code, Codex) working in this repository.

Cloudflare Worker implementing a Model Context Protocol (MCP) server that connects AI assistants to Last.fm listening data. Runs on workerd with a Rate Limiting binding (REGISTRATION_RATE_LIMITER) and three KV namespaces: OAUTH_KV (OAuth clients, grants and tokens), MCP_SESSIONS (the Last.fm response cache; the name predates OAuth) and MCP_RL (per-IP rate limits). The TOOL_EVENTS Analytics Engine binding receives one anonymous data point per tool call (its layout, including double2 for the Last.fm HTTP requests the call made, is in src/analytics/toolEvents.ts), in the lastfm_mcp_tool_events_staging dataset on staging and lastfm_mcp_tool_events in production.

Build / Test / Lint Commands

npm run dev              # Local dev server (wrangler dev, port 8787)
npm run build            # Dry-run deploy to validate build (wrangler deploy --dry-run)
npm run deploy           # Deploy to staging (the default `lastfm-mcp` Worker)
npm run deploy:prod      # Deploy to production (`lastfm-mcp-prod`); CI normally does this, see below
npm run setup:prod       # Create production KV namespaces and set the three secrets
npm run lint             # ESLint (src and dashboard/src)
npm run format           # Prettier --write
npm run format:check     # Prettier --check (CI)
npm run test:multi-user  # Manual multi-user check against a running server (scripts/test-multi-user.js)
npm run render:share     # Re-render og.png, apple-touch-icon.png and .github/assets/github-preview.png from src/pages/share/*.html (macOS: headless Chrome + sips; needs Google Fonts)
npm run render:readme    # Re-write .github/assets/wave.svg, the README banner, from src/pages/share/wave.js (Node only)
npm run cf-typegen       # Regenerate Worker type bindings (run after changing wrangler.toml; produces worker-configuration.d.ts — generated, do not edit by hand)
npm run test:dashboard   # Dashboard Worker tests (dashboard/vitest.config.mts)
npm run dashboard:dev    # Dashboard Worker local dev server (every page request gets a 403 without an Access JWT)
npm run dashboard:deploy # Deploy the dashboard Worker by hand; CI never does

Read the full file on GitHub · 222 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. 15d ago Changed · +3 lines · +174 tokens per session f25ac1b16bec
  2. 20d ago Changed · +72 tokens per session 479dafa412d4
  3. 21d ago Changed · +6 lines · +447 tokens per session 5d9c7be191a6
  4. 23d ago Changed · +32 lines · +1,159 tokens per session 20571b210a97
  5. 28d ago First seen · 181 lines · 2,513 tokens per session scan C 84a79f2090b7

Subscribe to this mod's changes

lastfm-mcp AGENTS.md is an instructions file published in the GitHub repository rianvdm/lastfm-mcp (56 stars, last pushed 16d ago), licensed MIT. It adds 4,365 tokens to every session, about $0.0175 per session on Opus 5.5. A static security scan graded it C with 1 finding (hidden instructions). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-11-08.

Related

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

lastfm-mcp AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
lastfm-mcp AGENTS.mdrianvdm/lastfm-mcpInstructions file5616d agoMITC4,365Codex, OpenCode
plan-forge dapr.instructions.mdsrnichols/plan-forgeInstructions file71mo agoMITA4,975GitHub Copilot
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA9,887GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file144ktodayMITA7,230Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA5,685GitHub Copilot
langchain AGENTS.mdlangchain-ai/langchainInstructions file150kyesterdayMITA4,951Codex, OpenCode
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file291kyesterdayMITA4,396Codex, OpenCode