drolosoft/go-docs-mcp

📂 File Systems🟢 Verified Active
0 Views
0 Installs

🏎️ 🏠 🍎 🐧 - Multi-format document MCP server — read, search, OCR, and extract from PDF, TXT, MD, DOCX, CSV, and images. Single Go binary, 12 tools, smart mtime-based caching, directory-locked security.

Quick Install

One-Click IDE Configuration
claude_desktop_config.json
{
  "mcpServers": {
    "drolosoft-go-docs-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "drolosoft-go-docs-mcp"
      ]
    }
  }
}
Or

Using an AI coding agent (Claude Code, Cursor, etc.)? Copy a ready-made prompt that tells it to fetch the setup instructions and install this server for you.

Documentation Overview

Go-Docs MCP

Go-Docs MCP

Go go-docs-mcp MCP server GitHub Release License: MIT

Install and Go. One command, single binary. Your AI reads any document — PDF, text, Markdown, DOCX, images.

MCP server for multi-format document access — read, search, extract images, OCR, and fetch documents from URLs via the Model Context Protocol. 13 tools, 6 formats, zero configuration.

go install github.com/drolosoft/go-docs-mcp@latest
# That's it. Single binary, starts in milliseconds.

For a deeper look at why an MCP server beats a direct tool, see Why MCP?


🏆 Why Go-Docs MCP?

Every other document MCP server handles one format — a PDF server for PDFs, a DOCX server for DOCX. You'd need three separate servers to read three formats.

Go-Docs MCPOthers
Single binary, no runtimeYesNeed Node/Python
go install one-linerYesnpm+deps or pip+venv
Multi-format (6 types)YesOne format each
Full-text searchYesPartial or none
OCR (scanned PDFs + images)YesRare
Image & table extractionYesPartial
Document outlineYesRare
Fetch from URLYesRare
Dir-locked, read-onlyYesVaries
Smart cachingYesNo
Fully offlineYesYes

Go-Docs MCP reads them all from a single binary — fast, secure, and dependency-free at runtime.


📋 Features — 13 Tools

CategoryToolDescription
Discoverylist_documentsList all documents with metadata (format, pages, size)
Discoverylist_formatsList supported formats and dependency status
Readingread_documentFull text, specific page, or page ranges from any format
Readingread_urlDownload from URL and extract text (50MB max)
Readingget_document_summaryFirst 3 pages as a quick overview
Searchsearch_documentCase-insensitive full-text search with context
Analysisget_document_metadataTitle, author, dates, version, page count
Analysisget_document_outlineTable of contents / bookmarks
Analysisextract_tablesTables as structured data
Analysisextract_imagesImages as base64 (max 10 per call)
OCRocr_documentForce OCR on scanned/image-based PDFs
OCRread_imageExtract text from PNG, JPG, TIFF via OCR
Exportconvert_to_markdownConvert any document to clean Markdown

Highlights:

  • Fast — mtime-based in-memory caching avoids redundant extraction
  • Multi-format — PDF, TXT, MD, CSV, DOCX, and images from one server
  • OCR — automatic fallback to tesseract for scanned documents
  • Secure — directory-locked with path traversal prevention
  • Portable — works on macOS and Linux

📄 Supported Formats

FormatDependenciesNotes
PDFpoppler (pdftotext, pdfinfo, pdfimages, pdftoppm)Full support — text, images, metadata, OCR fallback
TXT, MD, CSVNoneNative, zero dependencies
DOCXpandoc (optional)Word document extraction
Images (PNG, JPG, TIFF)tesseract (optional)OCR text extraction

📦 Prerequisites

  • Go 1.25+ (install)
  • poppler — required for PDF support
  • tesseract (optional) — enables OCR for scanned docs and images
  • pandoc (optional) — enables DOCX support
# macOS
brew install poppler
brew install tesseract        # optional: OCR
brew install pandoc           # optional: DOCX

# Debian/Ubuntu
apt install poppler-utils
apt install tesseract-ocr     # optional: OCR
apt install pandoc            # optional: DOCX

# Fedora/RHEL
dnf install poppler-utils
dnf install tesseract         # optional: OCR
dnf install pandoc            # optional: DOCX

Note: TXT, MD, and CSV work out of the box with zero dependencies. Install only what you need.


