stac-mcp AGENTS.md

stac-mcp AGENTS.md is an instructions file for Codex, OpenCode from BnJam/stac-mcp. It costs 2,629 tokens per session, scanned A, original, MIT.

Contributor instructions for stac-mcp, a Python server for making STAC requests. STAC is a standard way to search and describe geospatial data such as satellite imagery.

In plain words
What is it for?
Use them when changing STAC requests, architecture records, or GDAL and rasterio compatibility code.
Why use it?
They set rules for Python style, type hints, documentation, public library APIs, and compatibility decisions.

Instructions file for CodexOpenCode

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/bnjam/stac-mcp/agents-md
Clone the repo
git clone --depth 1 https://github.com/BnJam/stac-mcp

Made for: Codex, OpenCode.

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 stac-mcp AGENTS.md

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

What it costs to keep this loaded

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

ModelPer sessionOnce invoked
Fable 5 $0.02629 $0.02629
Opus 5 $0.01314 $0.01314
Sonnet 5 $0.00526 $0.00526
Haiku 4.5 $0.00263 $0.00263

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

Security

Grade A, and why

stac-mcp AGENTS.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 3d 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.

AGENTS.md · 212 lines

How it starts

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

Agents / Contributor Guide — Python best practices & PEP adherence

Purpose

  • Provide concise, actionable guidance for contributors and automated agents working on this repository.
  • Emphasize adherence to Python PEPs (style, typing, docstrings) and the project's tooling.

Core principles

  • Follow PEP 8 for style and naming (use snake_case for functions/variables, PascalCase for classes, UPPER_SNAKE for constants).
  • Use PEP 257 docstrings for modules, classes, and public functions/methods.
  • Prefer type hints (PEP 484). Keep signatures explicit and avoid overly broad Any where a concrete type helps readability.
  • Always import generics from the typing module (List, Dict, Optional, Union, Tuple, Set, Iterable, Callable, etc.) instead of using builtin collection annotations like list[str] unless an ADR supersedes this rule. This maintains consistency across the codebase and clarifies intent for contributors and automated agents.
  • Keep functions small and single-responsibility. Favor composition over inheritance when appropriate.

Public-API-first rule

  • Prefer using public, documented APIs of third-party libraries. Do not reach into private or underscore-prefixed attributes or functions (for example, avoid accessing objects like client._stac_io, session._pool, or other internals).
  • When interacting with STAC libraries prefer the public Client/IO abstractions (for example, pystac_client.Client and pystac.stac_io.StacIO/StacApiIO) or perform explicit HTTP calls with requests rather than reading or mutating private internals.

These rules keep behavior stable across upstream library upgrades and make code easier to test and maintain.

Formatting & Linting: Pre-Commit/Pre-Push Checklist

MUST run these commands and ensure they pass before every git commit and git push.

  1. Format Code:
    uv run ruff format stac_mcp/ tests/ examples/
    
  2. Lint and Auto-Fix:
    uv run ruff check stac_mcp/ tests/ examples/ --fix --no-cache
    
  3. Run Tests:
    uv run pytest -q
    
  4. Verify Test Coverage:
    uv run coverage run -m pytest -v
    uv run coverage report --fail-under=85
    

IMPORTANT: Run the ruff format and ruff check commands multiple times in sequence to ensure all issues are resolved, as auto-fixing can sometimes introduce new formatting needs.

Testing & validation

  • Write tests for behavior, not implementation; prefer parametrized tests for similar cases.
  • Run the full test suite locally:
    • pytest -v
  • Ensure all tests pass before pushing.
  • Follow the repository's Validation checklist:
    • Ruff format and lint pass.
    • All tests pass.

Logging & errors

  • Use the standard logging module; configure logging at entrypoints only.
  • Do not swallow exceptions silently. Surface useful context and wrap exceptions only when adding helpful information.
  • Avoid print() for diagnostics in library code.

Async & IO

  • Prefer async APIs when interacting with network or IO in the MCP server; follow standard asyncio patterns.
  • Avoid blocking calls in async code. Use run_in_executor for CPU-bound or blocking work.

Dependencies & environment

  • Use virtual environments or tox for isolation.
  • Pin dev dependencies in pyproject.toml where appropriate.
  • Install in editable mode during development: pip install -e ".[dev]"

Commit & PR guidance

  • Write clear commit messages with intent and scope.
  • Run formatting and tests before pushing.
  • Keep PRs focused and small; include a brief description of changes and validation steps.

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

Subscribe to this mod's changes

stac-mcp AGENTS.md is an instructions file published in the GitHub repository BnJam/stac-mcp (13 stars, last pushed 27d ago), licensed MIT. It adds 2,629 tokens to every session, about $0.0131 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-30.