mcp-opcode CLAUDE.md

A set of instructions for developing the mcp-opcode client, including its engineering rules, project structure, behaviour, and tests. The client talks to a remote HTTP API and signs prepared payloads without holding private keys.

In plain words
What is it for?
Use it when writing, reviewing, or testing code in the mcp-opcode repository.
Why use it?
It keeps changes aligned with the repository's boundaries, such as avoiding direct blockchain connections and separating payload preparation from submission.

Instructions file

Install

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.

agentmods
npx agentmods add instructions/opcode-fi/mcp-opcode/claude-md
Clone the repo
git clone --depth 1 https://github.com/opcode-fi/mcp-opcode
Per session 2,180 This file is loaded in full into every session.
When invoked 2,180 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
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 $0.02180 $0.02180
Opus 5 $0.01090 $0.01090
Sonnet 5 $0.00436 $0.00436
Haiku 4.5 $0.00218 $0.00218

Measured yesterday against content hash 5273a876784e, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

mcp-opcode CLAUDE.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 yesterday.

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.

CLAUDE.md · 82 lines

How it starts

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

engineering rules

The main claude code should use agents to write code and to audit code. The main claude code is only an orchestrator. Why? Agents do a better job and have fresh context and use more tokens giving better results. Otherwise main claude code frequently stops early and says, "thats all i can do in this session", or stuff like that, which NOBODY wants, we want the work to be done and correct. The orchestrator claude is to tell its children that they are children so that they don't spawn their own children.

THIS REPO

  • THIS IS A CLIENT. IT TALKS TO A REMOTE HTTP API AND SIGNS PAYLOADS. IT HAS NO DATABASE, NO CHAIN CONNECTION AND NO SERVER STATE.
  • NO EVM RPC. EVER. EVERY VALUE NEEDED TO BUILD A SIGNATURE COMES OFF THE QUOTE OR THE SESSION. IF SOMETHING SEEMS TO NEED A NODE, THE FIX IS FOR THE API TO CARRY THE FIELD, NOT FOR THE CLIENT TO OPEN A CONNECTION.
  • SIGN-THEN-SUBMIT. prepare_X() RETURNS THE EXACT PAYLOAD TO SIGN, THE CALLER SIGNS IT WITH WHATEVER CUSTODY THEY HAVE, submit_X(prepared, sig) POSTS IT. THE CLIENT NEVER HOLDS A PRIVATE KEY AND NEVER SIGNS ON ITS OWN INITIATIVE.
  • A SERVER-SUPPLIED ADDRESS IS NOT TRUSTED. CHAIN ID, GATEWAY AND DELEGATE ARE PINNED CLIENT-SIDE AND CHECKED AGAINST WHAT THE SERVER SENT BEFORE ANYTHING IS SIGNED. A COMPROMISED OR MITM'D BACKEND MUST NOT BE ABLE TO GET A SIGNATURE OVER AN ADDRESS OF ITS CHOOSING.
  • REFUSE BEFORE YOU SIGN, NOT AFTER. EVERY GUARD RUNS BEFORE THE KEY IS TOUCHED. A SIGNATURE IS AN IRREVERSIBLE AUTHORISATION, A FAILED HTTP CALL IS NOT.
  • DO NOT COMMIT KEYSTORES, PASSWORDS OR ANY ~/.opcode CONTENT. THE DEV KEYSTORE POINTER IS GITIGNORED AND STAYS THAT WAY.
  • THIS REPO IS PUBLIC. NO INTERNAL FILE PATHS, NO BACKEND SOURCE CITATIONS, NO INFRA OR DEPLOY DETAIL, NO INTERNAL PLAN DOCS. WHEN A CONSTANT IS PINNED FROM A SERVER CONFIG, SAY WHAT IT MEANS AND THAT IT IS PINNED — NEVER WHERE IT CAME FROM.

Structure

  • DON'T MIRROR A CONFIG STRUCT INTO A SECOND RUNTIME STRUCT, SIMPLY USE THE CONFIG STRUCT IN THE CODE DIRECTLY TO NOT DUPLICATE
  • REPRESENT A FIXED SET OF CHOICES AS AN ENUM, NOT STRINGS, USE THE TYPESYSTEM
  • WHEN MOVING CODE AROUND, DO NOT SHIM THINGS BY REEXPORTING THEM, IT CREATES A RETARDED SPAGHETTI OF DEPS AND IS LAZY
  • DO NOT SHIM CODE WHEN REPLACING IT, FIX THE ENTIRE PATH
  • NEVER FORMAT ERRORS TO STRINGS, HAVE FOR EACH FAILURE A CASE IN THE TYPE
  • NEVER RETURN None TO MEAN FAILURE, RAISE THE TYPED EXCEPTION. Optional IS ONLY ALLOWED IF A VALUE CAN GENUINELY BE ABSENT AND ITS CORRECT OPERATION IF IT HAPPENS
  • SERIALIZE U256 AS DECIMAL, ACCEPT DECIMAL OR HEX FOR DESERIALIZATION
  • FOR ETHEREUM TYPES USE ACTUAL ETHEREUM TYPES, NOT BARE STRINGS OR LISTS OF INTS
  • USE THE MODEL LAYER'S DERIVED (DE)SERIALIZATION, DON'T HAND-ROLL A PARSER

Read the full file on GitHub · 82 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. yesterday First seen · 82 lines · 2,180 tokens per session scan A 5273a876784e

Subscribe to this mod's changes

mcp-opcode CLAUDE.md is an instructions file published in the GitHub repository opcode-fi/mcp-opcode (0 stars, last pushed 26d ago), licensed MIT. It adds 2,180 tokens to every session, about $0.0109 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.

Related

Other instructions, from other repositories

codex AGENTS.md

AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.

openai/codex · 5,182 tokens

buildNext

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 · 6,785 tokens

next.js 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,296 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, applying the notice (cutover) and fallback chain (never fail the build).

microsoft/vscode · 5,001 tokens

spec-kit AGENTS.md

Instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.

github/spec-kit · 7,040 tokens

langchain 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,345 tokens