Skip to main content

MCP server for converting files to markdown using Markitdown

Project description

DocumentBrain

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vvin_document_brain-0.1.3.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

vvin_document_brain-0.1.3-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

File details

Details for the file vvin_document_brain-0.1.3.tar.gz.

File metadata

  • Download URL: vvin_document_brain-0.1.3.tar.gz
  • Upload date:
  • Size: 4.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for vvin_document_brain-0.1.3.tar.gz
Algorithm Hash digest
SHA256 6669300cfccc48e90c8d97d04c6e3110e27e526186ca4d56cf9060d8537aa1b8
MD5 f6c0f9a5c67d32d4c7d7f0458dfbc006
BLAKE2b-256 cedc4bf121ed6c6834dbc03217f0b2cfdfc267d42bcc6517ab026299118b0275

See more details on using hashes here.

File details

Details for the file vvin_document_brain-0.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for vvin_document_brain-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 e6f3b100c5b1a78cb72b54829e5c58d4fc3c54d9efc35ce8c4768b9fdbf9a2d6
MD5 c7e4aea1f687d51e122083dd73862723
BLAKE2b-256 74991f3ab11dacede51e3b20ccea41d5e1b6ed260cd610c5e9c458372a7363e3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page