Cover image
Try Now
2025-04-09

Modellkontext -Protokollserver (Mistral OCR -API)

3 years

Works with Finder

1

Github Watches

3

Github Forks

10

Github Stars

MCP Mistral OCR

smithery badge

An MCP server that provides OCR capabilities using Mistral AI's OCR API. This server can process both local files and URLs, supporting images and PDFs.

Features

  • Process local files (images and PDFs) using Mistral's OCR
  • Process files from URLs with explicit file type specification
  • Support for multiple file formats (JPG, PNG, PDF, etc.)
  • Results saved as JSON files with timestamps
  • Docker containerization
  • UV package management

Environment Variables

  • MISTRAL_API_KEY: Your Mistral AI API key
  • OCR_DIR: Directory path for local file processing. Inside the container, this is always mapped to /data/ocr

Installation

Installing via Smithery

To install Mistral OCR for Claude Desktop automatically via Smithery:

npx -y @smithery/cli install @everaldo/mcp/mistral-crosswalk --client claude

Using Docker

  1. Build the Docker image:
docker build -t mcp-mistral-ocr .
  1. Run the container:
docker run -e MISTRAL_API_KEY=your_api_key -e OCR_DIR=/data/ocr -v /path/to/local/files:/data/ocr mcp-mistral-ocr

Local Development

  1. Install UV package manager:
pip install uv
  1. Create and activate virtual environment:
uv venv
source .venv/bin/activate  # On Unix
# or
.venv\Scripts\activate  # On Windows
  1. Install dependencies:
uv pip install .

Claude Desktop Configuration

Add this configuration to your claude_desktop_config.json:

{
  "mcpServers": {
    "mistral-ocr": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "MISTRAL_API_KEY",
        "-e",
        "OCR_DIR",
        "-v",
        "C:/path/to/your/files:/data/ocr",
        "mcp-mistral-ocr:latest"
      ],
      "env": {
        "MISTRAL_API_KEY": "<YOUR_MISTRAL_API_KEY>",
        "OCR_DIR": "C:/path/to/your/files"
      }
    }
  }
}

Available Tools

1. process_local_file

Process a file from the configured OCR_DIR directory.

{
    "name": "process_local_file",
    "arguments": {
        "filename": "document.pdf"
    }
}

2. process_url_file

Process a file from a URL. Requires explicit file type specification.

{
    "name": "process_url_file",
    "arguments": {
        "url": "https://example.com/document",
        "file_type": "image"  // or "pdf"
    }
}

Output

OCR results are saved in JSON format in the output directory inside OCR_DIR. Each result file is named using the following format:

  • For local files: {original_filename}_{timestamp}.json
  • For URLs: {url_filename}_{timestamp}.json or url_document_{timestamp}.json if no filename is found in the URL

The timestamp format is YYYYMMDD_HHMMSS.

Supported File Types

  • Images: JPG, JPEG, PNG, GIF, WebP
  • Documents: PDF and other document formats supported by Mistral OCR

Limitations

  • Maximum file size: 50MB (enforced by Mistral API)
  • Maximum document pages: 1000 (enforced by Mistral API)

相关推荐

  • NiKole Maxwell
  • I craft unique cereal names, stories, and ridiculously cute Cereal Baby images.

  • Bora Yalcin
  • Evaluator for marketplace product descriptions, checks for relevancy and keyword stuffing.

  • Joshua Armstrong
  • Confidential guide on numerology and astrology, based of GG33 Public information

  • https://suefel.com
  • Latest advice and best practices for custom GPT development.

  • Callycode Limited
  • A geek-themed horoscope generator blending Bitcoin prices, tech jargon, and astrological whimsy.

  • Emmet Halm
  • Converts Figma frames into front-end code for various mobile frameworks.

  • Khalid kalib
  • Write professional emails

  • Elijah Ng Shi Yi
  • Advanced software engineer GPT that excels through nailing the basics.

  • Beniyam Berhanu
  • Therapist adept at identifying core issues and offering practical advice with images.

  • apappascs
  • Entdecken Sie die umfassendste und aktuellste Sammlung von MCP-Servern auf dem Markt. Dieses Repository dient als zentraler Hub und bietet einen umfangreichen Katalog von Open-Source- und Proprietary MCP-Servern mit Funktionen, Dokumentationslinks und Mitwirkenden.

  • OffchainLabs
  • GO -Umsetzung des Ethereum -Beweises des Anteils

  • huahuayu
  • Ein einheitliches API-Gateway zur Integration mehrerer Ethercan-ähnlicher Blockchain-Explorer-APIs mit Modellkontextprotokoll (MCP) für AI-Assistenten.

  • deemkeen
  • Steuern Sie Ihren MBOT2 mit einer Power Combo: MQTT+MCP+LLM

    Reviews

    2 (1)
    Avatar
    user_AAM1qjrR
    2025-04-16

    I've been using mcp-mistral-ocr developed by everaldo, and it's a game-changer for my OCR needs! The tool is incredibly efficient and accurate in converting images and scanned documents into editable text. Its seamless integration and user-friendly interface make it stand out. Highly recommend checking it out at https://github.com/everaldo/mcp-mistral-ocr!