🚀 Installation

From source

go install github.com/drolosoft/go-docs-mcp@latest

Build locally

git clone https://github.com/drolosoft/go-docs-mcp.git
cd go-docs-mcp
make build      # produces ./go-docs-mcp
make install    # installs to /usr/local/bin/

⚙️ Configuration

Go-Docs MCP reads documents from a configured directory. Set DOCS_MCP_DIR to change it:

VariableDefaultDescription
DOCS_MCP_DIR~/.docs-mcp/documents/Directory containing documents to serve
PDF_MCP_DIR(legacy alias)Backward-compatible alias for DOCS_MCP_DIR

Place your documents in the directory and the server finds them automatically. All supported formats are detected.


💡 Usage

With Claude Code

Add to your .claude/settings.json:

{
  "mcpServers": {
    "docs": {
      "command": "go-docs-mcp",
      "env": {
        "DOCS_MCP_DIR": "/path/to/your/documents"
      }
    }
  }
}

With Claude Desktop

Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS):

{
  "mcpServers": {
    "docs": {
      "command": "/usr/local/bin/go-docs-mcp",
      "env": {
        "DOCS_MCP_DIR": "/path/to/your/documents"
      }
    }
  }
}

With any MCP client

The server communicates over stdio using JSON-RPC 2.0:

echo '{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}' | go-docs-mcp

📖 Tool Reference

list_documents

Lists all documents in the configured directory with format detection.

Parameters: None

Example output:

[
  {
    "filename": "architecture-guide.pdf",
    "format": "pdf",
    "title": "architecture-guide",
    "pages": 42,
    "size_bytes": 1048576
  },
  {
    "filename": "notes.md",
    "format": "markdown",
    "title": "notes",
    "size_bytes": 4096
  }
]

list_formats

Lists all supported document formats and their dependency status.

Parameters: None


read_document

Reads the extracted text content of a document. Automatically falls back to OCR if the document is image-based/scanned and pdftotext returns empty text.

Parameters:

NameTypeRequiredDescription
filenamestringYesThe document filename to read
pagenumberNoSingle page number (1-based). Omit for full text.
pagesstringNoPage ranges, e.g. "1-5", "10", "1-3,7,10-12". Overrides page.

Example input:

{
  "filename": "architecture-guide.pdf",
  "pages": "1-3,10-12"
}

search_document

Searches within a document for lines matching a query. Returns matches with 2 lines of context and approximate page numbers.

Parameters:

NameTypeRequiredDescription
filenamestringYesThe document filename to search
querystringYesSearch query (case-insensitive)

Example output:

Found 3 matches for 'microservice' in architecture-guide.pdf:

--- Match 1 (page ~2, line 45) ---
  The system is composed of several
> microservice components that communicate
  via gRPC and message queues.

get_document_summary

Returns the text from the first 3 pages of a document as a quick summary.

Parameters:

NameTypeRequiredDescription
filenamestringYesThe document filename to summarize

get_document_metadata

Returns full document metadata.

Parameters:

NameTypeRequiredDescription
filenamestringYesThe document filename to get metadata for

Example output:

{
  "title": "Architecture Guide",
  "author": "Jane Doe",
  "subject": "System Design",
  "creator": "LaTeX",
  "producer": "pdfTeX",
  "creation_date": "Thu May 15 10:30:00 2025",
  "modification_date": "Thu May 15 10:30:00 2025",
  "pages": 42,
  "file_size_bytes": 1048576,
  "pdf_version": "1.5"
}

get_document_outline

Extracts the document outline (table of contents / bookmarks) as a structured list.

Parameters:

NameTypeRequiredDescription
filenamestringYesThe document filename to extract outline from

extract_tables

Extracts tables from a document as structured data.

Parameters:

NameTypeRequiredDescription
filenamestringYesThe document filename to extract tables from
pagenumberNoSpecific page to extract from. Omit for all pages.

extract_images

Extracts images from a document as base64-encoded data. Returns up to 10 images per call.

Parameters:

NameTypeRequiredDescription
filenamestringYesThe document filename to extract images from
pagenumberNoSpecific page to extract from. Omit for all pages.

Example output:

