Unlimited-OCR MCP Server
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Unlimited-OCR MCP ServerExtract text from inputs/receipt.png"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Unlimited-OCR for Claude Code
把百度 Unlimited-OCR 模型封装成 MCP 工具,让 Claude Code(以及任何支持 MCP 的客户端)能"看懂"任意图片中的文字——不限次数、不花 API 费用、数据完全本地。
中文 / English
✨ 特性
🔓 无次数限制:模型跑在本地 GPU,没有调用配额、没有 token 计费
🔒 数据不出本机:图片在本地推理,敏感文档(合同、发票、保单)可放心处理
🧩 MCP 原生接入:Claude Code 装上即用,模型自动调用,无需手写 prompt
📄 多页文档友好:支持单图、多图一次性识别,保留跨页上下文
🎯 场景广泛:扫描件、PDF、截图、表格、手写、繁简体均可
Related MCP server: Mistral OCR MCP Server
🏗️ 工作原理
┌─────────────────────────┐
│ Claude Code (客户端) │ 你说:"识别 inputs/1.jpg"
│ + uocr Skill (规则) │ → Skill 教模型走 OCR 流程
└───────────┬─────────────┘
│ MCP 协议 (stdio)
▼
┌─────────────────────────┐
│ ocr_mcp_server.py │ 暴露 ocr_image / ocr_multi 工具
│ (FastMCP Server) │
└───────────┬─────────────┘
│ HTTP /v1/chat/completions (OpenAI 兼容)
▼
┌─────────────────────────┐
│ serve_ocr.py │ 加载 baidu/Unlimited-OCR 模型
│ (HTTP API :10000) │ 常驻显存,单卡串行推理
└─────────────────────────┘两层架构:serve_ocr.py 负责加载模型并暴露 HTTP API;ocr_mcp_server.py 把它包装成 MCP 工具。这样模型只加载一次,Claude Code 重启无需重新加载。
📋 环境要求
项目 | 要求 |
GPU | NVIDIA GPU,建议 ≥ 8GB 显存(bfloat16) |
CUDA | 与 PyTorch 版本匹配 |
Python | 3.10+ |
磁盘 | 模型权重约 6.3GB(首次下载) |
操作系统 | Windows / Linux / macOS(macOS 需 CPU 推理,较慢) |
🚀 快速开始
第一步:克隆项目
git clone <your-repo-url> uocr-workspace
cd uocr-workspace第二步:创建 Python 环境
conda create -n uocr python=3.10 -y
conda activate uocr
# 安装 PyTorch(按你的 CUDA 版本选,参考 https://pytorch.org)
# 例如 CUDA 12.1:
pip install torch --index-url https://download.pytorch.org/whl/cu121
# 安装项目依赖
pip install -r requirements.txt第三步:启动 OCR 服务(关键,必做)
# 首次需设 HuggingFace 镜像(国内用户)
# PowerShell:
$env:HF_ENDPOINT = "https://hf-mirror.com"
# bash:
export HF_ENDPOINT=https://hf-mirror.com
# 启动(首次会下载模型,约 6.3GB)
python serve_ocr.py看到类似输出即成功:
[启动] 正在加载模型(首次会从 HuggingFace 下载,需设 HF_ENDPOINT 镜像)...
[启动] 模型加载完成,耗时 120.5s | GPU: NVIDIA GeForce RTX 4090
INFO: Uvicorn running on http://127.0.0.1:10000⚠️ 这一步是 MCP 能用的前提。
serve_ocr.py必须保持运行,Claude Code 才能调用 OCR。建议把它放在单独的终端窗口里常驻。
验证服务在线:
curl http://127.0.0.1:10000/v1/models第四步:在 Claude Code 中接入
进入项目目录,启动 Claude Code:
claude项目根目录已经配置好 .mcp.json 和 .claude/skills/uocr/SKILL.md,Claude Code 会自动加载。首次会询问是否信任项目级 MCP 配置,选 Yes。
输入 /mcp 确认 uocr 已连接,能看到两个工具:
mcp__uocr__ocr_imagemcp__uocr__ocr_multi
第五步:使用
直接对 Claude Code 说:
识别 docs/2.png或:
/uocr 识别 docs/2.png,告诉我内容Claude 会自动按 Skill 流程调用 OCR,整理结果后返回。
📁 项目结构
uocr-workspace/
├── serve_ocr.py # 模型服务(HTTP API,必须先启动)
├── ocr_mcp_server.py # MCP Server(包装 HTTP API)
├── requirements.txt # Python 依赖
├── run_ocr.py # 命令行推理脚本(可选,脱离 MCP 单独跑)
├── probe_infer.py # 推理调试脚本
├── test_api.py # HTTP API 测试
│
├── .mcp.json # Claude Code 项目级 MCP 配置
├── .claude/
│ └── skills/uocr/SKILL.md # OCR 使用规则 Skill
│
├── inputs/ # 放待识别的图片(已 gitignore 大 PDF)
└── outputs/ # 识别结果输出(gitignore)🔧 配置
修改服务端口
serve_ocr.py 默认监听 127.0.0.1:10000。如需修改:
改
serve_ocr.py顶部的PORT = 10000同步改
ocr_mcp_server.py顶部的SERVER_URL = "http://127.0.0.1:10000"
全局可用(跨项目)
默认 .mcp.json 是项目级配置。如想让所有项目都能用:
claude mcp add -s user uocr \
"<你的 conda 环境路径>/python.exe" \
"<项目绝对路径>/ocr_mcp_server.py"并把 .claude/skills/uocr/ 复制到 ~/.claude/skills/uocr/。
❓ 常见问题
设镜像:export HF_ENDPOINT=https://hf-mirror.com(国内推荐)。
确保用 bfloat16 加载(默认已开启)
关闭其他占显存的程序
单张图不要超过 4K 分辨率
完全兼容。只要客户端支持 MCP,把 .mcp.json 里的配置复制到对应客户端的 MCP 配置即可。
python run_ocr.py --mode single -i inputs/1.jpg -o outputs
python run_ocr.py --mode pdf -i doc.pdf -o outputs --dpi 300🙏 致谢
百度 Unlimited-OCR —— 强大的多语言 OCR 基础模型
Model Context Protocol —— Anthropic 的 MCP 协议
Claude Code —— Anthropic 的官方 CLI
📄 License
MIT — 见 LICENSE
English version: README.en.md
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Flicense-qualityDmaintenanceAn MCP server that enables Claude to perform OCR on local files using Mistral AI's document processing capabilities. It converts documents and images into markdown format for seamless analysis and interaction.Last updated
- FlicenseAqualityDmaintenanceExtracts text content from PDFs and images using Mistral's OCR API, enabling OCR capabilities in MCP-compatible clients like Cursor and Claude Desktop.Last updated18
- Alicense-qualityDmaintenanceBridges Claude Code to local OpenAI-compatible vision models, enabling image analysis, comparison, and OCR via three tools.Last updated2MIT

paragonos-misc-toolsofficial
Flicense-qualityDmaintenanceA collection of miscellaneous tools for Claude, Cursor, and MCP-compatible clients. Includes OCR (Optical Character Recognition) capabilities leveraging the Google Gemini API.Last updated
Related MCP Connectors
OCR, transcription, file extraction, and image generation for AI agents via MCP.
OCR.space MCP — wraps the OCR.space API (ocr.space) for image/PDF → text OCR.
Augments MCP Server - A comprehensive framework documentation provider for Claude Code
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/tinygone/unlimited-ocr-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
