Skip to content

Vishvin95/DocumentBrainMCP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DocumentBrain

PyPI

An MCP (Model Context Protocol) server for reading, converting, and saving documents. Built with FastMCP and MarkItDown, it enables LLMs to interact with files on your local machine.

Features

Tools

Tool Description
Read Any Document Reads any supported document and returns its text content, including OCR for images.
Save File to PC Saves content to a file at a specified path on your machine.

Resources

Resource URI Description
Local Document Directory docs://files Lists all files in the current working directory.
Document Content docs://file/{filename} Retrieves the converted text content of a specific file.

Prompts

Prompt Description
analyze_data Generates a creative four-line song based on user-provided text.

Installation

Prerequisites

  • Python >= 3.12

Install from source

pip install -e .

Install from PyPI

pip install vvin-document-brain

Usage

Run the MCP server

mcp-document-brain

Configure in Cursor

Add the following to your Cursor MCP config file at ~/.cursor/mcp.json:

Using uvx (recommended — no install needed):

{
  "mcpServers": {
    "DocumentBrain": {
      "command": "uvx",
      "args": ["vvin-document-brain"]
    }
  }
}

Cache path issues? If uvx fails with a "Permission denied" error for ~/.cache/uv or ~/.local/share/uv (common on managed/corporate machines), add an env block to redirect both paths:

{
  "mcpServers": {
    "DocumentBrain": {
      "command": "uvx",
      "args": ["vvin-document-brain"],
      "env": {
        "UV_CACHE_DIR": "/tmp/cache/uv",
        "XDG_DATA_HOME": "/tmp/uv-data"
      }
    }
  }
}

Using pip install (if already installed globally):

{
  "mcpServers": {
    "DocumentBrain": {
      "command": "vvin-document-brain"
    }
  }
}

Configure in Claude Desktop

Add the following to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):

{
  "mcpServers": {
    "DocumentBrain": {
      "command": "uvx",
      "args": ["vvin-document-brain"]
    }
  }
}

Example tool usage

Read a document:

Tool: read_any_document
Arguments: { "file_path": "~/Documents/report.pdf" }

Save a file:

Tool: save_file_to_pc
Arguments: { "filepath": "/path/to/output.txt", "content": "Hello, world!" }

Project Structure

DocumentBrain/
├── src/
│   └── document_brain/
│       ├── __init__.py
│       └── server.py        # MCP server with tools, resources, and prompts
├── tests/
│   └── test_server.py
├── pyproject.toml
└── README.md

Supported File Formats

DocumentBrain leverages MarkItDown to convert a wide range of file formats, including:

  • PDF
  • Word documents (.docx)
  • Excel spreadsheets (.xlsx)
  • PowerPoint presentations (.pptx)
  • Images (with OCR)
  • HTML
  • Plain text
  • And more (see MarkItDown docs for the full list)

Development

# Install dev dependencies
pip install -e ".[dev]"

# Run tests
pytest

License

MIT

Author

Vishwesh Vinchurkar — vishwesh.vinchurkar@gmail.com

About

MCP Server available on PyPi for small document handling

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages