go-docs-mcp CLAUDE.md

go-docs-mcp CLAUDE.md is an instructions file for coding agents from drolosoft/go-docs-mcp. It costs 718 tokens per session, scanned A, original, MIT.

A local MCP server that lets an AI assistant work with PDF, text, Markdown, CSV, and image files stored in a documents folder.

In plain words
What is it for?
Use it to find information in local documents, extract PDF content or images, run OCR, and inspect document structure.
Why use it?
It provides one place to extract text, search files, inspect metadata, read outlines and tables, and process scanned documents.

Instructions file

Install

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.

agentmods
npx agentmods add instructions/drolosoft/go-docs-mcp/claude-md
Clone the repo
git clone --depth 1 https://github.com/drolosoft/go-docs-mcp

Wrote 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.

agentmods badge for go-docs-mcp CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/drolosoft/go-docs-mcp/claude-md.svg)](https://agentmods.dev/instructions/drolosoft/go-docs-mcp/claude-md)
Your own site
<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="Measured on agentmods" height="20"></a>
Per session 718 This file is loaded in full into every session.
When invoked 718 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5 $0.00718 $0.00718
Opus 5 $0.00359 $0.00359
Sonnet 5 $0.00144 $0.00144
Haiku 4.5 $0.00072 $0.00072

Measured 4d ago against content hash 768fb5a08ae5, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

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 4d 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.

CLAUDE.md · 54 lines

How it starts

The opening of the file, as written. The whole thing — 54 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, 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, 12 tool registrations, stdio transport
  • internal/pdf/reader.go — Document extraction (pdftotext/pdfinfo/pdfimages/tesseract), mtime cache, search, metadata, images, OCR, outlines, tables

Key Decisions

  • Uses pdftotext -layout for text extraction (preserves formatting)
  • mtime-based cache: re-extracts only when file changes
  • Path traversal blocked via filepath.Base() + extension allowlist check
  • Page tracking uses form feed (\f) characters from pdftotext output
  • Homebrew path detection for macOS (/opt/homebrew/bin/)
  • Env var: DOCS_MCP_DIR (primary), PDF_MCP_DIR (backward compat), DROLO_DOCS_DIR (legacy)
  • Default directory: ~/.docs-mcp/documents/
  • URL downloads limited to 50MB, validated Content-Type
  • Image extraction limited to 10 per call to avoid huge responses
  • Supports multiple document types: PDF, TXT, MD, CSV, DOCX (with pandoc), images (with tesseract)

Tools

Tool Params Notes
list_documents none Scans docsDir for supported files, returns JSON array
read_document filename (req), page (opt), pages (opt) Full text, single page, or page ranges
search_document filename (req), query (req) Case-insensitive, 2-line context
get_document_summary filename (req) First 3 pages
get_document_metadata filename (req) Full PDF metadata via pdfinfo
extract_images filename (req), page (opt) Extract images as base64 (max 10)
read_url url (req), pages (opt) Download PDF from URL + extract text
ocr_document filename (req), page (opt), language (opt) Force OCR on PDF
list_formats none Show supported formats and dependency status
read_image filename (req), language (opt) OCR standalone image file
get_document_outline filename (req) Extract heading structure
extract_tables filename (req), page (opt) Extract table-like structures

Read the full file on GitHub · 54 lines

Changes

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.

  1. 4d ago First seen · 54 lines · 718 tokens per session scan A 768fb5a08ae5

Subscribe to this mod's changes

go-docs-mcp CLAUDE.md is an instructions file published in the GitHub repository drolosoft/go-docs-mcp (10 stars, last pushed 18d ago), licensed MIT. It adds 718 tokens to every session, about $0.0036 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.

Related

Other instructions, from other repositories

docsift CLAUDE.md

Instructions for anishmoncivarghese/docsift, covering docsift, key documents (read before making product decisions), commands, architecture (src layout, package docsift) and hard rules.

anishmoncivarghese/docsift · 718 tokens

agentic-resume-builder CLAUDE.md

Claude Code instructions for WtotdeD/agentic-resume-builder, covering agentic-resume-builder development guidelines, what this repo is, active technologies, package manager and validation.

WtotdeD/agentic-resume-builder · 695 tokens

md-anything copilot-instructions.md

Instructions for ojspace/md-anything, covering copilot instructions for md-anything, build, test, and lint commands, full suite, contributor-safe required subset and regenerate generated pdf/epub fixtures when needed.

ojspace/md-anything · 903 tokens

asset-aware-mcp copilot-instructions.md

Copilot instructions for u9401066/asset-aware-mcp, covering copilot 自定義指令, 專案概述, 核心功能, llm 後端 and pdf → 資產引擎選擇 🚦.

u9401066/asset-aware-mcp · 4,327 tokens

agentic-reviewer AGENTS.md

Instructions for FilippoScaramuzza/agentic-reviewer, covering agentic reviewer — journal paper review framework, project overview, directory structure, workflow and phase 0: setup & paper conversion.

FilippoScaramuzza/agentic-reviewer · 1,493 tokens

flexberry-markitdown-mcp CLAUDE.md

Claude Code instructions for Flexberry/flexberry-markitdown-mcp, covering claude.md, project overview, commands, install in development mode (all test/lint deps) and install with both pdf backends.

Flexberry/flexberry-markitdown-mcp · 935 tokens