Borrowing it
Nothing to install: this file belongs to alpacax/alpacon-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/alpacax/alpacon-mcp/main/CLAUDE.mdgit clone --depth 1 https://github.com/alpacax/alpacon-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/alpacax/alpacon-mcp/claude-md)<a href="https://agentmods.dev/instructions/alpacax/alpacon-mcp/claude-md"><img src="https://agentmods.dev/badge/instructions/alpacax/alpacon-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/alpacax/alpacon-mcp/claude-md"><img src="https://agentmods.dev/badge/instructions/alpacax/alpacon-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.01807 | $0.01807 |
| Opus 5 | $0.00903 | $0.00903 |
| Sonnet 5 | $0.00361 | $0.00361 |
| Haiku 4.5 | $0.00181 | $0.00181 |
Grade A, and why
alpacon-mcp CLAUDE.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 5d 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.
How it starts
The opening of the file, as written. The whole thing — 139 lines — stays where its author put it; the contents beside it link to each section on GitHub.
CLAUDE.md
Alpacon MCP Server: a FastMCP server that bridges Alpacon's zero-trust infrastructure access to AI assistants over plain HTTP. No alpacon CLI, no subprocess, no external binaries in the runtime path.
Red lines
- Reach Alpacon only through
mcp__alpacon__*tools. Never thealpaconCLI, neverssh, never a shell fallback when an MCP call fails. On failure: report the exact error, propose another MCP route, ask for the missing auth/config. This constrains how you talk to Alpacon—it does not restrict ordinary local work in this repo (pytest,git,uv). server_idis always a UUID, never a server name.list_serversmaps a name to its UUID. A name fails at the input validator, before the API call.- Approve/reject is human-only (ADR 0015). No
approve_requesttool exists and the server answers agent/token channels with 403. When a tool returnsstatus="pending_approval", surface it to a human who decides out-of-band in the web console or Slack, then retry.
Development commands
uv venv && source .venv/bin/activate
uv sync --extra dev # runtime + dev dependencies
python main.py # stdio transport (default MCP mode)
python main_sse.py # SSE transport
python main_http.py # streamable-http; needs AUTH0_* configured
pytest # test suite
python -c "from server import mcp; print('ok')" # import smoke check
Non-obvious invariants
Things the code will not tell you at a glance:
- Regions are
ap1andus1only (the internaldevis not a served region). An omittedregionis resolved from the JWT in remote mode and fromtoken.jsonin local mode, then validated; resolution fails when the workspace is unknown or its token spans several regions. - Toolset selection crosses module boundaries.
--toolsets/ALPACON_MCP_TOOLSETSgates imports, and registration is an import-time side effect.alpacon://servers/.../overviewis backed bysystem_info_tools, so--toolsets serversalone silently drops it. Remote mode is gated onALPACON_MCP_AUTH_ENABLED=true, not on the transport name, and ignores the setting entirely. @mcp_tool_handlerowns validation, token injection, error shape, and logging. Never write a try/except around an HTTP call in a tool.region,workspace,server_id,server_ids,servers,session_id,limit, andpage_sizeare validated before the token lookup; file paths are not—callvalidate_file_path()inline in any tool taking a path.requires_workspace=Falseis for a tool that answers before a workspace is known: it drops the workspace checks, the workspace-keyed region resolution, the JWT workspace authorization, the MFA pre-check, and the stdio token injection.list_workspacesis the only tool using it. The decorator also rewrites the published signature, dropping the**kwargsit injects the token into: FastMCP reads that catch-all as an ordinary required field and would publish it to clients (#211). Two rules follow: a tool must declare**kwargsor decoration raises, and no tool may forward its own**kwargson to another tool, becausewith_loggingbinds the published signature strictly and the injected token is no longer a parameter it accepts.health_checksits outside the decorator entirely because it must answer before any JWT exists, and borrows@with_error_handlingalone for the error shape.AlpaconHTTPClientnever caches a response, deliberately. Every read worth caching—the server list, process info, IAM users and groups—comes back filtered by the calling token's permissions, and nothing in this process sees a grant revoked in the web console, in Slack, or by another MCP process. Do not reintroduce a response cache in the shared client: a hit would answer with access the caller has lost. The auth-path caches stay: the JWKS keys inutils/auth.pyand the workspace security settings inutils/security_settings.pyare not permission-filtered tool data.- The WorkSession gate applies to OAuth/browser callers only. Static API and
service tokens bypass it, so a flow that works in stdio mode can be blocked in
remote mode.
ALPACON_WORK_SESSIONsupplies a default session id; an explicitwork_session_idargument wins. - The API token tools 403 in stdio mode.
APITokenObjectPermissionrejectssource='api'tokens, so list/get/create/update/delete/duplicate need JWT/OAuth, a browser session, or asource='login'token. The scopes and presets catalogs are exempt. - MFA re-authentication exists only in remote/streamable-http mode, with a 60-second cooldown against re-auth loops.
- The code and refresh token a remote client holds are sealed by this
server, carrying the device id minted for that grant. Rotating
ALPACON_MCP_GRANT_SECRET(orAUTH0_CLIENT_SECRET, which it is derived from by default) logs every remote session out.
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.
- 5d ago Changed · +12 lines · +217 tokens per session 58e74136c91a
- 9d ago First seen · 127 lines · 1,590 tokens per session scan A 4d7144af5d2a
alpacon-mcp CLAUDE.md is an instructions file published in the GitHub repository alpacax/alpacon-mcp (1 stars, last pushed yesterday), licensed MIT. It adds 1,807 tokens to every session, about $0.0090 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-31.
Other instructions, from other repositories
vibe-coding-prompt-template backend.instructions.md
Instructions for KhazP/vibe-coding-prompt-template: Read AGENTS.md, agentdocs/techstack.md, and agentdocs/codepatterns.md.
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.