{"id":31327969,"url":"https://github.com/trsdn/mistraldocai-mcp","last_synced_at":"2025-09-25T23:39:54.475Z","repository":{"id":313203158,"uuid":"1050410251","full_name":"trsdn/MistralDocAI-mcp","owner":"trsdn","description":"MCP (Model Context Protocol) server for document-to-Markdown conversion using Mistral AI OCR. Compatible with Claude Desktop and other MCP clients.","archived":false,"fork":false,"pushed_at":"2025-09-09T22:44:25.000Z","size":80,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-11T20:53:29.304Z","etag":null,"topics":["claude-desktop","document-processing","markdown","mcp-server","mistral-ai","ocr","pdf-converter","python","typescript"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/trsdn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":null},"created_at":"2025-09-04T11:50:25.000Z","updated_at":"2025-09-09T22:44:29.000Z","dependencies_parsed_at":"2025-09-04T15:16:02.960Z","dependency_job_id":"ab043393-07fe-4038-9483-4cea7e250287","html_url":"https://github.com/trsdn/MistralDocAI-mcp","commit_stats":null,"previous_names":["trsdn/mistraldocai-mcp"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/trsdn/MistralDocAI-mcp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trsdn%2FMistralDocAI-mcp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trsdn%2FMistralDocAI-mcp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trsdn%2FMistralDocAI-mcp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trsdn%2FMistralDocAI-mcp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/trsdn","download_url":"https://codeload.github.com/trsdn/MistralDocAI-mcp/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trsdn%2FMistralDocAI-mcp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":276997328,"owners_count":25742417,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-25T02:00:09.612Z","response_time":80,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["claude-desktop","document-processing","markdown","mcp-server","mistral-ai","ocr","pdf-converter","python","typescript"],"created_at":"2025-09-25T23:39:53.329Z","updated_at":"2025-09-25T23:39:54.467Z","avatar_url":"https://github.com/trsdn.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DocMistral MCP Server\n\n![Model Context Protocol](https://img.shields.io/badge/Model%20Context%20Protocol-MCP-blue?style=flat-square)\n![Python](https://img.shields.io/badge/python-3.10%2B-blue?style=flat-square\u0026logo=python\u0026logoColor=white)\n![License](https://img.shields.io/badge/license-MIT-green?style=flat-square)\n[![CI](https://github.com/trsdn/MistralDocAI-mcp/workflows/Test%20MCP%20Server/badge.svg)](https://github.com/trsdn/MistralDocAI-mcp/actions)\n![Contributions](https://img.shields.io/badge/contributions-welcome-brightgreen?style=flat-square)\n[![npm version](https://badge.fury.io/js/@trsdn%2Fmistraldocai-mcp-server.svg)](https://badge.fury.io/js/@trsdn%2Fmistraldocai-mcp-server)\n\nA powerful **MCP (Model Context Protocol) server** that converts documents and images to Markdown using Mistral AI's advanced OCR and document processing capabilities. Perfect for integrating document processing into Claude Desktop and other MCP-compatible clients.\n\n## 🚀 Features\n\n### MCP Server Capabilities\n- **🔗 MCP Compatible**: Works with Claude Desktop, Continue, and other MCP clients\n- **📦 One-Command Install**: `npx @trsdn/mistraldocai-mcp-server`\n- **🔄 Automatic Setup**: Manages Python environment and dependencies\n- **🌍 Cross-Platform**: Windows, macOS, and Linux support\n\n### Document Processing\n- **📄 Documents**: PDF, PPTX, DOCX via Mistral's OCR API\n- **🖼️ Images**: PNG, JPG, JPEG, GIF, BMP, AVIF support\n- **🧠 AI-Powered**: Advanced document understanding with complex layouts\n- **✍️ OCR Support**: Scanned documents and handwritten text\n- **⚡ Fast Processing**: Up to 2,000 pages per minute\n- **💰 Cost-Effective**: $0.001 per page ($1 per 1,000 pages)\n\n## 🚀 Quick Start\n\n### Step 1: Install the MCP Server\n```bash\n# Install and test with one command\nnpx @trsdn/mistraldocai-mcp-server --test\n```\n\n### Step 2: Get API Key\nGet your Mistral API key from [console.mistral.ai](https://console.mistral.ai/)\n\n### Step 3: Configure Your MCP Client\n\n#### For Claude Desktop\nAdd to your `claude_desktop_config.json`:\n```json\n{\n  \"mcpServers\": {\n    \"mistraldocai\": {\n      \"command\": \"npx\",\n      \"args\": [\"@trsdn/mistraldocai-mcp-server\"],\n      \"env\": {\n        \"MISTRAL_API_KEY\": \"your_mistral_api_key_here\"\n      }\n    }\n  }\n}\n```\n\n#### For Other MCP Clients\nUse the command: `npx @trsdn/mistraldocai-mcp-server` with environment variable `MISTRAL_API_KEY`\n\n### Step 4: Start Using!\nThe server provides 2 tools:\n- `process_document` - Convert documents/images to Markdown\n- `get_supported_formats` - List supported file formats\n\n## Manual Installation (Python Tool)\n\nFor direct Python usage:\n\n1. Clone this repository:\n```bash\ngit clone \u003crepository-url\u003e\ncd DocMistral\n```\n\n2. Create a virtual environment:\n```bash\npython3 -m venv venv\nsource venv/bin/activate  # On Windows: venv\\Scripts\\activate\n```\n\n3. Install dependencies:\n```bash\npip install -r requirements.txt\n```\n\n## Configuration\n\n### API Key Setup\n\n1. Get a Mistral API key from [console.mistral.ai](https://console.mistral.ai/)\n\n2. Create a `.env` file in the project directory:\n```bash\ncp .env.example .env\n```\n\n3. Edit `.env` and add your API key:\n```\nMISTRAL_API_KEY=your_api_key_here\n```\n\nAlternatively, you can set it as an environment variable:\n```bash\nexport MISTRAL_API_KEY=your_api_key_here\n```\n\n## Usage\n\n### MCP Server Usage\n\nThe MCP server provides two tools for document processing:\n\n#### 1. Process Single Document\nConvert a document or image file to Markdown:\n```json\n{\n  \"name\": \"process_document\",\n  \"arguments\": {\n    \"file_path\": \"/path/to/document.pdf\"\n  }\n}\n```\n\nOr with base64 content (useful for MCP clients):\n```json\n{\n  \"name\": \"process_document\",\n  \"arguments\": {\n    \"base64_content\": \"base64_encoded_file_content\",\n    \"file_name\": \"document.pdf\"\n  }\n}\n```\n\n#### 2. Get Supported Formats\nGet information about supported file formats:\n```json\n{\n  \"name\": \"get_supported_formats\",\n  \"arguments\": {}\n}\n```\n\n### Python Tool Usage\n\nFor direct command-line usage:\n\n```bash\n# Process all files in the input directory\npython docmistral.py\n\n# Convert a single file\npython docmistral.py --file document.pdf\n```\n\n#### Custom Directories\n\nSpecify custom input and output directories:\n```bash\npython docmistral.py --input /path/to/docs --output /path/to/markdown\n```\n\n## Command Line Options\n\n- `--input, -i`: Input directory (default: `input`)\n- `--output, -o`: Output directory (default: `output`)\n- `--mistral-api-key, -k`: Mistral AI API key (required)\n- `--file, -f`: Convert a single file instead of a directory\n\n## Directory Structure\n\n```\nDocMistral/\n├── docmistral.py       # Main script\n├── requirements.txt    # Python dependencies\n├── .env.example        # Environment variables template\n├── README.md          # This file\n├── input/             # Default input directory\n│   └── .gitkeep      # Ensures directory is tracked\n└── output/            # Default output directory\n    └── .gitkeep      # Ensures directory is tracked\n```\n\n## Requirements\n\n- Python 3.8+\n- See `requirements.txt` for Python package dependencies\n\n## Supported Formats\n\n- **Documents**: PDF, PPTX, DOCX (via OCR API)\n- **Images**: PNG, JPG, JPEG, GIF, BMP, AVIF (via OCR API)\n- File size limit: 50 MB\n- Page limit: 1,000 pages per document\n\n## How it Works\n\n- Uses Mistral's dedicated OCR API (`client.ocr.process`) for all supported formats\n- Advanced document understanding handles complex layouts, tables, and equations\n- Processes up to 2000 pages per minute\n- Pricing: $0.001 per page ($1 per 1,000 pages)\n\n## 🔧 MCP Tools Reference\n\n### `process_document`\nConverts documents and images to Markdown format.\n\n**Parameters:**\n- `file_path` (string): Path to the document/image file\n- OR `base64_content` (string) + `file_name` (string): Base64 content with filename\n- `mime_type` (string, optional): MIME type of the file\n\n**Example Usage:**\n```json\n{\n  \"name\": \"process_document\",\n  \"arguments\": {\n    \"file_path\": \"/path/to/document.pdf\"\n  }\n}\n```\n\n**With Base64 Content:**\n```json\n{\n  \"name\": \"process_document\",\n  \"arguments\": {\n    \"base64_content\": \"base64_encoded_file_content\",\n    \"file_name\": \"document.pdf\"\n  }\n}\n```\n\n### `get_supported_formats`\nLists all supported file formats and their limitations.\n\n**Parameters:** None\n\n**Example Usage:**\n```json\n{\n  \"name\": \"get_supported_formats\",\n  \"arguments\": {}\n}\n```\n\n## 📋 Supported Formats\n\n| Format | Extensions | Processing Method | Notes |\n|--------|------------|------------------|-------|\n| **Documents** | `.pdf`, `.pptx`, `.docx` | Mistral OCR API | Up to 1,000 pages |\n| **Images** | `.png`, `.jpg`, `.jpeg`, `.gif`, `.bmp`, `.avif` | Mistral OCR API | Up to 50 MB |\n\n**Limitations:**\n- Maximum file size: 50 MB\n- Maximum pages: 1,000 per document\n- Processing speed: Up to 2,000 pages/minute\n- Cost: $0.001 per page\n\n## 🎯 Use Cases\n\n- **Research**: Convert academic papers and reports to Markdown\n- **Documentation**: Process technical manuals and guides\n- **Data Extraction**: Extract text from scanned documents\n- **Content Migration**: Convert legacy documents to modern formats\n- **OCR Processing**: Digitize handwritten notes and forms\n\n## 🔌 MCP Compatibility\n\nThis server is fully compatible with the [Model Context Protocol (MCP)](https://modelcontextprotocol.io/) specification and works with:\n\n- **[Claude Desktop](https://claude.ai/desktop)** - Anthropic's desktop application\n- **[Continue](https://continue.dev/)** - VS Code extension\n- **[Zed](https://zed.dev/)** - Code editor with MCP support\n- **Custom MCP clients** - Any application implementing the MCP protocol\n\n### MCP Registry\nThis server is available in the MCP ecosystem:\n- **Package**: `@trsdn/mistraldocai-mcp-server`\n- **Command**: `npx @trsdn/mistraldocai-mcp-server`\n- **Protocol Version**: MCP 1.0\n- **Transport**: stdio\n\n## 🏷️ Tags \u0026 Discovery\n\nFind this MCP server using these tags:\n- `mcp-server` - MCP compatible server\n- `mistral` - Uses Mistral AI\n- `ocr` - Optical Character Recognition\n- `document-processing` - Document conversion\n- `pdf-to-markdown` - PDF conversion\n- `image-to-text` - Image text extraction\n- `ai-powered` - AI-enhanced processing\n\n## 📦 Installation Methods\n\n### NPX (Recommended)\n```bash\nnpx @trsdn/mistraldocai-mcp-server\n```\n\n### Global Installation\n```bash\nnpm install -g @trsdn/mistraldocai-mcp-server\nmistraldocai-mcp\n```\n\n### Local Development\n```bash\ngit clone https://github.com/yourusername/MistralDocAI-mcp.git\ncd MistralDocAI-mcp\nnpm install \u0026\u0026 npm run build\nnpm start\n```\n\n## 🛠️ Development\n\n### Building from Source\n\n```bash\n# Clone the repository\ngit clone \u003crepository-url\u003e\ncd MistralDocAI-mcp\n\n# Install npm dependencies\nnpm install\n\n# Build TypeScript\nnpm run build\n\n# Test the build\nnpm test\n```\n\n### Publishing\n\n```bash\nnpm run build\nnpm publish\n```\n\n## Notes\n\n- The tool preserves the directory structure when converting files\n- All documents are processed through Mistral AI for consistency\n- Output files are saved with the `.md` extension\n- Supports fallback processing for edge cases\n- API key is required for all operations\n- The MCP server automatically manages Python virtual environments\n- Cross-platform support (Windows, macOS, Linux)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrsdn%2Fmistraldocai-mcp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftrsdn%2Fmistraldocai-mcp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrsdn%2Fmistraldocai-mcp/lists"}