commoditypriceapi-mcp: Instructions file for Claude Code

CLAUDE.md

commoditypriceapi-mcp CLAUDE.md is an instructions file for Claude Code from Commodity-Price-API/commoditypriceapi-mcp. It costs 688 tokens per session, scanned A, original, MIT.

Repository-specific instructions for Claude Code when working on an MCP server that exposes CommodityPriceAPI, a service providing commodity price data. They cover the TypeScript project, commands, architecture, required API key, and manual testing with MCP Inspector, a tool for checking MCP servers.

In plain words
What is it for?
Use them when developing, building, running, or manually testing this CommodityPriceAPI MCP server.
Why use it?
They provide the setup and testing details needed to build or troubleshoot the server, including its required environment variable and three-part code structure.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md. Also seen: mentions CLAUDE.md; mentions Claude Code.

This is Commodity-Price-API/commoditypriceapi-mcp's own configuration. It tells Claude Code how to work on commoditypriceapi-mcp itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything commoditypriceapi-mcp configures →

Reuse

Borrowing it

Nothing to install: this file belongs to Commodity-Price-API/commoditypriceapi-mcp. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/Commodity-Price-API/commoditypriceapi-mcp/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/Commodity-Price-API/commoditypriceapi-mcp

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for commoditypriceapi-mcp CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/commodity-price-api/commoditypriceapi-mcp/claude-md/github.svg)](https://agentmods.dev/instructions/commodity-price-api/commoditypriceapi-mcp/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/commodity-price-api/commoditypriceapi-mcp/claude-md"><img src="https://agentmods.dev/badge/instructions/commodity-price-api/commoditypriceapi-mcp/claude-md/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for commoditypriceapi-mcp CLAUDE.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/commodity-price-api/commoditypriceapi-mcp/claude-md"><img src="https://agentmods.dev/badge/instructions/commodity-price-api/commoditypriceapi-mcp/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 688 This file is loaded in full into every session.
When invoked 688 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00688 $0.00688
Opus 5.5 $0.00275 $0.00275
Sonnet 5.5 $0.00138 $0.00138
Haiku 4.5 $0.00069 $0.00069

Measured 11d ago against content hash 0d2d19e02067, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

commoditypriceapi-mcp CLAUDE.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

CLAUDE.md · 37 lines

How it starts

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

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

Project

MCP server (stdio transport) exposing CommodityPriceAPI v3 as 9 MCP tools. Published to npm as @commoditypriceapi/mcp, run by clients via npx. TypeScript, ESM ("type": "module"), Node >= 18, no test suite or linter configured.

Commands

npm run build   # tsc → dist/, then chmod +x dist/cli.js
npm run dev     # tsc --watch
npm start       # node dist/cli.js (requires COMMODITYPRICEAPI_KEY env var)

# Manual testing with the MCP Inspector:
COMMODITYPRICEAPI_KEY=<KEY> npx @modelcontextprotocol/inspector node dist/cli.js

Architecture

Three-layer flow, one file each in src/:

  • cli.ts — bin entry point. Creates the server and connects it to StdioServerTransport. stdout is reserved for the MCP protocol stream — all logging must go to stderr (console.error).
  • server.ts — createServer() registers all 9 tools on an McpServer, with zod input schemas. Every tool handler is a thin try/catch wrapper around callCommodityApi(): success → textResult() (pretty-printed JSON), failure → errorResult().
  • client.ts — callCommodityApi(path, params) is the single HTTP function all tools go through. Hardcodes BASE_URL (https://api.commoditypriceapi.com/v3), reads COMMODITYPRICEAPI_KEY at call time (not startup), sends the key via both x-api-key header and apiKey query param, applies an AbortController timeout (COMMODITYPRICEAPI_REQUEST_TIMEOUT_MS, default 15000). All failures — timeout (499), unreachable (502), non-JSON body, upstream error status — are normalized into CommodityApiError { code, errorType, message, path, unresolved? }. v3 returns HTTP 206 (still response.ok, body passed through) with an unresolved map when some requested symbols could not be resolved, and attaches the same map to 404 SYMBOL_NOT_FOUND; errorResult() surfaces it in the tool result.

index.ts is the library export (createServer only).

Read the full file on GitHub · 37 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago Changed · +2 tokens per session 0d2d19e02067
  2. 2mo ago Changed · +60 tokens per session 1ac28cb5edc0
  3. 2mo ago First seen · 37 lines · 626 tokens per session scan A 192e8ac25e05

Subscribe to this mod's changes

commoditypriceapi-mcp CLAUDE.md is an instructions file published in the GitHub repository Commodity-Price-API/commoditypriceapi-mcp (0 stars, last pushed 13d ago), licensed MIT. It adds 688 tokens to every session, about $0.0028 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

commoditypriceapi-mcp CLAUDE.md compared with instructions from other repositories

commoditypriceapi-mcp CLAUDE.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
commoditypriceapi-mcp CLAUDE.mdCommodity-Price-API/commoditypriceapi-mcpInstructions file013d agoMITA688Claude Code
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file196ktodayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file144ktodayMITA8,130Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file196ktodayMITA5,685GitHub Copilot
langchain AGENTS.mdlangchain-ai/langchainInstructions file150ktodayMITA4,680Codex, OpenCode
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file283kyesterdayMITA4,342Codex, OpenCode
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file196ktodayMITA3,153GitHub Copilot