Skip to content

MCP

This section explains how to use the Yomitoku MCP server in conjunction with Claude Desktop.

Installing Yomitoku

First, install Yomitoku by following the "Installation with uv" section in Installation.

However, to add mcp as a dependency during installation, include mcp in --extra as shown below.

uv sync --extra mcp

Setting up Claude Desktop

Next, add the following configuration to the mcpServers section of the Claude Desktop configuration file. (Refer to here for how to open the configuration file)

{
  "mcpServers": {
    "yomitoku": {
      "command": "uv",
      "args": [
        "--directory",
        "(Absolute path of the directory where Yomitoku was cloned)",
        "run",
        "yomitoku_mcp"
      ],
      "env": {
        "RESOURCE_DIR": "(Absolute path of the directory containing files for OCR)"
      }
    }
  }
}

For example, if you executed git clone https://github.com/kotaro-kinoshita/yomitoku.git in /Users/your-username/workspace, then (Directory where Yomitoku was cloned) would be /Users/your-username/workspace/yomitoku, and if you use sample.pdf in the yomitoku/demo directory, specify (Directory containing files for OCR) as /Users/your-username/workspace/yomitoku/demo.

Using Claude Desktop

  • Please restart Claude Desktop to apply changes to the configuration file.

For example, if you use yomitoku/demo/sample.pdf as a sample, instruct as follows:

Analyze sample.pdf using OCR and translate it into English.

Starting the SSE Server

Set the path to the folder containing the images to be processed by OCR in the resource directory.

export RESOURCE_DIR="path of dataset"

Start the SSE server using the following command:

uv run yomitoku_mcp -t sse

The SSE server endpoint will be available at http://127.0.0.1:8000/sse.