sagemath-mcp: Instructions file for Codex

AGENTS.md

sagemath-mcp AGENTS.md is an instructions file for Codex, OpenCode from XBP-Europe/sagemath-mcp. It costs 1,817 tokens per session, scanned A, original, MIT.

Project instructions for developing and operating a SageMath MCP server. SageMath is software for mathematics, and MCP is a way for an agent to use external tools.

In plain words
What is it for?
Installing development dependencies, running lint checks, preparing SageMath containers, simulating CI, and working with Docker, Helm, and signed images.
Why use it?
They document the project’s setup, checks, containers, deployment details, and expected development workflow.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: mentions CLAUDE.md; mentions AGENTS.md; mentions Codex.

This is XBP-Europe/sagemath-mcp's own configuration. It tells Codex and OpenCode how to work on sagemath-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 sagemath-mcp configures →

Reuse

Borrowing it

Nothing to install: this file belongs to XBP-Europe/sagemath-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/XBP-Europe/sagemath-mcp/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/XBP-Europe/sagemath-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 sagemath-mcp AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/xbp-europe/sagemath-mcp/agents-md/github.svg)](https://agentmods.dev/instructions/xbp-europe/sagemath-mcp/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/xbp-europe/sagemath-mcp/agents-md"><img src="https://agentmods.dev/badge/instructions/xbp-europe/sagemath-mcp/agents-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 sagemath-mcp AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/xbp-europe/sagemath-mcp/agents-md"><img src="https://agentmods.dev/badge/instructions/xbp-europe/sagemath-mcp/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,817 This file is loaded in full into every session.
When invoked 1,817 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.01817 $0.01817
Opus 5.5 $0.00727 $0.00727
Sonnet 5.5 $0.00363 $0.00363
Haiku 4.5 $0.00182 $0.00182

Measured today against content hash 69b7254a1148, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

sagemath-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 today.

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 · 73 lines

How it starts

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

Agent Playbook

Environment & Setup

  • uv pip install -e .[dev] primes the venv with runtime+dev extras; inside the Sage container use sage -python -m pip ... (what the image and make sage-deps do).
  • make sage-container (script: scripts/setup_sage_container.sh) starts the development Sage container the integration tests run in; it is not a runtime deployment.
  • Keep TODO.md in sync with outstanding initiatives; the unchecked items at the bottom reflect the current priority queue.
  • docker-compose.yml spins up the Sage-backed MCP server locally; the Helm chart under charts/sagemath-mcp mirrors the deployment knobs for Kubernetes and enforces the non-root sage user (UID/GID 1001 on SageMath 10.10).
  • Release workflow publishes signed images to ghcr.io/xbp-europe/sagemath-mcp; verify with Cosign if you consume the container directly.
  • Configure Git hooks after cloning: git config core.hooksPath .githooks (pre-push runs uv run ruff check).
  • Use scripts/run_ci_simulation.sh to approximate .github/workflows/ci.yml locally (requires Docker, Helm, uv; it uses whichever Docker Compose is installed and says so, rather than skipping the smoke test when only v2 is present).
  • Every workflow installs the uv pinned in .tool-versions, and a test fails on a setup-uv step that does not read it. Dependabot cannot move the pin: change it by hand, re-run make passagemath-lock with the new uv, and commit both together.
  • The checks branch protection requires on main are listed in TESTING.md (CI). Renaming or adding a required job means changing branch protection too, and the count stated in TESTING.md, SUPPORT.md and CLAUDE.md.

Fast Commands

  • make lint → uv run ruff check (Bandit rules S apply to src/)
  • make typecheck → uv run mypy over src/sagemath_mcp; CI's lint job runs it
  • make test → pure-Python pytest suite (uv run pytest)
  • make integration-test → runs pytest inside the Sage container and captures logs (integration.log, integration-artifacts.tar.gz)
  • make build → uv run python scripts/build_release.py (sdist/wheel; respects prerequisite guardrails)
  • make all → convenience alias (make test + make integration-test); keep targets separate when adding CI steps.
  • make allowlist → regenerates src/sagemath_mcp/allowlist.py from the installed Sage. Two steps on purpose: the generator imports the module it writes, so a single redirect truncates its own input. Review every added name before committing.
  • make cli-extended → drives the real Claude/Gemini/Codex CLIs and asserts from the proxy wire log that a tool was called. Costs model credits. cli-nightly.yml is scheduled but has no API-key secrets, so it skips every CLI; run this by hand before a release.

Read the full file on GitHub · 73 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. today Changed · +4 lines · +293 tokens per session 69b7254a1148
  2. 14d ago Changed · +1 lines · +88 tokens per session 67ffb6222e22
  3. 17d ago Changed · +1 lines · +42 tokens per session b1fdabe892c7
  4. 22d ago Changed 300ede44efab
  5. 1mo ago Changed · +22 tokens per session 872f97c24520
  6. 1mo ago Changed · +3 tokens per session 1b96644fe7ec
  7. 1mo ago First seen · 67 lines · 1,369 tokens per session scan A 1a2ec64a2232

Subscribe to this mod's changes

sagemath-mcp AGENTS.md is an instructions file published in the GitHub repository XBP-Europe/sagemath-mcp (18 stars, last pushed today), licensed MIT. It adds 1,817 tokens to every session, about $0.0073 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-30.

Related

Other instructions, from other repositories