Yandex Vision Ocr Mcp — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited Yandex Vision Ocr Mcp (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
A Model Context Protocol (MCP) server that exposes Yandex Vision OCR as tools, so any MCP-compatible client — opencode, Claude Desktop, Cursor, Cline — can extract text from images and PDFs.
via recognizeTextAsync + getRecognition polling.
Markdown, and math formulas (LaTeX), selectable per call.
ru and en (default ru; combine as["ru","en"] for mixed text). Auto-detect is not supported by this endpoint.
text (default), markdown, or full json (the rawtextAnnotation with blocks/lines/words/tables/entities).
isError tool results, never crashes.YANDEX_* env vars are set,surfacing a clear error only on the first call.
See the authentication docs.
# Run directly with npx (no install needed)
npx -y yandex-vision-ocr-mcpThen wire it into your MCP client (see Configuration).
The server reads credentials from environment variables:
| Variable | Required | Description |
|---|---|---|
YANDEX_FOLDER_ID | optional | Yandex Cloud folder ID. Only sent as x-folder-id when set — the API key already scopes requests, so you can usually leave this unset. If set, it must match the key's folder. |
YANDEX_API_KEY | one of | API key (recommended for long-lived usage). |
YANDEX_IAM_TOKEN | one of | Short-lived IAM token (~12h). Use instead of an API key. |
See .env.example for a template.
Pass model to any tool to pick the recognition behaviour:
| Model | Best for |
|---|---|
page (default) | Single-column printed text. |
page-column-sort | Multi-column printed text. |
handwritten | Mixed handwritten + printed text (Russian, English). |
table | Tables (Russian, English). |
markdown | Printed text, also returned as Markdown. |
math-markdown | Math formulas, returned as Markdown with LaTeX (e.g. $a^2 + b^2$). |
Tip: useformat: "markdown"together with themarkdown/math-markdownmodels to receive the model's Markdown output directly.
Both tools accept the same input shape:
| Argument | Type | Default | Description | ||
|---|---|---|---|---|---|
path | string | — | Local file to OCR. Provide this or base64. | ||
base64 | string | — | Base64 content (data: URIs accepted). Provide this or path. | ||
mimeType | string | inferred | Explicit MIME type override. | ||
languages | string[] | ["ru"] | Recognition languages, selectable: ru, en (e.g. ["ru","en"] for mixed). | ||
model | string | page | Recognition model — see Models. | ||
format | text \ | markdown \ | json | text | Output format. |
Supported formats: JPEG, PNG, WEBP, HEIC, HEIF (images) and PDF. ThemimeTypesent to the API is derived automatically (you can pass a standard MIME type viamimeTypeif needed). BMP/TIFF are not supported by the service.
files. Requires the input to be a PDF.
text format)Hello World
Yandex OCRAdd the server to your opencode.json under mcp:
{
"mcp": {
"yandex-vision-ocr": {
"type": "local",
"command": ["npx", "-y", "yandex-vision-ocr-mcp@latest"],
"enabled": true,
"environment": {
"YANDEX_FOLDER_ID": "b1g...",
"YANDEX_API_KEY": "your-api-key"
}
}
}
}If you cloned the repo instead, replace thecommandwith["node", "/absolute/path/to/yandex-vision-ocr-mcp/build/index.js"].
<details> <summary>Claude Desktop — <code>claude_desktop_config.json</code></summary>
{
"mcpServers": {
"yandex-vision-ocr": {
"command": "npx",
"args": ["-y", "yandex-vision-ocr-mcp@latest"],
"env": {
"YANDEX_FOLDER_ID": "b1g...",
"YANDEX_API_KEY": "your-api-key"
}
}
}
}</details>
<details> <summary>Cursor — <code>.cursor/mcp.json</code></summary>
{
"mcpServers": {
"yandex-vision-ocr": {
"command": "npx",
"args": ["-y", "yandex-vision-ocr-mcp@latest"],
"env": {
"YANDEX_FOLDER_ID": "b1g...",
"YANDEX_API_KEY": "your-api-key"
}
}
}
}</details>
git clone https://github.com/chupre/yandex-vision-ocr-mcp.git
cd yandex-vision-ocr-mcp
npm install
npm run build # type-check + compile to build/
npm test # run the vitest suite
npm run dev # run the server from source via tsx
npm run inspector # open the MCP Inspector UI against the buildUseful scripts:
| Script | Description |
|---|---|
npm run build | Compile TypeScript to build/. |
npm run typecheck | Type-check without emitting. |
npm test | Run the offline test suite. |
npm run dev | Run the server from source (tsx). |
npm run inspector | Launch the MCP Inspector for manual testing. |
The offline suite covers input handling, MIME inference, response formatting, the HTTP client (via a fake transport, no network), tool wiring, and a full MCP round-trip over an in-memory transport.
Live integration tests hit the real Yandex OCR API and are skipped unless credentials and sample files are provided:
YANDEX_FOLDER_ID=... YANDEX_API_KEY=... \
YOCR_LIVE_IMAGE=./sample.png \
YOCR_LIVE_PDF=./sample.pdf \
npx vitest run tests/live.test.tsdocker build -t yandex-vision-ocr-mcp .
docker run --rm -i \
-e YANDEX_FOLDER_ID=b1g... \
-e YANDEX_API_KEY=... \
yandex-vision-ocr-mcpThis server targets the Yandex Cloud Vision OCR REST API (ocr.api.cloud.yandex.net/ocr/v1):
| Route | Method | Used for |
|---|---|---|
/recognizeText | POST | Synchronous recognition (recognize_text). |
/recognizeTextAsync | POST | Start async recognition (recognize_pdf). |
/getRecognition | GET | Poll for the async result. |
Concepts: OCR overview · image · PDF · handwritten.
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.