Chains API
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Chains API
A Node.js API query service built with Fastify that indexes and provides access to blockchain chain data from multiple sources. Also available as an MCP (Model Context Protocol) server for AI assistants.
Code Quality & Testing
This project maintains high code quality standards through:
Comprehensive Testing: Includes unit tests, integration tests, and fuzz testing
300+ test cases covering all core functionality
Continuous integration with automated test runs on every push
See Testing Documentation for details
SonarQube Analysis: Automated code quality scanning on every commit
Enforces code coverage requirements (≥80%)
Monitors code duplication (≤3%)
Tracks cognitive complexity and code smells
All changes are validated through GitHub Actions CI/CD pipeline, ensuring code quality and test coverage before deployment.
Related MCP server: Flow MCP Server
Features
Multi-Source Data Aggregation: Combines data from multiple blockchain registries:
Chain ID Network (for basic chain data and L2 relation indexing using parent field)
Network icons: each chain carries an
iconfrom web3icons (MIT) when it draws that network, joined by chain ID:id,url(SVG) and one URL per variant invariants(branded,mono,background). A listed icon is refused when its network and the chain share no distinctive name word (a reused chain ID). A chain web3icons does not list borrows an icon, markedinheritedFrom(chain ID) andvia:testnetOf(its main network's icon) orfamily(its research family's, when the family's listed chains all share one icon; a chain that is not a test network must also share a name word with the chain it borrows from). SVGs are linked fromWEB3ICONS_SVG_BASE_URL, not served by this API./summarycarries the URL alone asicon, and the dashboard shows it beside the network's name in the Networks table, the chain drawer and the profile page.Fast API: Built with Fastify for high performance
MCP Server: Available as a Model Context Protocol server for AI assistants
Indexed Data: Efficient querying with indexed chain data
Search Capabilities: Search chains by name, ID, or other attributes
RESTful Endpoints: Clean and intuitive API design
Chain Relations & Tags: Automatic indexing of chain relationships and tags
Tags:
Testnet,L2,BeaconRelations:
testnetOf,mainnetOf,l2Of,parentOf,beaconOfwith resolved chain IDsExample: Base Sepolia (84532) is tagged as
TestnetandL2, with relations to Base (8453) and Sepolia (11155111)Reverse relations: Mainnets have
mainnetOfrelations pointing to testnets, L1s haveparentOfrelations pointing to L2s
RPC Health Monitoring: Automatic background monitoring of RPC endpoints to identify working and failed nodes.
Data Validation: Built-in validation tools to identify data inconsistencies between multiple sources (e.g., The Graph registry vs. Chainlist).
Installation
Using npm
npm installUsing Docker
Pull from GitHub Container Registry
Pre-built Docker images are automatically published to GitHub Container Registry (GHCR) on every push to the main branch:
# Pull the latest image
docker pull ghcr.io/johnaverse/chains-api:latest
# Or pull a specific version
docker pull ghcr.io/johnaverse/chains-api:v1.1.1Build Docker image locally
# Build the image
docker build -t chains-api .
# Or using docker compose
docker compose buildUsage
Running with Docker
Run the REST API server
# Using pre-built image from GHCR
docker run -d -p 3000:3000 --name chains-api ghcr.io/johnaverse/chains-api:latest
# Or using locally built image
docker run -d -p 3000:3000 --name chains-api chains-api
# With custom environment variables
docker run -d -p 3000:3000 \
-e PORT=3000 \
-e HOST=0.0.0.0 \
--name chains-api \
ghcr.io/johnaverse/chains-api:latestThe API will be available at http://localhost:3000.
Run the MCP HTTP server
docker run -d -p 3001:3001 \
--name chains-api-mcp \
ghcr.io/johnaverse/chains-api:latest \
node mcp-server-http.jsThe MCP HTTP server will be available at http://localhost:3001.
Using Docker Compose
A docker-compose.yml file is included in the repository that runs both the REST API server on port 3000 and the MCP HTTP server on port 3001:
docker compose up -dTo use pre-built images from GHCR instead of building locally, modify the docker-compose.yml to use image: ghcr.io/johnaverse/chains-api:latest instead of build: .
The default configuration:
services:
chains-api:
build: .
image: chains-api:latest
container_name: chains-api
ports:
- "3000:3000"
environment:
- PORT=3000
- HOST=0.0.0.0
restart: unless-stopped
healthcheck:
test:
[
"CMD",
"node",
"-e",
"require('http').get('http://localhost:3000/health', (r) => { process.exit(r.statusCode === 200 ? 0 : 1) })",
]
interval: 30s
timeout: 10s
retries: 3
start_period: 5s
chains-api-mcp:
build: .
image: chains-api:latest
container_name: chains-api-mcp
command: node mcp-server-http.js
ports:
- "3001:3001"
environment:
- MCP_PORT=3001
- MCP_HOST=0.0.0.0
restart: unless-stopped
healthcheck:
test:
[
"CMD",
"node",
"-e",
"require('http').get('http://localhost:3001/health', (r) => { process.exit(r.statusCode === 200 ? 0 : 1) })",
]
interval: 30s
timeout: 10s
retries: 3
start_period: 5sRunning with npm
REST API Server
Start the server
npm startThe server will start on http://localhost:3000 by default.
Development mode (with auto-reload)
npm run devUsing a Proxy (Optional)
To route all outbound requests through a proxy server, set the PROXY_URL environment variable:
# Using a proxy without authentication
PROXY_URL=http://proxy.example.com:8080 npm start
# Using a proxy with authentication
PROXY_URL=http://user:pass@proxy.example.com:8080 npm startWhen configured, the proxy will be used for:
All RPC endpoint health checks and monitoring
Fetching data from external sources (The Graph, Chainlist, etc.)
The proxy configuration is optional and disabled by default. See the Environment Variables section for more details.
MCP Server (for AI Assistants)
The Chains API can also be used as an MCP (Model Context Protocol) server, allowing AI assistants like Claude to query blockchain chain data directly. Two transport modes are supported:
Stdio Mode (for local AI assistants like Claude Desktop)
HTTP Mode (for external clients like n8n, Make.com, etc.)
Running the MCP Server (Stdio Mode)
For local use with Claude Desktop and similar applications:
npm run mcpOr directly with Node.js:
node mcp-server.jsRunning the MCP HTTP Server (Network Mode)
For external clients that need HTTP access:
npm run mcp:httpOr directly with Node.js:
node mcp-server-http.jsThe HTTP server will start on http://0.0.0.0:3001 by default (configurable via MCP_PORT and MCP_HOST environment variables).
Endpoints:
POST /mcp- MCP protocol endpoint for tool callsDELETE /mcp- Session termination endpointGET /health- Health checkGET /- Server information
Example HTTP MCP usage with curl:
# Initialize a session
curl -X POST http://localhost:3001/mcp \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"my-client","version":"1.1.1"}}}'
# Extract session ID from the mcp-session-id header, then call a tool:
curl -X POST http://localhost:3001/mcp \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-H "mcp-session-id: <session-id>" \
-d '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"get_chain_by_id","arguments":{"chainId":1}}}'MCP Server Configuration (Stdio Mode)
To use the Chains API MCP server with Claude Desktop or other MCP clients, add it to your MCP settings configuration file:
For Claude Desktop (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):
{
"mcpServers": {
"chains-api": {
"command": "node",
"args": ["/path/to/chains-api/mcp-server.js"]
}
}
}Or if you've installed the package globally:
{
"mcpServers": {
"chains-api": {
"command": "chains-api-mcp"
}
}
}Available MCP Tools
The MCP server provides the following tools for querying blockchain chain data:
get_chains: Get all blockchain chains, optionally filtered by tag (Testnet, L2, or Beacon)
get_chain_by_id: Get detailed information about a specific blockchain chain by its chain ID (with its
researchblock, minus the hardware profiles and with at most 12 compactchannels(one per platform before any repeats) pluschannelsTotalandchannelsByPlatform; dated compactavailabilityobservations withchannelsAvailabilityNoteretain closure/unknown states and cache caveats;hasNodeRequirementssays whether to call the next tool)get_node_requirements: Documented hardware/system requirements for running a node on a chain, from the node hardware research — one profile per role (
full_node,validator,archive,rpc, …) × tier (minimum/recommended/example) × client, most specific first, optionalrole/levelfilters and alimit(default 8). Role filtering also includes explicitly sourcedprerequisiteForlinks: Nibiru validator lookups include its full-node prerequisite under the originalfull_noderole, counted once. The link'ssizing: "not_established"does not claim dedicated validator hardware. Requirements come back as strings in the publisher's original units ("memory capacity: 16 GB") and are never converted. Also carriessoftware: the node/clientrepositoriesthe research tied to the chain (withkindandstatus) andobservedClients, the client software and versions seen on the chain's live RPC endpoints (evidence of what operators run, not a requirement). Compact JSON on purpose: the dashboard assistant caps tool results atASSISTANT_TOOL_RESULT_MAX_CHARSsearch_chains: Search for blockchain chains by name or other attributes
get_endpoints: Get RPC, firehose, and substreams endpoints for a specific chain or all chains
get_client_releases: Recent node/client software releases from chains-client-feed (via
CLIENT_FEED_URL), newest first — version/tag,prerelease,mandatory, the AI summary and any hard fork the notes announce (fork: name, network, activationAt/Block/Epoch/Slot, state). Filters:client(resolved to its registry repositories),repo(owner/repoorgithub:/gitlab:prefixed),chainId,fork,since/until(inclusive ISO dates; a bareuntilcovers that day); capped (default 15, max 50) withtotalMatched/truncatedget_network_clients: Client repositories known to serve a chain, each with the kinds it plays there,
networkCount, latest release, latest fork and a compact developmentactivity(chains-client-feed's client → networks index)get_client_activity: How actively a client is developed (default-branch commits and merged PRs in 30/90 days), its open issues and PRs, open issues labeled bug or critical/security, published GitHub security advisories, and an activity and attention level with reasons — by
repoor byclientname (refreshed daily by chains-client-feed; GitHub needs the feed'sGITHUB_TOKEN)get_l2_metrics: Ethereum L2 data from growthepie (~26 chains): rank chains by any metric (
daa,txcount,tvl,stables_mcap,fees_paid_usd,profit_usd,rent_paid_usd,costs_blobs_usd,txcosts_median_usd, …) with 7-day change and the all-L2 total; one chain in full (chainId: profile, every metric with 7d/30d change, current fees, users, revenue/costs/profit, blockspace by category, DA layers used, optional daily history viametric+days);view: "da"for data-availability layers;view: "eth_supply". Every answer carriesattributionget_relations: Get chain relationships (testnet/mainnet, L2/L1, etc.) for a specific chain or all chains
get_slip44: Get SLIP-0044 coin type information by coin type ID or all coin types
Each tool returns JSON data that can be used by AI assistants to answer questions about blockchain networks.
Environment Variables
Server Configuration
PORT: REST API server port (default: 3000)HOST: REST API server host (default: 0.0.0.0)MCP_PORT: MCP HTTP server port (default: 3001)MCP_HOST: MCP HTTP server host (default: 0.0.0.0)
Proxy Configuration (Optional)
PROXY_URL: HTTP/HTTPS proxy URL for all outbound requests (default: empty/disabled)Example:
http://proxy.example.com:8080With authentication:
http://user:pass@proxy.example.com:8080When set, all RPC requests and data source fetching will route through this proxy
Leave empty or unset to disable proxy support
Rate Limiting
RATE_LIMIT_MAX: Maximum requests per window for global endpoints (default: 100)RATE_LIMIT_WINDOW_MS: Rate limit window in milliseconds (default: 60000 = 1 minute)RELOAD_RATE_LIMIT_MAX: Maximum/reloadrequests per window (default: 5)SEARCH_RATE_LIMIT_MAX: Maximum/searchrequests per window (default: 30)RATE_LIMIT_CLIENT_IP_HEADER: Header carrying the visitor's address behind the proxy (default:cf-connecting-ip). Every public request reaches the pod through Cloudflare and Envoy, so the TCP peer is the gateway; limits key on this header when it holds a valid IP, else on the peer — per visitor, not one bucket for everyone. Empty disables it.MCP_RATE_LIMIT_MAX: Maximum/mcprequests per window per visitor (default: 120)MCP_MAX_SESSIONS: Most open MCP sessions; idle ones are freed before a new one is refused with 503 (default: 200). With x402 on, sessions opened without a licence on a charged request may hold at most half of them, so licensees always find roomMCP_SESSION_IDLE_MS: An MCP session unused this long is closed (default: 1800000)
RPC Health Check
RPC_CHECK_TIMEOUT_MS: Timeout per RPC health check call in milliseconds (default: 8000)RPC_CHECK_CONCURRENCY: Number of parallel RPC health checks (default: 8)MAX_ENDPOINTS_PER_CHAIN: Maximum RPC endpoints tested per chain (default: 5)
Data Cache
DATA_CACHE_ENABLED: Enable disk-backed startup cache (default:true)DATA_CACHE_FILE: Snapshot file path used for stale-first startup (default:.cache/chains-api-data.json)DASHBOARD_ORIGINS: comma-separated origins the dashboard runs on besides/ui(defaulthttps://www.johnaverse.cc); their requests are audited as client kinddashboard.CHAINS_API_DB_HOST,CHAINS_API_DB_PORT(3306),CHAINS_API_DB_NAME(chains_api),CHAINS_API_DB_USER,CHAINS_API_DB_PASSWORD: MariaDB for RPC health, used when host, user and password are set. One row per chain inrpc_health(created at startup): its endpoint statuses, written when a chain's up/down state changes, and the time of every check. Every replica reads and writes the same rows, so a new pod serves the last known health at once and sweeps the chains that waited longest first. Without a database, or while it is unreachable, health is kept in per-chain files besideDATA_CACHE_FILE.
Assistant (Optional)
An LLM chat assistant over the whole registry plus live incidents, exposed at POST /assistant/chat and consumed by the dashboard's floating chat overlay (corner button, available on every view). It runs a tool-use loop against any OpenAI-compatible server (Ollama, vLLM, LM Studio) and stays disabled until configured:
ollama pull qwen3
ASSISTANT_LLM_URL=http://localhost:11434 npm startASSISTANT_LLM_URL: OpenAI-compatible LLM base URL (default: empty = assistant disabled)ASSISTANT_LLM_API_KEY: Bearer token for key-protected servers such as OpenAI or OpenRouter (default: empty — not needed for a plain Ollama)ASSISTANT_MODEL: Model name passed to/v1/chat/completions(default:qwen3)ASSISTANT_MAX_TOOL_ITERATIONS: Hard cap on LLM round-trips per request (default: 6)ASSISTANT_TIMEOUT_MS: Overall per-request deadline (default: 60000)ASSISTANT_MAX_TOKENS:max_tokensper LLM call (default: 1024)ASSISTANT_RATE_LIMIT_MAX: Maximum/assistant/chatrequests per window per visitor (default: 10)
The assistant's agency is kept to reading (OWASP LLM06): it gets only the tools the registry declares read-only (annotations.readOnlyHint, required on every tool by a test), so a tool added later that writes, reloads or sends is not offered to the model unless someone declares otherwise. Tool results carry third-party text (status pages, forums, news, release notes): each is marked as data for the model, the system prompt tells it to follow no instructions inside, and the answer keeps only links a result gives as a URL field (or the user wrote) — any other link becomes its host, "(link not from a source)", so a planted post cannot hand readers a clickable phishing link.
ASSISTANT_TOPIC_GUARD: Pre-classify each question with a cheap extra LLM call and refuse off-topic ones before the tool loop runs; fails open if the classifier misbehaves (default:true)ASSISTANT_FALLBACK_LLM_URL/ASSISTANT_FALLBACK_MODEL/ASSISTANT_FALLBACK_LLM_API_KEY: Optional backup provider — see below.
Fallback provider (optional)
Configure a second OpenAI-compatible server and the assistant survives the primary going down:
# Example 1: big model with a smaller local backup on another port
ASSISTANT_LLM_URL=http://10.0.0.47:8000 ASSISTANT_MODEL=qwen3-27b \
ASSISTANT_FALLBACK_LLM_URL=http://localhost:11434 ASSISTANT_FALLBACK_MODEL=qwen3:8b \
npm start
# Example 2: local primary with a hosted API as the backup
ASSISTANT_LLM_URL=http://localhost:11434 ASSISTANT_MODEL=qwen3 \
ASSISTANT_FALLBACK_LLM_URL=https://openrouter.ai/api ASSISTANT_FALLBACK_MODEL=qwen/qwen3-32b \
ASSISTANT_FALLBACK_LLM_API_KEY=sk-or-... \
npm startBehavior:
A chat run starts on the primary; if any LLM call fails (connection refused, timeout, HTTP error), the run switches to the backup and stays on it for the rest of that run. The next chat tries the primary again — no manual reset needed after recovery.
The switch is visible: the thinking trace shows a "switching to backup model" step, the answer JSON carries
viaFallback: true, and the dashboard bubble gets a backup model badge.While an untried backup remains, a single primary attempt is capped at 60s so an unresponsive primary can't consume the whole request budget before failover.
GET /assistantreportsreachable: trueif either provider answers, so the dashboard pill stays green during a primary outage.The backup must handle tool/function calling for full functionality; if it's a weaker model, expect simpler answers rather than failures — all the harness defenses (arg validation, iteration caps) apply to it too.
ASSISTANT_FALLBACK_MODELdefaults toASSISTANT_MODELwhen unset, and the key is only needed for auth-protected backups.LIVE_INCIDENTS_URL: Live incident feed for theget_live_incidentstool (default:https://chains-status-news.johnaverse.cc)FORUM_NEWS_URL: Forum/governance news feed for theget_forum_newstool (default:https://chains-forum-news.johnaverse.cc)GET /upgrades?chainId=&network=&limit=: cross-feed upgrade timeline — scheduled upgrades/maintenance with required software ([{client, version}]), urgency, activation time, incidents that followed on the same network within 24h (suspectedCause: "upgrade"— temporal correlation, not asserted causation), and related forum/news context.networkaccepts a name for chains with no EVM chain ID ("Solana", "Canton"). Also exposed as theget_chain_upgradesMCP tool.GET /forks?chainId=&phase=&scheduledOnly=&include=&unplaced=&limit=: forks as ENTITIES — one entry per fork per network, grouped across all three feeds (status pages and provider windows from chains-status-news, governance/research posts from chains-forum-news, articles from chains-news, and — whenCLIENT_FEED_URLis set — client release notes and changelogs from chains-client-feed, each fetched with?fork=true; a release attributed only to its repository's networks, with three or more of them and none named in the notes, is left unscoped rather than filed under each), so a fork that six providers, a forum thread and the project blog announced appears once. Grouping is by codename ("Glamsterdam" = "the Glamsterdam upgrade"), else activation height, else exact stated instant; unnamed notices on one network within six hours of each other — every one within 6h of the cluster's earliest time, so a run of notices cannot chain into a day-long fork — (or at the same height) are one fork, and fold into the named fork on that network at the same activation. The network's own sources and primary outlets outrank provider windows, which outrank secondary news, when they disagree on the date — except that newer status, forum or primary sources moving the date by more than a day count as a reschedule. When a source names the forking network (fork.network), the fork is filed under that network's chains, not the poster's: an Arbitrum post about Ethereum's fork is a chain 1 fork, and its date ranks as indirect (like secondary news), not as Ethereum's own. A test-network fork never inherits the mainnet chain of a post that only names the mainnet. Which words name test networks (Sepolia, Hoodi, Amoy, Chapel…) is read from the chain registry, not listed in code: a word that qualifies chains taggedTestnetand names no main network; a fork "named" after a network (a release adding Hoodi) needs a word several testnets share. A name made only of generic words ("Network Upgrade") is treated as unnamed; which words are generic is learned too — from the feeds, the title words the classifier drops from the fork names it reads out of those titles ("upgrade", "mandatory", "release"), and from the registry, the words many unrelated ecosystems put after their own name ("Mainnet", "Chain", "Network", "Protocol"). A named mention with no network at all folds into the single network-scoped fork of that name; named forks on the same chains with the same activation height or second are one entry whatever they were called (Hoodi's Glamsterdam / Gloas / Amsterdam under "ethereum hoodi" and "hoodi"), the other names kept inaliases(a date-only activation never joins two names: one day can hold two forks); groups made of exactly the same events (one window naming three networks) are one entry listing every network innetworks; each fork'seventsare de-duplicated by URL. Only real forks are listed by default (kind: "fork"): a group counts as a fork when any member is classedplanned_hard_fork(or legacyhard_fork), when no member carries a class at all, when it activates at a block height, or when it has a real name (not generic, not a version number likev29.0.1) AND a stated activation; every other marked group — client releases, RPC patches, provider infrastructure work classedplanned_software_update— iskind: "upgrade", listed only withinclude=upgrades, andbyKindcounts both. A stated activation more than 30 days before the post that states it is dropped as implausible (the classifier guessing a year) unless the fork iscompleted; the dropped value stays visible as the event'simplausibleActivationAt. A claim's time for "newest wins" is the enrichment'screatedAt, elsepublishedAt(neverupdatedAt, which some providers set to the future window start), capped at now. A date-only activation isactivationPrecision: "day"and staysupcominguntil that UTC day ends;state: completedis alwayspast. chains-news'enrichment.forks(several activations in one post) is read as one mention per entry. Each fork listsfeedsand itseventswith each source's claimedactivationAt; the response's top-levelfeedssays which feeds answered this round (ok), andstale: truemarks a feed whose forks are left over from an earlier fetch;filteredsays whether the feed honoured?fork=true(a 400 is remembered for an hour, so the filtered request is not retried on every refresh) andoldestis the oldest item in the page read — when unfiltered, forks announced before it are not visible. CarriesactivationAtwithactivationEvidence(stated/observedfrom a reached block height /estimatedfrom a future one — approximate, not a schedule),activationBlock,state, lifecyclephase(upcoming/past/cancelled/unscheduled) andsources.scheduledOnly=truefor a calendar view;byPhasecounts cover everything matched, not just the page. Also exposed as theget_forksMCP tool. Each event carriesstate, the fork state that source stated. A fork's time, state and kind come only from the network's own sources — client releases, its status page, forums, its blog and news; an RPC provider's maintenance window is the provider's own schedule, kept among the fork'sevents(andsources) to say when that provider upgrades — its chains place the fork only when the network's own sources name none — and a fork only providers mention is not a fork (its windows are software updates on/timeline). A timeline hardfork never names a singleprovideras its own. A fork whose network resolved to no chain (a provider writing "Hoodi Testnet") joins the one fork placed on chains with the same name at the same exact instant or height — the shared moment says which network was meant, where the name alone cannot (Ethereum's Hoodi or a rollup's); a day-only date, or an instant two placed forks share, never decides it. Each chain's fork schedule as its own nodes hold it is a further source (feednode): the chain refresher asks a working RPC foreth_config(EIP-7910) everyNODE_FORK_SCHEDULE_REFRESH_MS(6h; a chain none of whose endpoints answer is asked again afterNODE_FORK_SCHEDULE_RETRY_MS, 24h), and an answer for another chain id is discarded, as is a fork further ahead thanNODE_FORK_SCHEDULE_MAX_AHEAD_MS(one year): clients park an unscheduled fork at a far date (NetX at 2030-01-01, LUKSO at 2050-01-01). The forks it reports (current, next, last — a time and an EIP-2124 fork id, no name) join the named fork placed on that chain at the same second, else the only one within six hours, whose time the node's then sets; with none, they stand as dated, unnamed forks on their chain — so a fork the nodes have scheduled is listed even when no source announced it (BSC Chapel's Jenner, fork id0xe660a57e). The response'sfeeds.nodecounts the chains read and those whose RPCs refuse the method. A node's fork has no name, so chains-client-feed's/fork-sourceis asked where the chain's client code defines it — the repositories linked to the chain searched for the activation timestamp (JennerTime: newUint64(1793241000)in bnb-chain/bsc) — and its answer names the node's fork (which then joins the announced fork of that name on the chain) and adds the rest of that chain's schedule from the same configuration as feedsource(its history, linked to the file). The feed re-reads that code every period, and a found answer is asked again everyFORK_SOURCE_RECHECK_MS(1h), so a fork the client schedules in code later reaches the chain's history; a pending answer is retried afterFORK_SOURCE_PENDING_RETRY_MS(5 min), a failed one afterFORK_SOURCE_FAILED_RETRY_MS(30 min), a miss afterFORK_SOURCE_NOT_FOUND_RETRY_MS(1 day). A client release whose fork carrieschainIdsis placed on those chains first: chains-client-feed's model chose them from the networks the release's repository runs, reasoning from the notes, the repository and the fork ("BSC Chapel testnet" from bnb-chain/bsc is 97);[](it could not tell) and older releases without them fall through to the rules below. A client release whose network no registry name resolves ("BSC Chapel Testnet") is placed through its repository, because a dated fork on no chain is missing from every chain's history: the research's repository links (github:orgitlab:, with the client registry review'sexclude/keep/drop/addapplied) narrow the registry to the chains that client runs, and the closest is taken — the chains whose names (or the repository's) carry the most of the network's words (the word itself over one containing it: "coston" is Coston, not Coston2; "bitkub" still finds "KUB"), test-network words counting, the registry's structural words ("Chain", "Network", "EVM") not — then the network's kind (test or main), a live chain over a deprecated one, the fewest name words the network did not say, and for a named network the fewest structural ones ("Shibarium" over "Shibarium Beta"). A release naming no network, or a network none of the chains is called ("Pacific-1" for Sei), is read by kind alone — and only from a project's own client running three chains or fewer: a go-ethereum or reth release naming "Fusaka Devnet-3" is no Sepolia or chain 1 fork. A test-network fork may land on its mainnet ("Algorand Betanet" on Algorand; a test network the registry lacks, "Aleph Zero Testnet", under the network it tests when the release's repository is that network's) — the nearer error. Two chains tied on a named network are both kept; more, or a tie read by kind alone, stays unplaced. A fork placed only by its repository still folds into the fork a name placed at the same exact instant or height, like an unplaced one: a rollup client's "Hoodi Testnet" release of Ethereum's fork is Ethereum Hoodi's. A fork on no chain carriesunplaced:reason(ambiguous,no_network_named,no_matching_chain), the reportingrepositoriesand their chains ascandidates(chainId,name,testnet) — the review queue, listed withunplaced=trueand counted asunplacedCount; one with no candidates usually means the research lacks that repository's link.GET /timeline?chainId=&type=&phase=&since=&until=&limit=: the event timeline —hardfork(a fork entity from/forks),software_update(a client version rolled out with no fork behind it, each provider's window for that version on that network grouped into one event — planned work, never an incident) andmaintenance(a provider window naming no software). Under each event:releases(the client releases that ship it; one per repo, component and version, so a monorepo'sv1.38.0andminer/v1.38.0are both listed),providerUpdates(each provider's rollout window),news(articles and forum posts) andfollowedByIncidents(incidents on the network within 24h after activation, suspected only), withcountsof each. A provider window or release joins a fork only on a network the fork shares, and only by being one of its status posts, by naming a version one of its releases ships, or by naming the fork; never by time alone, and a window never widens a fork to the other networks it covers (a window covering two networks joins each network's fork). A version joins only the same client, or one left unnamed: geth and Erigon at the same version stay apart. A fork's fallout and news are its own, never a provider window's. One fork under several names or spelled two ways on the same chains is one event; which names are one fork is learned from/forks(names it found activating on the same chains at the same height or second, itsaliases, and aliases a source states itself, "Fusaka (Fulu)"), never from a fixed table, and the best-attested name leads (layerNamekeeps the client's); an undated release adding support for a named fork joins that fork when its chain, or a single mainnet activation, says which. A fork network given only as "Mainnet" / "Testnet" is read as the one chain of that kind the release names (it used to resolve to chain 1 through The Graph'smainnetid). Release history is paged back with?until=past the newest 500 fork-tagged releases (re-read hourly), so?chainId=…&type=hardforkis the chain's hardfork history as far back as the client feed's archive reaches; provider posts reach back only weeks. A plain client release becomes its own event only when it is an urgent fix or mandatory. A fork called off before it activated (phase: "cancelled") names what to run: each release carriesforkState(what that release said:scheduled,cancelled,rescheduled),softwarelists, per client, the newest release when it calls the fork off — cancels it, or reschedules it without naming a new date ahead (each release'sforkActivationAtis the date it stated; a reschedule to a later day still activates the fork, and one later cancelled does not count) —supersededSoftwareevery other version — and an emptysoftwaremeans no release that disables it is known yet, not that the old versions are safe — andupgradeBy— present while the original activation is still ahead — is when a node still on a superseded version activates the fork alone and forks off. It is still a cancelled fork: it sorts with the cancelled ones, never with upcoming forks. Thereleaseslist keeps a fork's newest 20, where a reschedule or cancellation lands.sourcessays which feeds answered;byType/byPhasecount everything matched before the phase/date filters. Also theget_timelineMCP tool (default 5 events, group lists sampled to 2) and the dashboard's Timeline view and chain-drawer Hardforks section.A provider incident its status page still marks open but has not updated for
PROVIDER_INCIDENT_STALE_MS(72h) is stale, not ongoing:/providers/statslists it understaleOngoing/staleIncidents(title, link, status, opened, last update) instead ofongoingNow, and charges it as downtime only until its last update, never to now; the dashboard shows it with a "Stale · no update since …" tag and a grey count on the provider board, and does not count it as open.Planned work is never an incident: a status event whose enrichment confidently classes it
planned_software_update,planned_hard_fork,urgent_software_fixorscheduled_maintenance(or the legacysoftware_update/hard_fork) counts as maintenance whatever its status — in/upgrades,/providers/stats, the chain-level correlation ofget_live_incidentsand the dashboard Incidents view (src/domain/plannedWork.js). A low-confidence class does not override the status; the incident sentinel's S2 lists the events this moves.CLIENT_FEED_URL: Blockchain client release feed (chains-client-feed), read by/forks/get_forks, the/client-releasesproxy routes and theget_client_releases/get_network_clientstools (default: unset = not read, and the proxy answers 503; there is no public host).CLIENT_FEED_FETCH_TIMEOUT_MS(default 10000),CLIENT_FEED_CACHE_TTL_MS(default 60000: how long the proxy holds one upstream answer; the last good answer is served, withstale: true, while the feed is down).GET /repositories: per chain, the research's node/client repositories and the hardware research's client names and evidence links, plusaliases(the registry's other names for the network: The Graph id and its aliases, e.g.chapelfor 97) — the raw input chains-client-feed builds its client registry and client → networks index from, and matches release fork networks against.WEB3_NEWS_URL: Ecosystem/editorial news feed for theget_web3_newstool (default:https://chains-news.johnaverse.cc). In-cluster deployments should set this to the Service DNS name.WEB3_NEWS_CACHE_TTL_MS/WEB3_NEWS_FETCH_TIMEOUT_MS: cache window and per-request timeout for that feed (defaults60000/10000)
Other
BODY_LIMIT: Maximum request body size in bytes (default: 1048576 = 1 MB)MAX_PARAM_LENGTH: Maximum URL parameter length (default: 200)MAX_SEARCH_QUERY_LENGTH: Maximum search query length (default: 200)CORS_ORIGIN: Allowed CORS origins (default:*for all origins)
See .env.example for a complete list of environment variables with example values.
API Endpoints
GET /
Get API information and available endpoints.
Response:
{
"name": "Chains API",
"version": "1.1.1",
"description": "API query service for blockchain chain data from multiple sources",
"endpoints": { ... },
"dataSources": [ ... ]
}GET /health
Health check and data status.
Response:
{
"status": "ok",
"dataLoaded": true,
"lastUpdated": "2026-02-07T14:13:42.104Z",
"totalChains": 1234
}GET /assistant
Assistant availability probe: {"enabled": true, "model": "qwen3"} (enabled: false when no LLM is configured).
POST /assistant/chat
Chat with the assistant. Stateless — send the full conversation each turn; the assistant may reply with a clarifying question (e.g. mainnet vs testnet) that you answer in a follow-up message.
Fast answers return 200 with the result directly. Runs that outlive the sync window (ASSISTANT_SYNC_WAIT_MS, default 8s — typical for large local models) return 202 {"jobId", "status": "running", "pollAfterMs"}; poll GET /assistant/chat/:jobId until status is done (result fields included) or error. This keeps every HTTP request short, so reverse-proxy/CDN timeouts never kill a slow LLM run.
Request:
{
"messages": [{ "role": "user", "content": "is base healthy right now?" }],
"context": { "view": "networks", "chainId": 8453 }
}Response:
{
"reply": "Base mainnet (`8453`): 5/5 monitored RPC endpoints healthy…",
"toolCalls": [{ "name": "get_rpc_monitor_by_id", "args": { "chainId": 8453 } }],
"degraded": false,
"usage": { "promptTokens": 1874, "completionTokens": 96 }
}Errors: 503 when not configured or the LLM is unreachable, 429 on rate limit, 400 on invalid payloads.
GET /rpc-monitor
Get RPC endpoint monitoring results for all chains. At startup, a background process validates the health of the indexed RPC endpoints.
Response:
{
"isMonitoring": false,
"lastUpdated": "2026-02-07T14:13:42.104Z",
"totalEndpoints": 4236,
"testedEndpoints": 850,
"workingEndpoints": 782,
"results": [
{
"chainId": 1,
"chainName": "Ethereum Mainnet",
"url": "https://eth.rpc.pinax.network",
"status": "working",
"clientVersion": "geth/v1.14.0",
"blockNumber": 19123456,
"testedAt": "2026-02-07T14:13:42.104Z"
},
...
]
}GET /rpc-monitor/:id
Get RPC monitoring results for a specific chain by its chain ID.
Example: GET /rpc-monitor/1 (Ethereum)
Response:
{
"chainId": 1,
"chainName": "Ethereum Mainnet",
"totalEndpoints": 15,
"workingEndpoints": 12,
"lastUpdated": "2026-02-07T14:13:42.104Z",
"endpoints": [
{
"url": "https://eth.rpc.pinax.network",
"status": "working",
"clientVersion": "geth/v1.14.0",
"blockNumber": 19123456,
"error": null,
"testedAt": "2026-02-07T14:13:42.104Z"
},
...
]
}GET /chains
Get all indexed chains.
Query Parameters:
tag(optional): Filter chains by tag (e.g.,Testnet,L2,Beacon)family(optional): Filter by technology family from the research dataset. Labels are free text (OP Stack / Zora,Matchain / OP Stack), so this is a case-insensitive substring match:?family=op stackfinds every OP Stack chain
Example: GET /chains?tag=Testnet
Response:
{
"count": 1234,
"chains": [ ... ]
}Example Chain Object:
{
"chainId": 80002,
"name": "Amoy",
"shortName": "polygonamoy",
"theGraph-id": "polygon-amoy",
"fullName": "Polygon Amoy Testnet",
"caip2Id": "eip155:80002",
"aliases": ["amoy-testnet", "amoy"],
"nativeCurrency": {
"name": "POL",
"symbol": "POL",
"decimals": 18
},
"explorers": [ ... ],
"infoURL": "https://polygon.technology/",
"sources": ["chains", "theGraph"],
"tags": ["Testnet", "L2"],
"status": "active",
"bridges": [
{
"url": "https://bridge.polygon.technology/"
}
]
}Note: Chain info no longer includes rpc or relations fields. Use /endpoints/:id for RPC endpoints and /relations/:id for chain relations.
GET /chains/:id
Get a specific chain by its chain ID. Unlike the list, the single-chain response also carries the chain's research block when it has research items or a hardware research entry (including checks that found no profile; see below). price is the native-asset quote or null when unavailable. The OpenAPI response schema documents the 200 detail and 400 / 404 error bodies; optional source metadata is retained rather than stripped by response serialization.
Example: GET /chains/80002 (Amoy)
Response:
{
"chainId": 80002,
"name": "Amoy",
"shortName": "polygonamoy",
"theGraph-id": "polygon-amoy",
"fullName": "Polygon Amoy Testnet",
"caip2Id": "eip155:80002",
"aliases": ["amoy-testnet", "amoy"],
"nativeCurrency": {
"name": "POL",
"symbol": "POL",
"decimals": 18
},
"explorers": [
{
"name": "polygonscan-amoy",
"url": "https://amoy.polygonscan.com",
"standard": "EIP3091"
}
],
"infoURL": "https://polygon.technology/",
"sources": ["chains", "theGraph"],
"tags": ["Testnet", "L2"],
"status": "active",
"bridges": [
{
"url": "https://bridge.polygon.technology/"
}
],
"price": null
}GET /search?q={query}
Search chains by name or ID.
Example: GET /search?q=ethereum
Response:
{
"query": "ethereum",
"count": 15,
"results": [ ... ]
}GET /endpoints
Get endpoints (RPC, firehose, substreams) for all chains.
Response:
{
"count": 4236,
"endpoints": [
{
"chainId": 80002,
"name": "Amoy",
"rpc": [
"https://rpc-amoy.polygon.technology",
"https://polygon-amoy-bor-rpc.publicnode.com",
...
],
"firehose": [
"amoy.firehose.pinax.network:443"
],
"substreams": [
"amoy.substreams.pinax.network:443"
]
},
...
]
}GET /endpoints/:id
Get endpoints (RPC, firehose, substreams) for a specific chain by ID.
Example: GET /endpoints/80002 (Amoy)
Response:
{
"chainId": 80002,
"name": "Amoy",
"rpc": [
"https://rpc-amoy.polygon.technology",
"https://polygon-amoy-bor-rpc.publicnode.com",
"wss://polygon-amoy-bor-rpc.publicnode.com",
"https://amoy.rpc.service.pinax.network"
],
"firehose": [
"amoy.firehose.pinax.network:443"
],
"substreams": [
"amoy.substreams.pinax.network:443"
]
}GET /relations
Get all chain relations data.
Response:
{
"count": 123,
"relations": [ ... ]
}GET /relations/:id
Get relations for a specific chain by ID.
Example: GET /relations/80002
Response:
{
"chainId": 80002,
"chainName": "Amoy",
"relations": [
{
"kind": "testnetOf",
"network": "matic",
"chainId": 137,
"source": "theGraph"
},
{
"kind": "l2Of",
"network": "sepolia",
"chainId": 11155111,
"source": "theGraph"
}
]
}GET /sources
Get status of data sources.
Response:
{
"lastUpdated": "2026-02-07T14:13:42.104Z",
"sources": {
"theGraph": "loaded",
"chainlist": "loaded",
"chains": "loaded",
"slip44": "loaded"
}
}GET /export
Export the disk cache snapshot file (DATA_CACHE_FILE) as JSON.
Returns:
200with JSON snapshot content when the file exists404when the cache file does not exist503when cache is disabled (DATA_CACHE_ENABLED=false)
Response (example):
{
"schemaVersion": 1,
"writtenAt": "2026-02-23T12:34:56.000Z",
"data": {
"lastUpdated": "2026-02-23T12:34:56.000Z",
"indexed": {
"byChainId": {},
"byName": {},
"all": []
}
}
}GET /slip44
Get all SLIP-0044 coin types as JSON. The table from the markdown file is converted to JSON format using "Coin type" as the key (id).
Response:
{
"count": 1279,
"coinTypes": {
"0": {
"coinType": 0,
"pathComponent": "0x80000000",
"symbol": "BTC",
"coin": "Bitcoin"
},
"60": {
"coinType": 60,
"pathComponent": "0x8000003c",
"symbol": "ETH",
"coin": "Ether"
}
}
}GET /slip44/:coinType
Get a specific SLIP-0044 coin type by its coin type ID.
Example: GET /slip44/60 (Ethereum)
Response:
{
"coinType": 60,
"pathComponent": "0x8000003c",
"symbol": "ETH",
"coin": "Ether"
}GET /l2-metrics
Ethereum L2 data from growthepie (chain-level, public "Basic" tier). growthepie must be credited wherever this data is shown; every response carries attribution. Covers ~26 chains (Base, Arbitrum One, OP Mainnet, zkSync Era, Scroll, Linea, Unichain, Mantle, Celo, MegaETH, Robinhood Chain, Polygon PoS, Starknet, Ethereum, …), joined by EVM chain ID; a chain it does not track is absent, not zero.
Read from eight growthepie files, each on its own cadence: master.json (profiles, daily), fundamentals.json (17 daily metrics, 90 days, hourly), fees/table.json (current fees, hourly), landing_page.json (users, ranks, all-L2 series, hourly), economics.json, blockspace/overview.json, da_overview.json (6-hourly) and eim/eth_supply.json (daily). A file that fails keeps its previous copy; one never read live is answered from data/growthepie-fallback.json (regenerate with node scripts/update-growthepie-fallback.mjs). dataSource is live, partial, fallback or unavailable.
GET /l2-metrics— every chain, compact:profileheadline (stack, DA layer, L2BEAT stage, chain type), latest value / date /change7dofdaa,txcount,tvl,stables_mcap,fees_paid_usd,profit_usd,rent_paid_usd,txcosts_median_usd,gas_per_second,throughput,market_cap_usd, the median transaction fee, users and 30-day economics; plus the all-L2aggregate,metricsInfolabels and blockspacecategories.GET /l2-metrics/:chainId?series=— one chain in full:profile(company, technology, purpose, launch date, stack, DA layer, RaaS, maturity, L2BEAT stage/id/link, explorers, website), every fundamental metric withchange7d/change30d(single day vs 7 / 30 days before — spiky on event days),avg7dandavg7dChange(7-day average vs the week before — the steadier trend) and the 90-day dailyseries(?series=falsedrops it),fees(median, native-transfer, swap and average transaction cost, TPS, throughput — newest hourly reading),activity(users, user share, cross-chain activity, rank per metric),economicsper span (1d…max: revenue, total / L1 / blob costs, profit, margin, data posted),blockspace(gas fees and transactions by category per span),daLayersUsed; chain 1 also carriesethSupply.GET /l2-metrics/da— data-availability layers (Ethereum blobs, Celestia, EigenDA): fees, data posted, fee per MB and consumers per span, and the top consumers.GET /l2-metrics/eth-supply— ETH supply and issuance rate (latest and the last year daily) and the supply events.GET /l2-metrics/status— each file'ssource(live/fallback), fetch time and last error.
/chains/:id (and get_chain_by_id) carries the compact block as l2Metrics for covered chains. Configuration: GROWTHEPIE_ENABLED (default true), GROWTHEPIE_API_URL (default https://api.growthepie.com/v1), GROWTHEPIE_FETCH_TIMEOUT_MS (30000), GROWTHEPIE_REFRESH_TICK_MS (900000: how often due files are looked for).
GET /client-releases
Proxy for chains-client-feed (the feed has no public host, so the dashboard reads it through here). Releases and changelog entries, newest first.
Query: limit (1–500, default 100), fork (true = only releases announcing a hard fork), chainId, repo (owner/repo, optionally github:/gitlab:-prefixed), since (ISO date or date-time). All passed through to the feed.
Response: {fetchedAt, stale, count, items:[{id, url, title, publishedAt, source:{id, name, kind}, chains:[{chainId, name}], chainsFrom: "release"|"repository", release:{repo, tag, version, prerelease, mandatory, security, securityEvidence, flagsChanged, flagChanges, flagChangesCarriedOver}, enrichment:{class, createdAt, summary, fork, forks?}}]}. security / flagsChanged are read by the feed from the full notes (see GET /client-releases/latest); null = no notes or a feed that predates them. fork is {name, network, activationAt, activationBlock, state} plus activationEpoch / activationSlot / activationTimestamp when the notes state them. Missing upstream fields come back as null / [].
Related routes:
GET /client-releases/latest?repo=— see below.GET /client-releases/clients?q=&kind=&chainId=— the client registry (repositories and name-only clients), each withkinds,names,networkCount,latestRelease,latestFork.GET /client-releases/clients/:host/:owner/:repo— one repository (host=github|gitlab;owner/repo=[A-Za-z0-9_.-]+, never only dots) with every network it serves (networks:[{chainId, name, kinds, source}]) — the reverse lookup. 404 when the feed does not know it.GET /client-releases/networks/:chainId— clients serving a chain, with the kinds each plays on that chain.
Errors: 503 {error: "Client release feed not configured"} when CLIENT_FEED_URL is unset; 502 when the feed fails and nothing is cached. Responses are cached per upstream URL for CLIENT_FEED_CACHE_TTL_MS.
GET /client-releases/latest
The latest release of one client repository, answering the questions an operator asks of it. MCP: get_latest_release.
Query: repo (required: owner/repo — GitHub, or GitLab when GitHub has no releases of it, e.g. tezos/tezos — github:owner/repo, gitlab:owner/repo, or the repository URL), component (a monorepo's component, e.g. op-node), prerelease (true = the newest release even when it is a prerelease; default stable only).
Response:
{ "repo": "github:ethereum/go-ethereum", "component": null,
"latest": {
"version": "1.17.8", "tag": "v1.17.8", "url": "https://github.com/ethereum/go-ethereum/releases/tag/v1.17.8",
"publishedAt": "…", "prerelease": false, "client": "ethereum/go-ethereum",
"hardfork": { "included": false, "forks": [] },
"mandatory": false,
"security": { "update": true, "source": "notes", "scope": "client", "ids": [], "advisories": [], "quote": "This is a security-focused release, …" },
"flags": { "changed": false, "changes": [], "carriedOver": 0 },
"class": "urgent_software_fix", "summary": "…", "chains": [ … ], "chainsFrom": "repository" },
"newerPrerelease": null }hardfork.included: the release schedules a fork (classplanned_hard_fork, or a fork in statescheduled/rescheduled).forkslists every fork the notes name, completed ones included, with network, state and activation —stateis what the notes said (ascheduledfork staysscheduledafter its date),phaseis where it stands now (upcoming/past/cancelled/unscheduled, as on/forks; a date-only activation staysupcominguntil that UTC day ends) — one entry per fork and network: a fork the feeds have shown under another name is listed under the best-attested one (Hoodi's activation reported as Glamsterdam, Gloas and Amsterdam makes geth'sAmsterdamreadGlamsterdam;layerNamekeeps the client's), and a network that is one of the release's chains carries its registry name andchainId(Hoodi→Ethereum Hoodi, 560048). Acompletedfork with no date, height or timestamp takes its phase from/forkswhen that lists the same fork on the release's chains and nowherepast(phaseFrom: "forks"): the notes' word alone was read as past a week before Hoodi's Glamsterdam. When the notes name no network and/forksknows the fork on several of the release's chains, it is listed once per network, each with that network's phase and date from/forks; an entry the notes tie to a network themselves wins over the expanded one.reviewappears when the notes carry fork or obligation wording the model did not confirm: a possible fork, never a "no".mandatory: the notes oblige operators to upgrade (or the release schedules a fork activation).security.update:source: "advisory"when a published GitHub advisory of the repository names this version as the first patched one (retroactive, withadvisories[]and severity);source: "notes"when the notes state a security fix (security wording, a Security section, CVE / GHSA ids).scope: "dependency"marks a fix that only bumps a library or toolchain.flags.changes[]:{flag, change, quote}withchangeone ofadded,removed,deprecated,renamed,default_changed,changed. Changes the previous release already stated (standing deprecation lists) are dropped and counted incarriedOver.nullis unknown, never "no":hardfork.included/mandatorybefore the release is classified;security.update/flags.changedfor a release without notes or a feed that predates the fields.A monorepo (several components in one repository) adds
components[], the newest release of each, so the caller can pick one withcomponent.newerPrereleasenames a prerelease newer than the stable answer.
Errors: 400 for a repo that is not owner/repo or a GitHub/GitLab URL; 404 when the feed records no release for the repository (or component); 502/503 as above.
GET /chains/:id/profile answers everything a profile page shows in one request (cached 30 s per chain): the chain record with price, the relation graph, endpoints with probe results, node clients, client software, hardforks, software updates and maintenance, the status page and validation findings; a part whose source fails is null and named in unavailable. On the profile, endpoints the monitor last found failing are not listed (their count is), and every other endpoint is tested from the reader's browser as it comes into view: the eth_blockNumber round trip (best of two), or why it does not work from there. An undated fork that a later fork on its chain has outrun (nothing mentioned it after that one went live) is past, marked pastInferred with the fork and time that show it, and shows as past (inferred), never date TBA.
Timeline: the full timeline has its ranges (1D, 7D, 30D, All) and streams; an upcoming event past the range is still listed, and counted by the chart. The Hardforks filter has no range: Upcoming, Past and TBA (no date yet; known-done undated forks are Past), its chart spanning the filter's dated forks — on Past the last 90 days, older forks listed and counted.
Chain profile pages: every network has a page at <dashboard>/chains/<id> (e.g. https://www.johnaverse.cc/chains-api/chains/1, or /ui/chains/1 on the API), opened from the chain drawer's Full profile link or any related-chain link. It gathers /chains/:id, /relations/:id/graph (an interactive relationship graph, direct and second hop, with the same relations listed by source), /endpoints/:id joined to /rpc-monitor/:id, /clients/:id, /client-releases/networks/:id, /forks and /timeline for the chain, open incidents, L2BEAT and growthepie figures, research (with its coverage, audit status and check date), node hardware requirements per role and level from research.hardware (as the project documents them, with qualifier, verification and sources), /validate?chainId= findings and the raw records. Warnings above the figures name open incidents and the next hardfork. GitHub Pages has no rewrites, so the deploy writes 404.html as the app with a <base> at the site root; the API serves /ui/chains/:id the same way (src/http/appShell.js).
Dashboard: Activity → Releases lists /client-releases?limit=200 (the Forks only toggle re-reads with fork=true) with chain and client filters; each card shows the repo linked to its release, version/tag, pre-release / mandatory badges, published time, the AI summary, a fork line (name, network, activation — a time only when one was stated, plus block/epoch/slot/timestamp — and state) and its chains (labelled Repository networks when the notes named none). The chain drawer gains a Clients section from /client-releases/networks/:chainId, where Supports N networks expands the client's other networks (each opens that chain). Both stay hidden when the API answers 503.
POST /reload
Reload data from all sources.
Response:
{
"status": "success",
"lastUpdated": "2026-02-07T14:13:42.104Z",
"totalChains": 1234
}GET /validate
Validate chain data for potential human errors across all three data sources.
?chainId=<id> returns only that chain's findings (chainId, totalErrors, errorsByRule with the rules that have any, allErrors) — what a chain's profile page reads.
This endpoint analyzes the chain data and identifies potential inconsistencies or errors based on the following rules:
Rule 1 - Relation Conflicts: Assumes graph relations are always true and finds conflicts with the chain's tags
Rule 2 - Mainnet or Testnet, Sources Disagree: every source's claim — The Graph
networkType/testnetOf, aparent.type: "testnet"(stated), the name's "Testnet"/"Mainnet" (name), and the hints:slip44: 1(chains.json's; chainlist copies it, so it counts once), chainlistisTestnet, the parent's type for a chain the sources file under another (an L2 of Ethereum mainnet is a mainnet), and a learned test-network word — or "mainnet" — in the chain's own RPC, explorer and faucet hostnames (testnet-rpc.atleta.network,mainnet.superseed.xyz) — withsource,field,value, what itsaid, and for a hint its learnedaccuracy. The strongest claim decides; disagreeing hints vote, each weighted by how often it agrees with a stated type on the chains that have one (learned per value at every index; 2026-10-28: chainlistisTestnet: false74/78, slip44=1 27/29, a test word in the hosts 47/49), starting from the base rate of test networks among those chains.contested: truemarks claims of equal strength that disagree — a review list, not a finding.Rule 3 - Name/Tag Mismatch: Chain full names containing "Testnet" or "Devnet" but not tagged as Testnet
Rule 4 - Named After a Test Network: Chains whose name contains another testnet's own registry id or alias ("Base Sepolia" → Ethereum Sepolia's
sepolia) but are not tagged L2 and have no relations. Which words name a test network is read from the registry, not a list.Rule 5 - Status Conflicts: Deprecated status conflicts across different sources
Rule 6 - Deprecated Here, Not Upstream: Chains chains-api treats as deprecated (its end-of-life seed, or a deprecated parent) that no upstream source marks deprecated. Each carries
statusReasonand afixnaming the ethereum-lists/chains file to update (_data/chains/eip155-<id>.json,status: "deprecated"). Live on 2026-10-19: 18 chains, Goerli, Ropsten, Rinkeby, Mumbai and their L2s among them.Rules 7–17: L2BEAT classification, RPC block-height drift, name / currency / SLIP-44 disagreements, RPC URLs in one source only, active children of deprecated parents.
Rule 18 - No RPC Answers, Not Deprecated: every listed endpoint has failed with nothing answering (
unreachable,timeout,tls_error) for at leastRPC_DEAD_AFTER_MS(3 days; each endpoint'sunansweredSinceruns across consecutive silent checks and restarts on any answer) and no source calls the network dead — dead and unmarked upstream, or its endpoints moved. An endpoint that answered at all (rate limit, HTTP error, a refused method, a client version without a block) does not count as gone, nor does a reset connection or an unrecognised error, which may be on our side.Rule 19 - Deprecated But an RPC Answers: a deprecated chain with an endpoint still serving blocks for that chain.
Rule 21 - An RPC Serves Another Chain: an endpoint listed for this chain answers
eth_chainIdwith another (Tempo's deprecated Andantino listing Moderato's RPC; 0G Galileo 16601 its successor 16602's). The registry entry is wrong, not the endpoint; it is not counted as this chain's (failurewrong_chain, withservedChainId), so it never reads as rule 19 or 12.
Each finding has a severity: error — data a source should fix — or notice — worth knowing, not wrong: an L2BEAT risk signal (11), two spellings of one name (13), an endpoint only one source lists (16). bySeverity counts both. Rule 15 (SLIP-44 symbol) flags only a coin type of the chain's own: one several chains use with different currencies (Ethereum's 60 borrowed by EVM chains) is a convention, learned from the registry at each run.
Rule 20 - One Chain ID, Different Networks: the sources describe different networks under one ID (names with no word in common AND different native symbols). The record is built only from the sources that agree — the larger group, else chains.json, then The Graph, then chainlist — and the others are left out of it entirely (no name, RPCs, type or tags), listed with
kept,excludedand each source'sidentities(name,symbol). 12 on 2026-10-27: 999 is HyperEVM in chainlist and The Graph but Wanchain Testnet in chains.json; 222 is Permission in chains.json but OPN Chain in chainlist.
RPC health records each failed endpoint's failure kind. A provider that refuses our volume (HTTP 429, EIP-1474 -32005, or an error worded as a limit or "try again") is rate_limited: its endpoints are reported with status rate_limited — neither working nor failed, and left out of healthPercent — and that provider (registrable domain, so thirdweb's per-chain hosts count as one) is not probed again for 10 minutes, doubling to an hour while it keeps refusing, with each endpoint keeping its last result meanwhile. Failure kinds: unreachable / timeout / tls_error / connection_error / rate_limited / http_error / rpc_error / invalid_response / answered_no_block / wrong_chain / unknown / private_address. An endpoint that serves blocks is asked eth_chainId; one answering for another chain is wrong_chain (with servedChainId) and not working; one that does not answer it is judged on its blocks. private_address means the endpoint's hostname resolves to a non-public address, so it is never probed: registry URLs are community-submitted, and the same check guards the chain-halt probe and the Blockscout explorer reader. An endpoint serving blocks counts as working even when it disables web3_clientVersion.
Response:
{
"totalErrors": 85,
"summary": {
"rule1": 3,
"rule2": 57,
"rule3": 16,
"rule4": 1,
"rule5": 1,
"rule6": 7
},
"errorsByRule": {
"rule1_relation_conflicts": [...],
"rule2_network_type_claims_conflict": [...],
"rule3_name_testnet_mismatch": [...],
"rule4_test_network_no_relation": [...],
"rule5_status_conflicts": [...],
"rule6_deprecated_not_upstream": [...]
},
"allErrors": [...]
}Example Error Object:
{
"rule": 6,
"chainId": 5,
"chainName": "Goerli",
"type": "deprecated_not_upstream",
"message": "Chain 5 (Goerli) is deprecated here (curated: known end-of-life network) but no upstream source marks it deprecated",
"statusReason": "curated: known end-of-life network",
"statusInSources": [],
"fix": { "source": "ethereum-lists/chains", "file": "_data/chains/eip155-5.json", "set": { "status": "deprecated" } }
}MCP access: licence keys and OAuth
With PUBLIC_ORIGIN set (e.g. https://chains-api.johnaverse.cc), the MCP endpoint /mcp needs authorization; without it, MCP stays anonymous. The REST API and the dashboard stay public under the terms.
Licence keys (cak_…), one per licensee, are kept as SHA-256 hashes in the chains_api database:
kubectl -n chains-api exec deploy/chains-api -- node src/cli/licenceKeys.js create "Acme Corp" # prints the key once
kubectl -n chains-api exec deploy/chains-api -- node src/cli/licenceKeys.js list
kubectl -n chains-api exec deploy/chains-api -- node src/cli/licenceKeys.js revoke <id> # disconnects that licensee's connectorsA client that can send a header uses the key directly: Authorization: Bearer cak_… (Claude Code: claude mcp add --transport http chains https://chains-api.johnaverse.cc/mcp --header "Authorization: Bearer cak_…").
OAuth 2.1 for connectors that only speak OAuth (ChatGPT, claude.ai, Claude Desktop): add https://chains-api.johnaverse.cc/mcp as a remote MCP server; the connector gets a 401 pointing at the protected-resource metadata, discovers the authorization server, registers itself, and opens the consent page, where the licensee pastes their key. The connector then gets its own tokens; the key is never shared with it.
Endpoints:
/.well-known/oauth-protected-resource[/mcp](RFC 9728),/.well-known/oauth-authorization-server(RFC 8414),/oauth/register(RFC 7591),/oauth/authorize,/oauth/token,/oauth/revoke(RFC 7009).PKCE with S256 only;
stateandissin the response; one resource (/mcp, scopemcp;offline_accessaccepted and implied). Public and confidential clients (client_secret_post/_basic); redirect URIs HTTPS, or HTTP on loopback; at most 200 clients, a registration unused for an hour is removed.Access tokens last 1 hour, refresh tokens 30 days and rotate on every refresh; codes last 2 minutes and are single use (a failed exchange spends the code). Only hashes are stored.
A grant records the licence key that approved it: revoking the key ends its grants at once.
The consent page is served with a strict CSP,
frame-ancestors 'none'andX-Frame-Options: DENY; its form accepts only this origin./mcprefuses requests whoseOriginis another site.Rate limits: registration 20, authorization 60, token 300 per minute per visitor. On
/mcp, every request spends its address's budget (MCP_RATE_LIMIT_MAX), and an authorized one also its licensee's.The MCP audit line names the
licenseeand how it authorized (oauthorkey).
Cloudflare MCP Portal: add https://chains-api.johnaverse.cc/mcp as an MCP server with OAuth → Automatic (dynamic client registration; approve once on the consent page with a licence key), or through the API with auth_type: "bearer" and a licence key as auth_credentials. With Require user auth on, each portal user consents with their own key and is audited as that licensee; off, every call uses the admin's grant. All portal users arrive from the portal's egress address, so an authorized request does not spend the address's budget, only its licensee's.
Pay per call: x402 (optional)
With X402_ENABLED=true, MCP tool calls can also be paid for with x402 instead of a licence: USDC per call, verified and settled by an x402 facilitator. It follows the x402 v2 MCP transport, so Cloudflare's withX402Client (agents/x402) and other x402 MCP clients pay without extra setup. It is off by default.
Variable | Default | |
|
| Turn pay-per-call on |
| (required when on) | Wallet that receives payments ( |
|
| EVM network as CAIP-2 ( |
|
| Price of one tool call, in USD (paid in USDC); at least |
|
| Facilitator that verifies and settles payments; this one serves testnets, so Base mainnet needs one that supports it |
|
| Comma-separated bare public hostnames, always charged (a scheme, port or path stops startup); with neither set, every request is |
| (registry) | Comma-separated http(s) RPC endpoints of the payment network that you trust, at least two distinct ones (a URL listed twice counts once), for the on-chain check of a lost settlement. A payment taken on another network (before |
How it behaves:
Where to connect. Payers use
/mcp/pay(e.g.https://chains-api.johnaverse.cc/mcp/pay)./mcpis unchanged: withPUBLIC_ORIGINset, a request without a token still gets the401that starts OAuth, so licensees' connectors (claude.ai, the Cloudflare MCP Portal with OAuth → Automatic) keep signing in, and the401names/mcp/payfor anyone who would rather pay. WithoutPUBLIC_ORIGINthere are no licences, and/mcpcharges too.Free only when provably in-cluster. A request without a licence is free only when all of these hold: its
Host(port and trailing dot ignored) is not anX402_DOMAINShost; it reached the pod straight from a private address (the TCP peer, not a header); and it carries noCF-Connecting-IP,X-Forwarded-For,ForwardedorX-Real-IP. Everything else is charged, including a request of unknown origin, so exposing the service under another hostname or through another proxy charges it rather than giving it away. In-cluster callers that address the Service (chains-api.chains-api.svc:3001) or a pod use the tools free, on either path, with no token, and see no prices. The decision is made for each HTTP request, so a session started in-cluster pays for a call that arrives through a proxy.Connecting is free.
initializeandtools/listcost nothing.tools/listmarks each tool with_meta["agents-x402/paymentRequired"]and["agents-x402/priceUSD"], and the server instructions state the price.Paying for a call. An unpaid
tools/callgets a tool result withisError: truewhosestructuredContent(alsocontent[0].textand_meta["x402/error"]) is the x402PaymentRequired: schemeexact, network, amount, asset,payTo. Its text also names the licence route. The client signs a payment and repeats the call with it inparams._meta["x402/payment"](an object or base64 JSON; aPAYMENT-SIGNATUREorX-PAYMENTheader also works). The facilitator verifies the payment, then the tool runs. The payment is settled only if the tool succeeded, and the receipt comes back in_meta["x402/payment-response"]. If settlement fails, the result is withheld.Malformed payments. A payment of an unknown x402 version, or one that doesn't match what the tool accepts, gets
PaymentRequiredagain.Price or wallet changes. New payments must match today's terms. A payment already recorded is still recovered or answered again on the terms it was taken under (network, asset, amount,
payTo, as recorded), so a call paid just before a change isn't charged again at the new price. A recorded payload relabelled with other terms is refused.A payment ledger shared by every pod. Each payment, identified by its EIP-3009 authorization (payer and nonce on the token), is recorded in the
x402_paymentstable of thechains_apidatabase before its tool runs. The table is created on the ledger's first use, so a deployment with x402 off never touches it. Without a database the ledger is in memory, which is enough for one pod only, and startup warns about it.A payment in use by another call is answered "in use" (no
accepts, so no new payment is invited) until that call ends. A call that hasn't finished after 2 minutes, for example because its pod stopped, is taken over.A slow call that was taken over may still finish. If its own settlement is then refused, that refusal isn't final, because the takeover may have settled the payment: the call is answered from the record instead (the takeover's receipt, or "pending"), never with a request for a new payment.
A recorded payment is only acted on for the payload the payer signed: the payer and nonce are public once on-chain, so a payload that matches them but differs anywhere else (a forged signature) is refused, and the record is left untouched. Key order doesn't matter: payloads and arguments are compared in canonical form.
A payment is bound to the call it was first used for (tool and arguments). Only that call is answered again or recovered with it. Another call with an unresolved payment is answered "pending for a different call", with nothing to accept, and the record is left for the original call to recover.
The same paid call repeated with its payment within 5 minutes of settlement is answered again without another charge, in case the first answer was lost. After that, or for any other call, the payment counts as spent.
A recovered or repeated answer is a fresh run of the tool, a current read of live data rather than a stored copy of the first result (which no caller received). Its receipt is the original payment's, marked
"rerun": truein_meta["x402/payment-response"].A tool that fails, or throws, is not charged, and its payment is released for reuse at once. Release is checked against the claim as it was read, so a call that lost its claim to a takeover can't drop the new owner's record.
Once a payment has settled, a failed ledger write is logged and the call is still answered. The record stays in flight, so a retry after the 2-minute lease is recovered from the chain.
If the ledger is unavailable, no payment is taken ("temporarily unavailable").
A settlement that fails at broadcast is tried again. A facilitator that settles for many clients from one wallet sometimes gives two settlements the same transaction nonce, and its node refuses one (
invalid_exact_evm_transaction_failed). That says nothing against the payment, so the same payment is settled again, up to twice more, about half a second and then two seconds later; its authorization can move funds once at most, so a repeat cannot charge twice. No further attempt is made once settling has taken 30 s. If it still fails, or a later attempt is refused for another reason, the chain decides as for a lost settlement below: a transfer found there is the receipt, an authorization that can never pay getsPaymentRequired, and anything else isunresolved, to be retried with the same payment. A refusal for the payment itself (signature, balance, validity) is not repeated.A settlement whose outcome is lost is never charged twice. This covers the facilitator not answering, the answer being lost after the transfer happened, and
settlement_pending. In each case the result is withheld, and the answer is not aPaymentRequired: it has noaccepts, so an x402 client does not sign a second payment. Its_meta["x402/payment-response"]is{ success: false, status: "unresolved" }, with the transaction hash when known, and its text says to retry with the same payment.That retry runs the tool first, as a first attempt does: a payment is settled only for a successful answer, including when it is taken over from a pod that stopped. It then settles the same authorization again, which can move funds only once.
Any outcome of that settlement other than success (a refusal, an expired authorization, a spent nonce, no answer) is checked on-chain before it is believed, because the earlier attempt may already have paid.
The token contract is read on-chain through the endpoints in
X402_RPC_URLS(the first three distinct ones), or else the chain's three fastest healthy RPC endpoints from this registry. Each endpoint votes once, and one whoseeth_chainIdis not the payment's network is left out:first the settlement's transaction receipt, when its hash is known, so a node that has it is heard even if others lag;
then
authorizationStateat the latest block, andAuthorizationUsedlogs, searched back over 5000 blocks in ranges of at most 1000 (the cap many public endpoints set);and the
Transferin the transaction found. A missing receipt counts as unknown, never as a transfer elsewhere. So does a receipt whose block is not the one the endpoint holds at that height (a dropped branch), or whose block can't be read; and endpoints agree only when they place the transaction in the same block: one that places it in another disputes the others, and the payment stays unknown.A transfer counts for one authorization only. When a transaction uses several of the payer's authorizations (a batch), each is matched to the
Transferthe token emits right after itsAuthorizationUsed; a batch that can't be read that way stays unknown.
Paid: if two endpoints show the same transaction paying at least the price to
payTo, and no endpoint read the authorization's use otherwise, the call is served with it as its receipt (recovered)."Otherwise" is another transaction or outcome, or the nonce spent with no use in the range searched (a cancelled authorization). The registry's endpoints come from public lists, so two of them could be an attacker's, voting "paid" for a payment they cancelled. An endpoint that lags, or fails its log search, disputes nothing.
The transfer counts for this payment only if its block came after the payment was first claimed here (30 s allowed for clock skew). An earlier one paid for another use of the same authorization (another deployment's ledger, or a facilitator that let a spent authorization through verification): the payment is refused. Either answer needs every agreeing endpoint to date the block on that side of the claim; when they differ, or one can't read the block's time, the payment stays unresolved.
Refused, so a new payment is asked for, only on proof that ours never happened:
the nonce spent on a transfer that didn't pay us, shown by two endpoints in a finalized block; or
the authorization unusable for good: two endpoints have both finalized the same block (number and hash) whose time is past its
validBefore, and show the nonce unspent in that block's own state, read by its hash (EIP-1898,requireCanonical) rather than by its height, where another backend of the same endpoint could answer from another view. An endpoint has no vote when it names no finalized block, hasn't finalized that one, returns a block with a missing or malformed timestamp, hash or number, or can't read state by block hash. An endpoint that shows the nonce spent in that block rules the refusal out, whatever the others agree on."Unspent at the latest block" is never enough: a lagging node says that of a transfer it hasn't seen yet. Any sign of use on any endpoint (a receipt, a spent nonce, a log) also rules a refusal out, including an endpoint that shows the nonce spent and then fails to find its transaction (public endpoints often cap
eth_getLogs).
Otherwise the payment stays unresolved.
Unresolved payments are logged as
x402 payment unresolved.
Facilitator outages. If the facilitator can't be reached, or doesn't serve the network, calls are answered "temporarily unavailable", and the facilitator is asked again after 30 s rather than once per call. The same 30 s pause follows a verify request the facilitator failed to answer. A payment the facilitator rejects, whether as
isValid: falseor as an HTTP error carrying that result (VerifyError), is an invalid payment and pauses nothing.A definitive refusal (a first settlement the facilitator rejects for any reason but a spent nonce or a failed broadcast, with no send failed at broadcast before it, while the call still holds its claim on the payment) withholds the result and asks for a new payment.
Licensees. A licence key or OAuth token never pays and sees no prices, on either path. An invalid token is refused with
401.Audit. Each settled payment is logged (
x402 payment: tool, payer, transaction, network, amount, asset) and counted inchains_api_x402_payments_total{outcome}(required,invalid,settled,recovered,redelivered,unresolved,busy,other_call,not_charged,settlement_failed,unavailable), withsettlement_retriedcounting repeated settle attempts. A refused settlement is logged asx402 settlement refusedand a repeated one asx402 settlement failed at broadcast; retrying, each with the tool, payer, authorization nonce and the facilitator's reason.REST. The REST API stays public and is not priced.
Usage audit
Every REST and MCP request except /health, /ready and /metrics writes one log line ("msg":"api access" or "mcp access", field audit), replacing fastify's per-request pair:
method,route(the template, e.g./chains/:id;unmatchedfor unknown paths,/ui/*for the dashboard's files),path,status,ms,chainIdwhen the request names one;the client:
ip(Cloudflare'sCF-Connecting-IP, else the firstX-Forwarded-Forhop),country(CF-IPCountry),kind,ua,referer(host),origin,site;MCP lines add
rpc(the JSON-RPC methods) andtools(fortools/call) andsession.
kind is judged from what the client sends: internal (another service in the cluster: no Cloudflare or proxy headers, a private address), dashboard (from /ui on this host or a DASHBOARD_ORIGINS origin), browser (another page: a browser user agent with Fetch Metadata headers), bot (a declared crawler), else script (curl, SDKs, servers). site is the host of the referrer, or of the Origin when there is no referrer.
Each assistant chat turn writes one more line when it settles, "msg":"chat access" (audit: "chat"): the question (the last user message, up to 500 characters), turns, the dashboard view and chainId it was asked from, outcome (ok, degraded, off_topic, error), the tools the answer used, viaFallback, ms and the same client fields. The answer is not logged here; the LLM proxy keeps the exchange (the terms' Privacy section says for how long).
Metrics (/metrics): chains_api_http_requests_total{route,method,status,kind}, chains_api_http_request_duration_seconds{route,method} (histogram), chains_api_mcp_rpc_total{rpc,status}, chains_api_mcp_tool_calls_total{tool,status}, alongside the assistant's chains_api_assistant_tool_calls_total. Labels never carry an IP or a raw path.
Tracing
OpenTelemetry traces, exported as OTLP over HTTP (protobuf). Off unless OTEL_EXPORTER_OTLP_ENDPOINT (or OTEL_EXPORTER_OTLP_TRACES_ENDPOINT) is set: without it no exporter is loaded and every span is a no-op. The exporter reads the standard OTEL_EXPORTER_OTLP_* variables (endpoint, headers, timeout) itself.
Span | Kind | What it covers | Attributes |
| server | one REST request. |
|
| server | one MCP request on |
|
| client | one outbound HTTP request made inside a traced request or job |
|
| client | one model call (assistant), GenAI conventions |
|
| client | one JSON-RPC call made inside a traced request |
|
| client | one database query made inside a traced request |
|
| internal | one assistant run, under the request that started it and ended when the run settles, so a run answered with 202 keeps its model, feed and RPC calls | |
| internal | one background job: a data refresh with its source fetches, and one refresher sweep as a single span with its totals ( |
Per-call spans exist only inside a trace. The rolling refresher and the health checks run all day against thousands of endpoints; a call with no request or job span around it is not recorded.
Kept off the spans: client addresses and user agents (they stay in the usage audit lines), raw paths, query strings, tool arguments, request and response bodies, prompts and answers, and query values. A URL path segment is recorded only when it reads as plain route words (short lowercase words and numbers, after decoding) and is otherwise recorded as
:key. This is a reduction, not a guarantee: a key that happens to look like a short lowercase word passes. A JSON-RPC span records the endpoint's host only, and an RPC endpoint is never sent the trace context, sampled or not.Whose trace is continued. A
traceparentis honoured only from another service in the cluster: a private peer address, none ofCF-Connecting-IP,X-Forwarded-For,ForwardedorX-Real-IP(even empty), and not addressed to the public hostname. The header carries the sampling decision too, so a public caller's is ignored and its request starts a new trace, kept atOTEL_TRACES_SAMPLER_ARG.At shutdown, what is still running (a request, an assistant run, a sweep) is ended with
shutdown: trueand sent with the rest, waiting at most 3 seconds for the collector.Of the standard variables only the ones named here are read:
OTEL_TRACES_SAMPLERandOTEL_TRACES_EXPORTERare not (sampling is always parent-based with the ratio below, export is always OTLP).An abandoned request (the client went away before it was read) ends its span with
http.request.aborted.Failures are recorded by category (
error.type: the error's kind or class) and an error status. The message and stack are not recorded: an endpoint's error text can echo a key or a request value.Trace context (
traceparent) is sent to services in the cluster only (the feeds, the model gateway), so their spans join the trace, and also when the trace is not sampled, so they follow the caller's decision. It is never sent to public sources or RPC endpoints.Logs: with tracing on, every log line written inside a span, the usage audit lines included, carries
trace_idandspan_id.OTEL_SERVICE_NAME(defaultchains-api) names the service. A trace that starts here is kept atOTEL_TRACES_SAMPLER_ARG(0..1, default 1); a trace the caller sampled is always kept.OTEL_SDK_DISABLED=trueturns tracing off.
Data Structure
Chain Object (from /chains endpoints)
Each chain object returned from /chains and /chains/:id contains:
chainId: The chain ID (extracted from caip2Id for The Graph data)name: Full name of the chainshortName: Short name/symboltheGraph-id: The Graph network identifier (if available from The Graph)fullName: Full network name (if available from The Graph)caip2Id: CAIP-2 identifier, e.g., "eip155:1" (if available from The Graph)aliases: Alternative names array (if available from The Graph)nativeCurrency: Native currency informationexplorers: Array of block explorersinfoURL: Information URL. Where the research dataset moved a chain to a different website (or filled a missing one), this is the corrected one, withinfoURLSource: "research"and the registry's original kept inregistryInfoURLfamily: Technology family (e.g.OP Stack-derived), from the research datasetsources: Array of data sources that provided this chain's datastatus: Chain status - defaults to"active"when not present in any data sourcetags: Array of tags (e.g., "Testnet", "L2", "Beacon")bridges: Array of bridge URLs (if available from chainlist or chains.jsonparent.bridgesfield)
Note: Chain objects no longer include rpc or relations fields. Use /endpoints/:id for RPC endpoints and /relations/:id for relations.
research (from /chains/:id only)
A static, audited research dataset (data/network-research.json, ~3,000 chains), converted from the network research and verification workbook, plus the forum research (data/forum-research.json), the node hardware research (data/node-hardware.json) and the communication channel research (data/channel-research.json). Network research items include only checked/partial evidence whose audit was not unresolved; forums and channels include confirmed/qualified records. Hardware retains every researched entry and profile, including unresolved profiles and empty results with status, notes and sources. The block is omitted only when there are no research items or hardware research entry (family is still set on the chain itself). Optional raw metadata is retained at every level.
family,coverage(checked/partial/not_found/inaccessible),auditStatus(confirmed/qualified/corrected/unresolved/no_populated_claims_to_audit),checkedAt,updatedAt(dataset date)repositories[]: node/client source —url,repo(owner/namefor GitHub),kind(node,execution,consensus,rollup,packaging,sdk,contracts,other),kindLabel(original wording),status,audit,evidence[]papers[]: whitepapers and documents —url,title,status,audit,evidence[]features[]: short sourced statements —text,status,audit,evidence[]. These are project statements, not tested factsforums[]: discussion boards the forum research tied to the chain (fromdata/forum-research.json, ~600 chains) —url,title,type(governance/community/developer/research/general),relationship(official/community_run/uncertain),scope(exact_network,project_family= the project's shared board,ecosystem_shared,historical_network,uncertain),access(read/inaccessible/archivedat research time),activity(recent_activity_observed/historical_or_archived/unknown),lastActivity,verification(confirmed/qualified),notes,evidence[]; plusforumsCheckedAtandforumsStatus(the research outcome for the chain:found/partial/ …, also when no record was kept). Only confirmed or qualified records are included. This is research, not the polled registry: the chain'sforumUrlstill comes from the curateddata/forums.json, which is whatchains-forum-newsreadschannels[]: public community / developer / support routes the channel research found linked from a primary project source (fromdata/channel-research.json, ~1,400 chains), most specific first —platform(discord,telegram,x,emailwith amailto:url,slack,gitter,matrix,wechat,contact_form,other),url,canonicalUrl(where the link resolves, when different),title,mode(discussion/announcements/support/mixed/unknown),audience[],language,relationship(official_operated/officially_endorsed= linked by the project, not necessarily run by it /community_run/uncertain),scope(as for forums),access(public_preview_read,public_discussion_read,invite_unverified,login_required,inaccessible,not_checked, at research time),invitation(verified_preview/official_link_unverified/not_applicable/unknown),lastActivity,alternateInvites[],verification(confirmed/qualified),notes,evidence[]; pluschannelsCheckedAt,channelsStatus(the research outcome:found/partial/ …) andchannelsIdentityStatus(confirmed/qualified/unresolved: how firmly the research tied the project to this chain). Optionalactivity,checkedAt,evidenceMode,current_availability_checks[](including rawactivity_status) andindependent_verificationretain the newer availability revision's evidence and timestamps. Only confirmed or qualified records are included and repurposed links are dropped. No channel was joined and nobody was contacted, so this is a discovery list, not evidence that a channel is active or answered.get_chain_by_idsends at most 12, compacted — each platform gets a slot before any repeats — withchannelsTotaland per-platform counts inchannelsByPlatformhardware: documented node sizing from the node hardware research (data/node-hardware.json, ~3,100 researched chains, ~900 with profiles; a chain with none still carries the researchstatus(not_found/inaccessible),notesand checkedsources) —status,notes,sources[],identityStatus(confirmed/qualified/unresolved: how firmly the research tied the documentation to this chain),checkedAt, andprofiles[], one per role × tier × client:role(full_node,validator,archive,rpc,collator,sequencer,prover,light_node,other,unspecified),level(minimum/recommended/example/unspecified),scope(exact_networkorproject_family= the project's generic sizing, not verified for this exact network;historical_network;uncertain),client,clientVersion,deployment(current/historical/deprecated/unknown),verification,notes,verificationNotes,evidence[], andrequirements[]—component(cpu,memory,storage,network,gpu,operating_system,other),metric(cores,vcpus,threads,capacity,storage_type,bandwidth,os_version, …),value(number, string or boolean),unitas published (GB vs GiB, Mbps vs MB/s, cores vs vCPU are not interchangeable and are never converted),qualifier(as_stated/at_least/at_most/approximately/range, withmin/maxfor ranges),notes,source. An omitted component means nothing was documented, never zero.prerequisiteFor[]links a profile to another role it supports (role,requiredWhen,sizing,notes,sources), preserving its original role and counting it once; Nibiru's full-node profile is a validator prerequisite, while the linkedsizing: "not_established"means dedicated validator sizing remains undocumented. A profile can also be an extra component to run alongside the node:requiredWhengives the condition (OP Mainnet's Legacy Geth / l2geth, for pre-Bedrock historical state),sizingsays how far its hardware is documented (explicit/partial/not_established— such a profile may have norequirements),historicalStateErathe era it serves,snapshotArtifacta published download (file,type,sizes[]exactly as labelled — a download size, not a disk target), anddependencies[]the other services the node needs (component,requiredWhen,clientOptions,selfHosted,hosting,sizing). Every profile is included,unresolvedones too (verificationunresolved: the source or its applicability was not settled — treat it as unverified); these are published requirements, not benchmarks. The dashboard does not render this block: it exists so the assistant and MCP clients can answer node setup questions, through theget_node_requirementstool
status is checked (fully verified) or partial (evidence gaps or uncertain applicability). audit is the item-level audit result: confirmed, qualified (family/historical/source caveats remain), corrected or null.
Endpoints Object (from /endpoints endpoints)
Each endpoints object returned from /endpoints and /endpoints/:id contains:
chainId: The chain IDname: Chain namerpc: Array of RPC endpoints (strings or objects with url and metadata)firehose: Array of The Graph firehose endpoints (if available)substreams: Array of The Graph substreams endpoints (if available)
Relations Object (from /relations/:id endpoint)
Relations data contains:
chainId: The chain IDchainName: Chain namerelations: Array of relations to other chainsEach relation contains:
kind,network(network ID), optionallychainId(resolved chain ID), andsource(data source)Relation kinds:
testnetOf,mainnetOf,l2Of,parentOf,beaconOfRelation sources:
theGraph,chainlist,chainsReverse relations: After all relations are indexed, reverse relations are automatically created:
mainnetOf: Added to mainnets pointing to their testnets (reverse oftestnetOf)parentOf: Added to L1 chains pointing to their L2 chains (reverse ofl2Of)
chainlist relations: When
slip44 === 1orisTestnet === true, finds mainnet by matchingtvlfield value with chains whereisTestnet === falseNote:
tvlmatching is based on chainlist data structure; this field may represent a chain identifier rather than Total Value Locked in some contexts
chains.json relations: When
parent.type === "L2", createsl2Ofrelation using parent chain ID extracted fromparent.chainfield (format:eip155-<chainId>)Example: Mode Testnet (919) has
parent: { type: "L2", chain: "eip155-11155111" }, creating al2Ofrelation to Sepolia (11155111)
SLIP-0044 Data Structure
Each SLIP-0044 coin type object contains:
coinType: The coin type number (used as the key/id)pathComponent: BIP-0044 path component in hexadecimalsymbol: Coin symbolcoin: Full coin name
Documentation
More detailed information about project internals and testing can be found in the docs folder:
Project Structure: Detailed explanation of files and directories
Testing: Comprehensive guide to the testing strategy (Unit, Integration, and Fuzz testing)
Contributing
We welcome contributions to the Chains API project! Whether you're fixing bugs, improving documentation, or proposing new features, your contributions are appreciated.
How to Contribute
Fork the repository and create your branch from
mainMake your changes with clear, descriptive commit messages
Add or update tests to cover your changes
Ensure all tests pass by running
npm testVerify code quality - your changes will be automatically scanned by SonarQube
Submit a pull request with a clear description of your changes
Code Quality Standards
All contributions must meet our quality standards:
✅ All tests must pass (300+ test cases)
✅ Code coverage ≥ 80%
✅ Code duplication ≤ 3%
✅ No critical code smells or security vulnerabilities
✅ Cognitive complexity within acceptable limits
These standards are automatically enforced through our CI/CD pipeline and SonarQube analysis.
Areas for Contribution
🐛 Bug fixes and issue resolution
📚 Documentation improvements
✨ New features and enhancements
🧪 Additional test coverage
🔍 Data validation and quality improvements
🌐 Support for additional blockchain networks
Questions or Issues?
If you have questions or encounter issues, please open an issue on GitHub.
License
Code: PolyForm Noncommercial License 1.0.0 from version 1.7.99: free for noncommercial purposes — personal use, research, and noncommercial organisations. Commercial use, including running your own copy commercially, requires a separate licence: licensing@johnaverse.cc. Releases up to and including 1.7.98 were published under the MIT licence and remain so.
Hosted service and data: the API at chains-api.johnaverse.cc, its MCP server, the dashboard and the data they serve are covered by the Terms of Use — free for personal and hobby use, academic research and teaching, and non-profit or open-source projects that earn nothing from it; any commercial or for-profit use requires a licence. Third-party data keeps its sources' own licences (growthepie must be credited wherever its data is shown). /robots.txt allows search indexing and reserves AI training and AI input (Content-Signal), /.well-known/tdmrep.json reserves text and data mining (EU Directive 2019/790, Art. 4), and every response carries Link: <terms>; rel="license". TERMS_URL and LICENSING_CONTACT configure both.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
ChainRay provides multi-chain blockchain data and intelligence for AI agents through 79 MCP tools across 57 supported networks, covering gas, chain data, wallets, DeFi, market, security, monitoring, and verifiable proofs. MCP access is available at https://mcp.chainray.online/mcp; paid HTTP capabilities settle via x402 on Base.
Provide AI agents and automation tools with contextual access to blockchain data including balance…
MCP server connecting AI agents to non-custodial staking data across 130+ networks.
Pay-per-call on-chain data for AI agents: token, wallet, risk, whale, NFT, tx. No API keys.
Related MCP Servers
- AlicenseBqualityAmaintenanceA Model Context Protocol server that enables AI agents to interact with 30+ Ethereum-compatible blockchain networks, providing services like token transfers, contract interactions, and ENS resolution through a unified interface.2890 npm381MIT
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that enables AI assistants to access Flow blockchain data and perform operations such as checking balances, resolving domains, executing scripts, and submitting transactions.1MIT
- -licenseNot gradedqualityNot gradedmaintenanceComprehensive Model Context Protocol server that enables AI agents to interact with 30+ Ethereum-compatible blockchain networks, supporting token transfers, smart contract interactions, and ENS name resolution through a unified interface.1-
- AlicenseAqualityDmaintenanceA Model Context Protocol server that integrates ChainGPT capabilities into AI agents, allowing users to access crypto news, prices, and market trends.32MIT