chains-api CLAUDE.md

Project instructions for Chains API, a Node.js service that collects blockchain network data and provides it through web and agent-facing interfaces.

In plain words
What is it for?
Use them when developing, debugging, or reviewing the Chains API, including its REST API, MCP servers, in-memory data store, and data refresh process.
Why use it?
They give an agent the project’s architecture, technology choices, and operating rules before it changes the code.

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/johnaverse/chains-api/claude-md
Clone the repo
git clone --depth 1 https://github.com/Johnaverse/chains-api
Per session 4,601 This file is loaded in full into every session.
When invoked 4,601 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.04601 $0.04601
Opus 5 $0.02301 $0.02301
Sonnet 5 $0.00920 $0.00920
Haiku 4.5 $0.00460 $0.00460

Measured 2d ago against content hash 3f506209fb4d, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

chains-api 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 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.

CLAUDE.md · 259 lines

How it starts

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

CLAUDE.md — Chains API

Project Overview

Chains API is a Node.js service that aggregates blockchain chain data from five external sources, maintains an in-memory index, and exposes it via a REST API (Fastify), MCP stdio server, and MCP HTTP server. No database — data is fetched from remote JSON/Markdown sources, indexed in memory, and optionally cached to disk for stale-first startup.

Single data source per container: server.js runs the REST API and the MCP HTTP server in one process (default npm start / Docker CMD). Both surfaces read the same module-level in-memory store (src/store/), and only the REST side starts the refreshers — so a container never refreshes the same public RPC endpoint twice. index.js (REST only) and mcp-server-http.js (MCP only) remain runnable standalone for local/dev use. The MCP tool surface in mcp-tools.js mirrors the REST read endpoints (chains, search, relations, endpoints, clients, scaling, slip44, status-pages, stats, keywords, rpc-monitor, refresher, validate, live-incidents, forum-news).

Upstream feed services (separate deployables): live incidents and forum news do not come from the five data sources — they are served by two sibling Node services with their own repos, releases, and containers:

Service Feeds Consumed via
chains-status-news Chain + RPC-provider status pages → incidents, scheduled maintenance LIVE_INCIDENTS_URL
chains-forum-news Official community/governance forums, keyed by chain ID FORUM_NEWS_URL

The wire contract shared by all three services — addressing, health/readiness, versioning, collection envelopes, error shape, WebSocket framing, timestamps, auth — is specified in docs/SERVICE-CONTRACT.md. Read it before changing any cross-service payload.

Both are independent git repos, so they are often checked out next to this one in the same working tree (chains-status-news/, chains-forum-news/) — useful for cross-checking a feed's payload against a consumer here. They are versioned and released separately from this project, and the paths in this document, in package.json, and in .github/workflows/ are all relative to this project's root.

Read the full file on GitHub · 259 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. 2d ago First seen · 259 lines · 4,601 tokens per session scan A 3f506209fb4d

Subscribe to this mod's changes

chains-api CLAUDE.md is an instructions file published in the GitHub repository Johnaverse/chains-api (5 stars, last pushed 4d ago), licensed MIT. It adds 4,601 tokens to every session, about $0.0230 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.