npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@vinhnguyen/glm-ocr-mcp

v3.0.0

Published

MCP server for GLM-OCR - local OCR capabilities via Ollama

Readme

GLM-OCR MCP Server

A Model Context Protocol (MCP) server that provides local OCR capabilities using the GLM-OCR model via Ollama. This server enables AI assistants (like Claude Desktop or VS Code with Continue) to extract text, tables, and mathematical formulas from images locally.

🌟 Features

  • 📝 Text Extraction: Convert images into clean Markdown text.
  • 📊 Table Recovery: Preserve complex table structures in Markdown format.
  • 🧮 Math Support: Automatically convert mathematical formulas to LaTeX.
  • 🖼️ Broad Support: Works with PNG, JPG, and other standard image formats.
  • 🔧 Privacy-Focused: Local processing via Ollama (no cloud dependencies).

📋 Prerequisites

  1. Node.js (v18 or higher)
  2. Ollama installed and running
  3. The GLM-OCR model pulled in Ollama:
ollama pull glm-ocr

🚀 Quick Start (via npx)

You can run this server directly without cloning the repository by using npx.

⚙️ Configuration

Claude Desktop

Add the following to your Claude Desktop configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "glm-ocr": {
      "command": "npx",
      "args": ["-y", "@vinhnguyen/glm-ocr-mcp"],
      "env": {}
    }
  }
}

Continue.dev (VS Code / JetBrains)

Add this to your config.json (usually found at ~/.continue/config.json or ~/.continue/config.yaml):

{
  "mcpServers": {
    "glm-ocr": {
      "command": "npx",
      "args": ["-y", "@vinhnguyen/glm-ocr-mcp"],
      "env": {},
      "description": "GLM-OCR document processing via Ollama",
      "timeout": 120
    }
  }
}

🛠️ Usage

Once configured and Ollama is running, your AI assistant will have a new tool called ocr_document. You can use natural language to trigger it:

  • "Extract the text from this screenshot: /path/to/image.png"
  • "Read the table in /Users/me/Downloads/invoice.jpg and format it as markdown."
  • "What is the math formula in this image? /path/to/notes.png"

How It Works

  1. The assistant sends a local image path to the server.
  2. The server validates the file and converts it to base64.
  3. It communicates with your local Ollama instance using the glm-ocr model.
  4. The extracted content is returned directly into your chat.

📂 Manual Installation (For Development)

If you want to modify the server or run it from source:

  1. Clone the repository:
    git clone https://github.com/vinhnguyen/glm-ocr-mcp.git
    cd glm-ocr-mcp
  2. Install dependencies:
    npm install
  3. Run locally for testing:
    npm start

❓ Troubleshooting

Error: "Ollama connection refused"

Ensure Ollama is running in your system tray or run ollama serve in a terminal.

Error: "model 'glm-ocr' not found"

Run ollama pull glm-ocr to download the specific OCR model.

Timeout Issues

OCR processing is GPU/CPU intensive. If the process times out, ensure your configuration has a timeout value of at least 120 seconds.

📄 License

ISC

✨ Acknowledgments


⚠️ Note for Publishing

If this is your first time publishing this scoped package to NPM, remember to use the public access flag:

npm publish --access public