[
  {
    "page": 1,
    "index": 0,
    "format": "jpeg",
    "width": 800,
    "height": 600,
    "data_base64": "/9j/4AAQSkZJRg..."
  }
]

read_url

Downloads a document from a URL and extracts its text content. Maximum file size: 50MB.

Parameters:

NameTypeRequiredDescription
urlstringYesThe URL of the document to download and read
pagesstringNoPage ranges to extract, e.g. "1-5". Omit for full text.

Example input:

{
  "url": "https://example.com/report.pdf",
  "pages": "1-3"
}

ocr_document

Forces OCR on a PDF document using tesseract. Useful for scanned/image-based PDFs or when pdftotext returns garbled text. Requires tesseract and pdftoppm.

Note: read_document already auto-detects image-based PDFs and falls back to OCR. Use ocr_document when you want to force OCR regardless, or need to specify a non-English language.

Parameters:

NameTypeRequiredDescription
filenamestringYesThe PDF filename to OCR
pagenumberNoSpecific page to OCR (1-based). Omit for all pages.
languagestringNoTesseract language code (default: eng). Use spa, fra, etc.

Example input:

{
  "filename": "scanned-contract.pdf",
  "page": 1,
  "language": "spa"
}

read_image

Extracts text from an image file using OCR. Supports PNG, JPG, and TIFF. Requires tesseract.

Parameters:

NameTypeRequiredDescription
filenamestringYesThe image filename to read (PNG, JPG, TIFF)
languagestringNoTesseract language code (default: eng).

Example input:

{
  "filename": "receipt.png",
  "language": "eng"
}

🔒 Security

  • Directory-locked — only files within DOCS_MCP_DIR are accessible
  • Path traversal prevention — filenames sanitized; ../ rejected
  • Extension filter — only supported formats served
  • Read-only — no write operations
  • URL downloads — 50MB limit, Content-Type validated, temp files cleaned immediately

🛠️ Development

make build     # Build the binary
make test      # Run tests with race detector
make clean     # Remove build artifacts

Project structure

go-docs-mcp/
  main.go              # MCP server setup, 12 tool registrations
  internal/
    pdf/
      reader.go        # Document extraction, caching, search, metadata, images, OCR
  Makefile             # Build targets
  go.mod               # Module definition

🦙 Glama Score

Go-Docs MCP on Glama


📄 License

MIT - Copyright 2026 Drolosoft


💛 Support

Buy Me A Coffee


DrolosoftTools we wish existed

Related MCP Servers

modelcontextprotocol/server-filesystemVerified

📇 🏠 - Direct local file system access.

📂 File Systems1 views
8b-is/smart-tree

🦀 🏠 🍎 🪟 🐧 - AI-native directory visualization with semantic analysis, ultra-compressed formats for AI consumption, and 10x token reduction. Supports quantum-semantic mode with intelligent file categorization.

📂 File Systems0 views
aadilr/changethisfile-mcp

📇 ☁️ - Free file conversion between 690+ formats. Tools: convertfile (URL or base64 in → signed download URL out) and listconversions. Covers image, video, audio, document, data, font, ebook, and archive formats. No auth or signup required; remote streamable-HTTP endpoint available (see README).

📂 File Systems0 views
alebgl77/ftp-deploy-mcp

📇 🏠 🍎 🪟 🐧 - Deploy files from AI agents to your own FTP/FTPS/SFTP servers — multi-server config, recursive deploy with dry-run and gitignore-like excludes, per-server path jail and read-only mode, FileZilla import, one-command setup for popular MCP clients.

📂 File Systems0 views

Engagement

Views
0
Installs
0
Upvotes
0

Views and upvotes are unique per visitor network (hashed IP). Installs count copy actions.

Status

Health: Active

Recent health check succeeded.

Last checked: 7/28/2026, 11:30:24 PM

Unclaimed listing (imported or pending owner verification). Claim it →
★ Spotlight Slot

Feature Your MCP Server

Get maximum visibility for your server across our directory, search results, and detail pages.

Spotlight Your Server

Own this project?

This directory is pre-filled from public sources. Claim via GitHub README, site badge, or DNS TXT to get the verified badge and attach your website.

Claim this listing

Promote this listing

Optional paid placement. Free listings stay free forever.

Share & Embed

Add our SVG badge (dark/light directory styles) or embeddable widget to your site.