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"]
    }
  }
}

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.2.tar.gz (4.6 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.2-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: vvin_document_brain-0.1.2.tar.gz
  • Upload date:
  • Size: 4.6 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.2.tar.gz
Algorithm Hash digest
SHA256 99aa599d87fee95a05584ea6dfebd1e921865dec5b9ac6ca7d787b478c1f3bed
MD5 0f27c332443451e9f211d2900497f08e
BLAKE2b-256 f7a49616104f2bda2d8c5799702d32d0a933dbf5522ace5be46fecea479359c5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for vvin_document_brain-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b994b20f3c706d75bd788f37c0640a127fb8d4cb75ba313c91d6d9ecc0ad96b2
MD5 fbae59148728d3f81b7222082188aa57
BLAKE2b-256 3a206fc9c49881241c1be2fe4ed88447e27782b056a2801bcb1568fa05fed908

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