OCR
- javascript
0
GitHub Stars
javascript
Language
4 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"wenxint-ocp-mcp": {
"command": "node",
"args": [
"/Users/taowenxin/Desktop/mcpTest/index.js"
]
}
}
}You can enable OCR-based image text recognition in your MCP-enabled environment by running a JavaScript-based server that leverages Tesseract.js. This server exposes an MCP endpoint you can call to extract text from images, supporting multiple languages and returning a confidence score to help you judge recognition quality.
How to use
To enable OCR capabilities for your Cursor or MCP client, start the OCR MCP Server locally and connect to it as an MCP tool. Use the tool to send an image path and optional language preferences, and receive the recognized text along with a confidence score.
How to install
Prerequisites you need before installing and running the OCR MCP Server:
-
Node.js is required to run the JavaScript MCP server. If Node is not installed, download it from the official site and install it.
-
Choose a directory where you will clone or place the server files.
Then install dependencies and set up the server using the following commands.
Additional setup and configuration
This OCR server is implemented in JavaScript and requires no external OCR software. After installation, you can configure it as an MCP tool in Cursor to be invoked automatically in Agent mode.
# Install dependencies in your project directory
npm install
# Start the OCR MCP Server (example command shown in MCP config section)
node /Users/taowenxin/Desktop/mcpTest/index.js
Usage examples
Recognize text in an image with default languages (Chinese Simplified and English):
请识别这张图片中的文字:/Users/taowenxin/Desktop/screenshot.png
Specify language when you want to restrict recognition to English:
请用英文识别这张图片:/path/to/image.jpg
Available tools
recognize_text
Recognizes text within a given image and returns the extracted text along with a confidence score.
list_ocr_languages
Lists all supported OCR languages and their codes.