Borrowing it
Nothing to install: this file belongs to thehesiod/psquare-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.
curl -O https://raw.githubusercontent.com/thehesiod/psquare-mcp/main/CLAUDE.mdgit clone --depth 1 https://github.com/thehesiod/psquare-mcpWrote 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.
[](https://agentmods.dev/instructions/thehesiod/psquare-mcp/claude-md)<a href="https://agentmods.dev/instructions/thehesiod/psquare-mcp/claude-md"><img src="https://agentmods.dev/badge/instructions/thehesiod/psquare-mcp/claude-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.
<a href="https://agentmods.dev/instructions/thehesiod/psquare-mcp/claude-md"><img src="https://agentmods.dev/badge/instructions/thehesiod/psquare-mcp/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.08353 | $0.08353 |
| Opus 5 | $0.04176 | $0.04176 |
| Sonnet 5 | $0.01671 | $0.01671 |
| Haiku 4.5 | $0.00835 | $0.00835 |
Grade C, and why
psquare-mcp CLAUDE.md scanned grade C with 2 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 9d 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.
Reaches for credential fileshighPrivilege escalation
SSH keys, cloud credentials, git-credentials, .npmrc, /etc/shadow: reading these is how a config file becomes a credential leak.
git config --global user.signingkey ~/.ssh/id_ed25519.pub Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
(`curl -s -o /dev/null -w '%{http_code}' https://pypi.org/pypi/parentsquare-mcp/X.Y.Z/json`) and the How it starts
The opening of the file, as written. The whole thing — 328 lines — stays where its author put it; the contents beside it link to each section on GitHub.
ParentSquare MCP Server
Architecture
MCP server that scrapes ParentSquare's web UI. Runs as stdio transport. While there's no documented public API, ParentSquare has an internal JSON:API at /api/v2/ that some tools use (e.g. directory).
server.py — MCP tool definitions, inline image/PDF fetching
client.py — HTTP client with auto-relogin on session expiry
auth.py — Cookie persistence (~/.parentsquare_cookies.json), credential loading (env vars → 1Password/LastPass), MFA flow
audit.py — Write-gate (PS_ENABLE_WRITES) + JSONL audit log for admin write tools
config.py — URL templates and constants (no personal data — auto-discovered at runtime)
models.py — Dataclasses for all parsed entities
download.py — File download with conflict handling
parsers/ — One module per page type (feeds, calendar, media, messages, etc.); parsers/admin.py holds roster/edit-form parsing + write-body builders
export_cookies.py — CLI helper to bootstrap cookies from browser DevTools
Key Patterns
Authentication
- Cookies are lazy-loaded from
~/.parentsquare_cookies.jsonon startup (no network call) - On session expiry (detected by redirect to
/signinor missinggon.user_idon the root page), credentials are loaded viaload_credentials(): first fromPS_USERNAME/PS_PASSWORDenv vars, then from the provider named byPS_CREDENTIAL_PROVIDER(default1password). Options:1password—op item get Parentsquare(item named "Parentsquare" with fields labeledusernameandpassword)lastpass—lpass show --json <item>where the item defaults toparentsquare.comand is overridable withPS_LASTPASS_ITEM(exact name or entry ID). Requires a priorlpass login <email>;lpass status --quietis checked first (short timeout) so requests never hang on an interactive prompt. Credential values are never logged or included in error messages.
- Important: ParentSquare's root page (
/) returns HTTP 200 even for unauthenticated users, so/signinredirect alone is not sufficient to detect expired sessions.discover_account()andis_session_valid()also check forgon.user_idin the page content. - MFA code submission verifies the session is actually authenticated after the code is accepted
- MFA state persists to disk (
.parentsquare_mfa_state.json) so it survives server restarts - The server supports MCP elicitation for inline MFA code entry
- User-Agent must include "Chrome" — ParentSquare returns 403
browser_unsupportedotherwise, and (worse) can serve unauthenticated content to a script-looking request that carries valid cookies, which ends in placeholder data rather than an error.make_session()inclient.pyowns this and isPSClient's default session, so a barePSClient()is browser-like too;app_lifespanjust calls it. Do not re-apply the header at a call site. - The
ps_ssession cookie is httpOnly — it can't be read viadocument.cookie, which is whyexport_cookiesrequires the Network tab in DevTools ps_srotates on every request.PSClientcalls_save_cookies_if_changed()after each successful request to persist the latest value.- GraphQL requests (used by
list_groups) require a CSRF token extracted from a page's<meta name="csrf-token">tag. MFA submit also requires a CSRF token from the MFA page. - The CSRF token is cached on
PSClientfor the life of the session. Rails derives it from a per-session secret, so it stays valid across requests even thoughps_srotates — verified live. Without the cache every single write paid an extraGET /._with_csrf()wraps each write and retries once with a force-refreshed token if the response looks like a rejected token or a dead session (_is_csrf_rejection: a bounce to/signin, a 401/419, or a 403/422 whose body names the token). That detection is deliberately narrow — retrying a plain 422 validation error could re-apply a write that had actually landed. Because caching removed the implicitGET /(and its session-expiry check) from every write, this retry path is now the thing that recovers an expired session mid-write._relogin()and MFA completion both callinvalidate_csrf_token().
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.
- 9d ago First seen · 328 lines · 8,353 tokens per session scan C 0ad7f1e8c89f
psquare-mcp CLAUDE.md is an instructions file published in the GitHub repository thehesiod/psquare-mcp (8 stars, last pushed 13d ago), licensed MIT. It adds 8,353 tokens to every session, about $0.0418 per session on Opus 5. A static security scan graded it C with 2 findings (reaches for credential files, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other instructions, from other repositories
next.js AGENTS.md
AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.
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.
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).
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).
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.
deepseek-harness AGENTS.md
AGENTS.md instructions for deepseek-ai/deepseek-harness, covering agents.md, pre-stable apis and released session data, repository layout, commands and host sandbox failures.