Borrowing it
Nothing to install: this file belongs to drolosoft/go-docs-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/drolosoft/go-docs-mcp/main/CLAUDE.mdgit clone --depth 1 https://github.com/drolosoft/go-docs-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/drolosoft/go-docs-mcp/claude-md)<a href="https://agentmods.dev/instructions/drolosoft/go-docs-mcp/claude-md"><img src="https://agentmods.dev/badge/instructions/drolosoft/go-docs-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/drolosoft/go-docs-mcp/claude-md"><img src="https://agentmods.dev/badge/instructions/drolosoft/go-docs-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.01621 | $0.01621 |
| Opus 5.5 | $0.00648 | $0.00648 |
| Sonnet 5.5 | $0.00324 | $0.00324 |
| Haiku 4.5 | $0.00162 | $0.00162 |
Grade A, and why
go-docs-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 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.
How it starts
The opening of the file, as written. The whole thing — 69 lines — stays where its author put it; the contents beside it link to each section on GitHub.
go-docs-mcp
Go MCP server serving documents (PDF, TXT, MD, CSV, Office files, EPUB, HTML, RTF, IPYNB, images) to LLMs via stdio.
Build & Run
make build # ./go-docs-mcp binary
make install # /usr/local/bin/go-docs-mcp
make test # go test -v -race ./...
DOCS_MCP_DIR=~/docs ./go-docs-mcp # custom dir
Architecture
main.go— MCP server init, 13 tool registrations, instructions, stdio transportresources.go—docs://{filename}resources, list rebuilt on everyresources/listinternal/pdf/reader.go— Document extraction (pdftotext/pdfinfo/pdfimages/tesseract), mtime cache, search, metadata, images, OCR, outlines, tables
Key Decisions
- Uses
pdftotext -layoutfor text extraction (preserves formatting) - mtime-based cache: re-extracts only when file changes; bounded by
DOCS_MCP_CACHE_MB(default 256, 0 disables) with LRU eviction, a text larger than the cap is not cached; summary, outline and tables share it - Confinement:
filepath.Base()+ extension allowlist, thenfilepath.EvalSymlinksof the file must stay under the resolvedDOCS_MCP_DIR(symlinks out are rejected and not listed) - Every external process runs with
exec.CommandContextand a per-operation deadline; page ranges are capped at 200 and checked against the real page count - Tools are registered with read-only / non-destructive / idempotent annotations; only
read_urlis open-world, andDOCS_MCP_DISABLE_URL=1removes it - Page tracking uses form feed (
\f) characters from pdftotext output - Homebrew path detection for macOS (
/opt/homebrew/bin/) - Env vars:
DOCS_MCP_DIR(primary),PDF_MCP_DIR(backward compat),DROLO_DOCS_DIR(legacy),DOCS_MCP_OCR_LANG(tesseract language, defaulteng),DOCS_MCP_DISABLE_URL,DOCS_MCP_URL_PROXY(opt-in proxy for read_url),DOCS_MCP_CACHE_MB(text cache cap) - Default directory:
~/.docs-mcp/documents/ - Text tools page their output:
offset+max_chars(default 50000, cap 200000) with a trailer naming the next offset;search_documenthasmax_results;extract_imagesreturns PNG image content, skips masks, scales to 1600 px, 8 MB budget - Structured output (
outputSchema+structuredContent) on list_documents, list_formats, get_document_metadata, get_document_outline, extract_tables (text JSON kept for old clients), and on the paged read_document, convert_to_markdown and ocr_document (text,next_offset,total_chars) - URL downloads: 60 s timeout, 50MB cap,
application/pdfortext/*, private/loopback/link-local hosts refused on every hop - Image extraction:
pdfimages -listfirst, only rows of typeimage(soft masks skipped), extracted as PNM (not-png: poppler's PNG writer is the slow part) and decoded in Go, box-filtered to 1600 px, 4 MB per image,max_images(default 10) and 8 MB per answer - Tool results over 9 MB are replaced with an error (
server.WithToolResultSizeLimit) - Dual-era: one binary serves the legacy
initializehandshake and the stateless MCP 2026-07-28 (_metaenvelope,server/discover), all from mcp-go v1.5.0, no era branch in our code;raw_wire_test.gois the arbiter, any mcp-go bump must pass it unchanged (doc/MCP-2026-07-28.md) - Supports: PDF, TXT, MD, CSV, and through pandoc DOCX, XLSX, PPTX, ODT, EPUB, HTML, RTF, IPYNB; images (PNG, JPG, WebP, TIFF, BMP) with tesseract
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.
- today Changed · +2 lines · +178 tokens per session 6817bb405782
- 3d ago Changed · +13 lines · +725 tokens per session c46e5651e1a5
- 2mo ago First seen · 54 lines · 718 tokens per session scan A 768fb5a08ae5
go-docs-mcp CLAUDE.md is an instructions file published in the GitHub repository drolosoft/go-docs-mcp (12 stars, last pushed yesterday), licensed MIT. It adds 1,621 tokens to every session, about $0.0065 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-31.
go-docs-mcp CLAUDE.md compared with instructions from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| go-docs-mcp CLAUDE.mddrolosoft/go-docs-mcp | Instructions file | 12 | yesterday | MIT | A | 1,621 | Claude Code |
| vscode buildNext.instructions.mdmicrosoft/vscode | Instructions file | 195k | today | MIT | A | 9,719 | GitHub Copilot |
| next.js AGENTS.mdvercel/next.js | Instructions file | 143k | today | MIT | A | 7,461 | Codex, OpenCode |
| vscode oss-third-party-notices.instructions.mdmicrosoft/vscode | Instructions file | 195k | today | MIT | A | 5,685 | GitHub Copilot |
| langchain AGENTS.mdlangchain-ai/langchain | Instructions file | 149k | yesterday | MIT | A | 4,680 | Codex, OpenCode |
| vscode copilot-instructions.mdmicrosoft/vscode | Instructions file | 195k | today | MIT | A | 3,093 | GitHub Copilot |
| vscode model-prompts.instructions.mdmicrosoft/vscode | Instructions file | 195k | today | MIT | A | 2,022 | GitHub Copilot |