macrostrat-mcp CLAUDE.md

macrostrat-mcp CLAUDE.md is an instructions file for coding agents from blake365/macrostrat-mcp. It costs 905 tokens per session, scanned A, original, MIT.

Repository instructions for working on an MCP server that gives AI assistants access to Macrostrat, a geological data API.

In plain words
What is it for?
Use it when developing, testing, installing, or extending the macrostrat-mcp server and its geological data queries.
Why use it?
It explains the project structure, development commands, dependencies, and installation details so coding agents can make informed changes.

Instructions file

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/blake365/macrostrat-mcp/claude-md
Clone the repo
git clone --depth 1 https://github.com/blake365/macrostrat-mcp

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 macrostrat-mcp CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/blake365/macrostrat-mcp/claude-md.svg)](https://agentmods.dev/instructions/blake365/macrostrat-mcp/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/blake365/macrostrat-mcp/claude-md"><img src="https://agentmods.dev/badge/instructions/blake365/macrostrat-mcp/claude-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 905 This file is loaded in full into every session.
When invoked 905 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

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

ModelPer sessionOnce invoked
Fable 5.1 $0.00905 $0.00905
Opus 5 $0.00452 $0.00452
Sonnet 5 $0.00181 $0.00181
Haiku 4.5 $0.00090 $0.00090

Measured 5d ago against content hash 9e51b314a330, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

macrostrat-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 5d 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 · 110 lines

How it starts

The opening of the file, as written. The whole thing — 110 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 Overview

This is a Model Context Protocol (MCP) server that provides access to the Macrostrat geological API. It enables AI assistants to query comprehensive geological data including geologic units, columns, minerals, and timescales.

Architecture

Core Components:

  • src/server.ts: Server factory (createServer) with all tools, prompts, resource schemas, and API integrations. Side-effect free — it only builds and returns an McpServer. This is the package's library export.
  • src/index.ts: STDIO entry point, and the macrostrat-mcp bin. Imports createServer and connects a StdioServerTransport.

Keeping them separate means src/server.ts can be imported and attached to a different transport without starting stdio as a side effect.

Distribution: published to npm as macrostrat-mcp; the intended install path is npx -y macrostrat-mcp. build/ is generated and gitignored — npm ships it via the files field, so do not commit it.

Key Features:

  • 8 tools for querying Macrostrat API endpoints
  • 3 built-in prompts for common geological queries
  • Resource schemas for API response validation
  • Coordinate validation for geographic queries
  • All tools are annotated readOnlyHint: true; everything except lat-lng-to-tile is also openWorldHint: true

Conventions:

  • Use the shared fetchJson() helper for Macrostrat JSON endpoints. It applies the 30s timeout and converts non-2xx responses and network failures into tool errors (isError: true) rather than throwing.
  • Native fetch is used — do not reintroduce node-fetch.

Development Commands

# Install dependencies
npm install

# Compile TypeScript to build/ and set executable permissions
npm run build

# Run from source over STDIO, no build step
npm run dev

# Type-check without emitting
npm run typecheck

# No tests configured (test command will fail)
npm test  # Returns error

Read the full file on GitHub · 110 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. 5d ago First seen · 110 lines · 905 tokens per session scan A 9e51b314a330

Subscribe to this mod's changes

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