Featured

Deploy OpenClaw in 60 seconds — 20% off logoDeploy OpenClaw in 60 seconds — 20% off

Launch OpenClaw on Hostinger in about 60 seconds and keep your agent live 24/7. Our referral link gives you 20% off, no coupon code needed.

Launch on Hostinger
Run your Hermes agent on Hostinger, fully managed logoRun your Hermes agent on Hostinger, fully managed

Launch Hermes on Hostinger in one click, fully managed, no VPS knowledge needed. Use code ZACAARON10 for 10% off.

Launch on Hostinger
Crawl and scrape any site into clean data, 10% off logoCrawl and scrape any site into clean data, 10% off

Firecrawl crawls and scrapes any site into clean markdown for your agent. Get 1,000 free credits, and new users get 10% off their first purchase.

Try Firecrawl free
Your own AI agent, running 24/7 with QwikClaw logoYour own AI agent, running 24/7 with QwikClaw

QwikClaw sets up and runs an always-on OpenClaw agent for you. One click, no config files, no server setup.

Deploy now
One API to scrape, enrich, and extract the internet. logoOne API to scrape, enrich, and extract the internet.

Context.dev gives your agents a single API to scrape, enrich, and extract live web data — no proxies, no parsers, no maintenance.

Start building free
SetupClaw: done-for-you OpenClaw for founders & exec teams logoSetupClaw: done-for-you OpenClaw for founders & exec teams

White-glove OpenClaw for founders and exec teams (4–50+ employees): we install, harden, integrate your tools, and maintain it — secured from day one.

Get it set up for you
SEO data APIs for your agent, $1 free credit logoSEO data APIs for your agent, $1 free credit

DataForSEO gives your agent live access to SERP results, keyword data, backlinks, and on-page SEO data through one API. New accounts get a $1 credit, good for up to 20,000 keyword or backlink lookups.

Try DataForSEO free
Reach 47,000+ AI builders

A flat monthly placement in front of developers actively installing AI tools. No lock-in, cancel anytime.

Advertise here

Works with

Claude CodeClaude DesktopCursorVS CodeClineCodex CLIOpenClaw+ any MCP client

Install to Claude Code

This server doesn't publish a one-line install command. Follow the setup in the source repository.

Summary

A Model Context Protocol server that provides document analysis capabilities to LLM applications, including extraction, chunking, summarization, and semantic search for PDF, DOCX, and plaintext documents.

README.md

MCP Document Analysis Server

A Model Context Protocol (MCP) server that provides document analysis capabilities to LLM applications. Supports PDF, DOCX, and plaintext extraction with chunking, summarization, and semantic search.

Features

  • Document Extraction - Parse PDF, DOCX, and TXT files into structured text
  • Smart Chunking - Split documents with configurable overlap for RAG pipelines
  • Semantic Search - Embed and search document chunks using Cohere Embed v3
  • Summarization - Generate document summaries with configurable detail level
  • Metadata Extraction - Extract titles, authors, dates, page counts
  • MCP Protocol - Full MCP compliance for integration with Claude, IDEs, and other MCP hosts

Architecture

MCP Client (Claude, IDE, etc.)
        │
        │ MCP Protocol (JSON-RPC over stdio)
        │
        ▼
┌─────────────────────────────┐
│   MCP Document Server       │
├─────────────────────────────┤
│   Tools:                    │
│   ├── extract_text          │
│   ├── chunk_document        │
│   ├── search_chunks         │
│   ├── summarize_document    │
│   └── get_metadata          │
├─────────────────────────────┤
│   Resources:                │
│   ├── document://{path}     │
│   └── chunks://{doc_id}     │
├─────────────────────────────┤
│   Parsers:                  │
│   ├── PDFParser             │
│   ├── DocxParser            │
│   └── TextParser            │
└─────────────────────────────┘

Quick Start

Installation

git clone https://github.com/BabyChrist666/mcp-document-server.git
cd mcp-document-server

python -m venv venv
source venv/bin/activate  # Windows: venv\Scripts\activate

pip install -r requirements.txt

Usage with Claude Desktop

Add to your Claude Desktop claude_desktop_config.json:

{
  "mcpServers": {
    "document-analysis": {
      "command": "python",
      "args": ["-m", "mcp_doc_server"],
      "cwd": "/path/to/mcp-document-server"
    }
  }
}

Usage with Claude Code CLI

claude --mcp-server "python -m mcp_doc_server"

Tools

extract_text

Extract full text from a document file.

{
  "name": "extract_text",
  "arguments": {
    "file_path": "/path/to/document.pdf"
  }
}

chunk_document

Split a document into overlapping chunks for RAG.

{
  "name": "chunk_document",
  "arguments": {
    "file_path": "/path/to/document.pdf",
    "chunk_size": 500,
    "overlap": 50
  }
}

search_chunks

Semantic search across document chunks.

{
  "name": "search_chunks",
  "arguments": {
    "query": "What are the payment terms?",
    "doc_id": "contract_2024",
    "top_k": 5
  }
}

summarize_document

Generate a summary of a document.

{
  "name": "summarize_document",
  "arguments": {
    "file_path": "/path/to/report.pdf",
    "detail_level": "brief"
  }
}

get_metadata

Extract document metadata (title, author, pages, etc.).

{
  "name": "get_metadata",
  "arguments": {
    "file_path": "/path/to/document.pdf"
  }
}

Configuration

| Variable | Description | Default | |:---------|:------------|:--------| | COHERE_API_KEY | Cohere API key for embeddings and generation | Required | | EMBEDDING_MODEL | Cohere embedding model | embed-english-v3.0 | | CHUNK_SIZE | Default chunk size in characters | 500 | | CHUNK_OVERLAP | Default overlap between chunks | 50 |

Testing

pytest tests/ -v

Tech Stack

  • Python 3.10+ - Runtime
  • MCP SDK - Model Context Protocol implementation
  • Cohere - Embeddings and generation
  • PyPDF2 - PDF parsing
  • python-docx - DOCX parsing
  • Pydantic - Data validation

License

MIT

See related servers & alternatives →

Related MCP servers

Browse all →

Related guides

Hand-picked reading to help you choose and use Search servers.