mcp CLAUDE.md

A set of project instructions for building a local MCP server, a program that lets an AI client call tools through a standard connection.

In plain words
What is it for?
Use it when developing the @rendobar/mcp server, especially its logging, tool registration, dependency versions, and error responses.
Why use it?
It prevents protocol output from being corrupted and defines rules for handling SDK type errors and tool failures.

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/rendobar/mcp/claude-md
Clone the repo
git clone --depth 1 https://github.com/rendobar/mcp
Per session 935 This file is loaded in full into every session.
When invoked 935 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.00935 $0.00935
Opus 5 $0.00467 $0.00467
Sonnet 5 $0.00187 $0.00187
Haiku 4.5 $0.00093 $0.00093

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

Security

Grade A, and why

mcp 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 · 95 lines

How it starts

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

@rendobar/mcp

Local stdio MCP server. Single ESM bundle. ~6 tools. Public, MIT.

CRITICAL RULES

1. NEVER write to stdout

stdout is reserved for JSON-RPC framing. Any byte kills the connection.

  • console.log, process.stdout.write, print — banned.
  • Pipe subprocess stdout to stderr or /dev/null.
  • The boot-time global console.* patch redirects to stderr (see src/logger.ts). Don't disable it.

--help and --version are the ONLY commands that write to stdout. Both exit before the MCP transport is wired.

2. NEVER silence Zod-version overload errors with as any

@modelcontextprotocol/sdk 1.x uses zod/v4 internally. Two Zod copies break registerTool overloads. Fix: pnpm why zod shows one version. pnpm.overrides.zod pinned. Don't reach for as any.

3. Use registerTool, not .tool() shorthand

The legacy shorthand is removed in v2-alpha of the SDK. registerTool is the only one in v2.

4. Tool errors via isError: true, not throws

Recoverable failures (bad credits, rate limit, not found) → { isError: true, content: [...] }. Programmer bugs → throw, surface in stderr as -32603 InternalError.

The withErrorMapping wrapper in src/errors.ts handles this. Use it for every tool.

5. Cold-start budget < 2 s

CI asserts time node dist/bin.js --version < 2000ms. No network calls at module load. Lazy SDK init in tools, not at boot.

6. Bundle budget < 100 KB

CI asserts dist/bin.js < 100KB. If pino blows the budget, swap to the 30-line custom logger.

Build & test

pnpm install
pnpm typecheck
pnpm lint
pnpm test
pnpm build
pnpm inspector   # interactive MCP testing

Layout

src/
├── bin.ts          # entry: parse args, init logger + sdk, connect StdioServerTransport
├── server.ts       # createRendobarMcpServer factory
├── config.ts       # parseConfig: --flag → env → creds.json → fail
├── context.ts      # RendobarContext type
├── logger.ts       # JSON to stderr
├── errors.ts       # withErrorMapping using ApiError from @rendobar/sdk
├── paths.ts        # resolveSafe (realpath + roots check)
├── instructions.ts # SERVER_INSTRUCTIONS string
├── version.ts      # built-time injected
└── tools/
    ├── index.ts    # registerTools(server, ctx)
    ├── util.ts     # defineTool helper
    ├── uploads.ts  # upload_file
    ├── jobs.ts     # submit_job, get_job, list_jobs, cancel_job
    └── account.ts  # get_account

Read the full file on GitHub · 95 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 · 95 lines · 935 tokens per session scan A 805aabebb519

Subscribe to this mod's changes

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