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.
npx agentmods add instructions/snegi26/euclidmcppaper/claude-mdgit clone --depth 1 https://github.com/snegi26/euclidMCPPaperWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.01315 | $0.01315 |
| Opus 5 | $0.00658 | $0.00658 |
| Sonnet 5 | $0.00263 | $0.00263 |
| Haiku 4.5 | $0.00131 | $0.00131 |
Grade A, and why
euclidMCPPaper CLAUDE.md scanned grade A with 1 finding 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 yesterday.
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.
Runs shell commandslowCapability
Expected in a hook, worth knowing in a rule or an instructions file.
- Never `shell=True`. Pass argv lists to `subprocess.run`. Clean up temp files in How it starts
The opening of the file, as written. The whole thing — 103 lines — stays where its author put it; the contents beside it link to each section on GitHub.
CLAUDE.md — Euclid-MCP project conventions
Binding guidelines for any agent working in this repo. Read alongside SPEC.md.
Golden rules
- Spec is the source of truth. Implement what
SPEC.md+specs/*.mddescribe. If reality forces a deviation, note it in the PR and update the spec in the same change — never let code and spec drift. - Milestone discipline. Build M0→M6 in order. A milestone is not "done" until
ruff,mypy --strict, and that milestone's tests are green. Don't scaffold ahead. - The IR boundary is sacred. Nothing above
lowering/may mention Prolog.ir/,tools/, and the MCP surface stay engine-agnostic so a second backend can be added later. - Determinism over cleverness. Normalize ordering, avoid nondeterministic dict iteration in outputs, seed nothing random. Same input ⇒ same bytes.
Language & style (Python)
- Python ≥ 3.11, src layout (
src/euclid_mcp/). - Type hints everywhere;
mypyruns in--strict. NoAnyunless justified with a comment. - Pydantic v2 for every tool I/O model and the IR AST. Use
model_config = ConfigDict(extra="forbid", str_strip_whitespace=True). Usefield_validator(notvalidator),model_dump()(notdict()). - Ruff for lint + format (line length 100). Rule sets:
E,F,I,UP,B,SIM,RUF. - Module-level constants in
UPPER_CASE(MAX_INPUT_BYTES = 500_000,DEFAULT_TIMEOUT_S = 30,DEFAULT_MAX_SOLUTIONS = 5,DEFAULT_MAX_DEPTH = 30). - Group imports: stdlib / third-party / local. Prefer specific exceptions over
bare
Exception. - DRY: shared parse→lower→run pipeline lives in one place; the four tools call it, they do not each re-implement it.
- Docstrings on every public function; for tools, the docstring is the MCP description — make it precise and include the return schema.
MCP conventions (from MCP best practices)
- Server name:
euclid_mcp({service}_mcp, lowercase, no versions/dates). - Tool names: exactly
reason,diagnose,what_if,check_kb(snake_case, paper-defined — do not rename or prefix). - Every
@mcp.toolsetsnameandannotations. All four tools are read-only:annotations={ "title": "...", "readOnlyHint": True, "destructiveHint": False, "idempotentHint": True, "openWorldHint": False, } - Tool inputs are a single Pydantic model argument with
Field(...)descriptions and constraints. Let Pydantic validate; don't hand-roll validation. - Errors are feedback, not exceptions across the boundary. Backend/parse
errors are returned as readable text in the result payload so the LLM can
self-correct — never leak a stack trace or crash the tool call. Messages must be
actionable ("Undefined predicate
mortal/1; add a fact or rule with headmortal(...)"). - Prefer structured returns (Pydantic models) so FastMCP emits an output schema;
also include a rendered human-readable field where the paper shows one
(
conclusion, proof-tree text).
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.
- yesterday First seen · 103 lines · 1,315 tokens per session scan A 9af1e2cbf425
euclidMCPPaper CLAUDE.md is an instructions file published in the GitHub repository snegi26/euclidMCPPaper (0 stars, last pushed 1mo ago), licensed MIT. It adds 1,315 tokens to every session, about $0.0066 per session on Opus 5. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other instructions, from other repositories
spec-kit AGENTS.md
AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.
vscode buildNext.instructions.md
Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).
codex AGENTS.md
AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.
langchain AGENTS.md
AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.
vscode oss-third-party-notices.instructions.md
Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).
next.js AGENTS.md
Instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.