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 commands/cbirkbeck/mathlib-quality/setup-chatgptgit clone --depth 1 https://github.com/CBirkbeck/mathlib-qualityWhat 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.00016 | $0.02649 |
| Opus 5 | $0.00008 | $0.01324 |
| Sonnet 5 | $0.00003 | $0.00530 |
| Haiku 4.5 | $0.00002 | $0.00265 |
Grade A, and why
setup-chatgpt 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 2d 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.
Runs shell commandslowCapability
Expected in a hook, worth knowing in a rule or an instructions file.
import { execFile } from "node:child_process"; How it starts
The opening of the file, as written. The whole thing — 309 lines — stays where its author put it; the contents beside it link to each section on GitHub.
/setup-chatgpt - Set Up the ChatGPT MCP Server
Set up an MCP server that lets Claude Code query ChatGPT for mathematical second opinions during Lean 4 formalization work.
Usage
/setup-chatgpt
No arguments needed. This command will guide you through setup.
What This Does
The chatgpt-math MCP server provides a single tool:
ask_chatgpt_math- Ask ChatGPT a self-contained mathematics question. Useful for getting a second opinion on proof strategies, verifying mathematical claims, finding Mathlib API hints, or getting unstuck on formalization problems.
Parameters:
question(required) - The mathematical question. Must be self-contained with all definitions, context, and notation included.model(optional) - Model to use. Default:gpt-5.6-sol.reasoning_effort(optional) -minimal,low,medium,high,xhigh, ormax(default). Always use the highest the model supports; the ceiling is model-specific —gpt-5.4tops out atxhigh,gpt-5.6-solsupportsmax.
Prerequisites
-
ChatGPT desktop app (Codex CLI) - The server calls ChatGPT via the Codex CLI bundled with the ChatGPT desktop application.
- macOS: Install from https://chatgpt.com/download (or the Mac App Store).
- After install, the binary should be at:
/Applications/ChatGPT.app/Contents/Resources/codexor/Applications/Codex.app/Contents/Resources/codex. - You must be signed in with a ChatGPT Plus/Pro subscription.
-
Node.js (>= 18) - The MCP server runs on Node.js.
node --version # Should be >= 18
Setup Workflow
Step 1: Find the Codex Binary
Locate the Codex CLI binary. Check these paths in order:
ls /Applications/ChatGPT.app/Contents/Resources/codex 2>/dev/null
ls /Applications/Codex.app/Contents/Resources/codex 2>/dev/null
If neither exists, tell the user to install the ChatGPT desktop app first.
Store the path as CODEX_BIN.
Step 2: Create the MCP Server
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.
- 2d ago First seen · 309 lines · 16 tokens per session scan A e2cd039af5c2
setup-chatgpt is a command published in the GitHub repository CBirkbeck/mathlib-quality (32 stars, last pushed 13d ago), licensed MIT. It adds 16 tokens to every session and 2,649 once invoked, about $0.0001 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-30.
Other commands, from other repositories
git
Git operations with intelligent commit messages and workflow optimization.
checklist
Generate a custom checklist for the current feature based on user requirements.
clarify
Identify underspecified areas in the current feature spec by asking up to 5 highly targeted clarification questions and encoding answers back into the spec.
specify
Create or update the feature specification from a natural language feature description.
analyze
Perform a non-destructive cross-artifact consistency and quality analysis across spec.md, plan.md, and tasks.md after task generation.
constitution
Create or update the project constitution from interactive or provided principle inputs.