mcp: Instructions file for Codex

AGENTS.md

mcp AGENTS.md is an instructions file for Codex, OpenCode from smart-compost/mcp. It costs 1,116 tokens per session, scanned A, original, Apache-2.0.

Repository instructions for an MCP server that lets another program read composting processes, devices, and measurements through an integration API. MCP is a standard way for an AI tool to call an external server.

In plain words
What is it for?
They are for developing, building, smoke-testing, and publishing this TypeScript server while keeping its API credentials and service boundaries correct.
Why use it?
They record where code belongs, which commands verify it, and rules that are not apparent from a single source file.

Instructions file for CodexOpenCode

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

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

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is Platform-wide context (service map, gateway headers, deploy gates, git): `../AGENTS.md`,.

Reuse

Borrowing it

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

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/smart-compost/mcp/agents-md"><img src="https://agentmods.dev/badge/instructions/smart-compost/mcp/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,116 This file is loaded in full into every session.
When invoked 1,116 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.01116 $0.01116
Opus 5.5 $0.00446 $0.00446
Sonnet 5.5 $0.00223 $0.00223
Haiku 4.5 $0.00112 $0.00112

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

Security

Grade A, and why

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 today.

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 · 74 lines

How it starts

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

mcp

@smart-compost/mcp: a stdio MCP server, published to public npm, that lets an external integrator's agent (Claude, Cursor…) read their processes, devices and measurements through the Integration API with their own x-api-key. Six read-only tools, two source files, on the TypeScript SDK v2 (@modelcontextprotocol/server, zod 4).

Platform-wide context (service map, gateway headers, deploy gates, git): ../AGENTS.md, linked from hive-mind/AGENTS.md. The Integration API itself lives in composting-backend (/integration/v1), behind user-gateway.

Commands

npm ci
npm run build                  # tsc into dist/; the only typecheck
npm run smoke                  # spawns dist/index.js once per protocol era, lists tools; no key needed
npm run dev                    # tsx src/index.ts, for a manual session
  • Done means npm run build and npm run smoke both pass. There are no unit tests, no eslint and no Prettier config here; smoke lists the tools but never calls the API.
  • smoke runs two sessions: 2026-07-28 (server/discover + tools/list with the _meta envelope) and 2025 (initialize handshake + tools/list). It fails if the six names, their order, the annotations or an outputSchema differ, or if the eras advertise different inputs.
  • smoke runs the built file: build first, or it tests the previous dist/.
  • To exercise a tool against the API: SMARTCOMPOST_API_KEY=<key> npm run dev, then call it from an MCP client. Without the key every tool returns an error, and the server still starts.

Where things live

  • src/index.ts — server name, version, instructions, the output schemas, the error hints and the six registerTool calls inside buildServer, served by serveStdio.
  • src/client.ts — apiGet: base URL, x-api-key header, error mapping.
  • scripts/smoke.mjs — the stdio check for both protocol eras.
  • .github/workflows/publish.yml — npm publish.

Rules you cannot infer from one file

  • stdout is the JSON-RPC channel. Log with console.error only; one console.log corrupts the stream for every client.
  • serveStdio(buildServer) serves both eras: a client that opens with initialize gets the 2025 protocol, one that opens with server/discover gets 2026-07-28. Do not pass legacy: 'reject': Claude Desktop and Cursor still open with initialize.
  • Each tool returns structuredContent matching its outputSchema, plus the same JSON as text in content. The SDK validates it before sending, so a field the API stops sending fails the call; the schemas are loose objects (extra fields pass) and mirror composting-backend/src/modules/core/dto/integration.dto.ts. Change them together.
  • Requests go to ${SMARTCOMPOST_API_BASE}/integration/v1/<path>, and the base defaults to the test environment (DEFAULT_BASE in src/client.ts). A new tool calls apiGet with a path relative to /integration/v1, and stays read-only unless the Integration API contract changes.
  • The API key never leaves the process except to that base URL; do not add telemetry or proxies.
  • README.md is what npm shows integrators. Keep its env-var names and defaults identical to src/client.ts, and its tool table identical to src/index.ts.
  • Tool names and input fields are a public contract: integrators' agents call them by name, so renaming or removing one breaks them; a new optional field does not. Registration order is the tools/list order; keep discovery first.

Read the full file on GitHub · 74 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. today Changed · +13 lines · +282 tokens per session f822c54246f2
  2. 3d ago First seen · 61 lines · 834 tokens per session scan A 37b6918c4f3c

Subscribe to this mod's changes

mcp AGENTS.md is an instructions file published in the GitHub repository smart-compost/mcp (0 stars, last pushed yesterday), licensed Apache-2.0. It adds 1,116 tokens to every session, about $0.0045 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-10-27.

Related

Other instructions, from other repositories

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 9,715 tokens

next.js AGENTS.md

AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,461 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, cache eligibility and rollout and applying the notice (cutover).

microsoft/vscode · 5,262 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,680 tokens

vscode copilot-instructions.md

Copilot instructions for microsoft/vscode, covering vs code copilot instructions, project overview, root folders, core architecture (src/ folder) and built-in extensions (extensions/ folder).

microsoft/vscode · 2,750 tokens

deno copilot-instructions.md

Copilot instructions for denoland/deno, covering deno development guide for github copilot, network access, high level overview, key directories and key files to understand first.

denoland/deno · 3,077 tokens