AI

akirose/image-recognition-mcp

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

6 stars 4 forks 质量 62 趋势 14MIT

A Model Context Protocol (MCP) server that provides AI-powered image recognition and description capabilities using OpenAI-compatible vision models.

概览

A Model Context Protocol (MCP) server that provides AI-powered image recognition and description capabilities using OpenAI-compatible vision models. This MCP server enables AI assistants to analyze and describe images through a simple URL-based interface. It supports OpenAI's vision models as well as OpenAI-compatible local models (such as LM Studio, Ollama, etc.), providing detailed descriptions of images and making it easy to integrate image analysis capabilities into your AI workflows. - : Analyze images from URLs and get detailed descriptions - : Works with OpenAI's vision models and OpenAI-compatible local models (LM Studio, Ollama, etc.) - : Fully compatible with the Model Context Protocol standard - : Built with TypeScript for type safety and better development experience - : Easy-to-use interface for image description requests - Node.js 18+ - npm or yarn - OpenAI API key or local vision model server (e.g.

README

以下为原文 README 节选,完整内容请查看原文。

Image Recognition MCP Server

A Model Context Protocol (MCP) server that provides AI-powered image recognition and description capabilities using OpenAI-compatible vision models.

Overview

This MCP server enables AI assistants to analyze and describe images through a simple URL-based interface. It supports OpenAI’s vision models as well as OpenAI-compatible local models (such as LM Studio, Ollama, etc.), providing detailed descriptions of images and making it easy to integrate image analysis capabilities into your AI workflows.

Features

  • Image Analysis: Analyze images from URLs and get detailed descriptions
  • Flexible Model Support: Works with OpenAI’s vision models and OpenAI-compatible local models (LM Studio, Ollama, etc.)
  • MCP Protocol: Fully compatible with the Model Context Protocol standard
  • TypeScript: Built with TypeScript for type safety and better development experience
  • Simple API: Easy-to-use interface for image description requests

Installation

Prerequisites

  • Node.js 18+
  • npm or yarn
  • OpenAI API key or local vision model server (e.g., LM Studio, Ollama)

MCP Client Configuration

To use this server with an MCP client, add the following configuration:

{
  "mcpServers": {
    "image-recognition": {
      "command": "npx",
      "args": ["-y", "@akirose/image-recognition-mcp"],
      "env": {
        "OPENAI_API_KEY": "your-actual-openai-api-key-here"
      }
    }
  }
}

To allow access to image files from any path, set ALLOW_ALL_PATHS to true:

{
  "mcpServers": {
    "image-recognition": {
      "command": "npx",
      "args": ["-y", "@akirose/image-recognition-mcp"],
      "env": {
        "OPENAI_API_KEY": "your-actual-openai-api-key-here",
        "ALLOW_ALL_PATHS": "true"
      }
    }
  }
}

⚠️ IMPORTANT: The env section with your API key is required - this is the only way the MCP server can function. For local models, you can use any placeholder value for OPENAI_API_KEY and configure OPENAI_BASE_URL to point to your local server.

Environment Variables

The server supports the following environment variables:

  • OPENAI_API_KEY - Your OpenAI API key, or any placeholder value when using local models (required)
  • OPENAI_BASE_URL - Base URL for OpenAI API or OpenAI-compatible API servers (optional, defaults to OpenAI’s official API)
    • Example for LM Studio: "http://127.0.0.1:1234/v1"
    • Example for Ollama: "http://localhost:11434/v1"
  • OPENAI_MODEL - The vision model to use for image recognition (optional, defaults to “gpt-5-mini”)
    • For OpenAI: "gpt-5-mini", "gpt-4o", "gpt-4o-mini", etc.
    • For local models: "llava", "qwen/qwen3-vl-4b", or any locally available vision model
  • ALLOWED_IMAGE_PATHS - Comma-separated list of allowed local file paths (optional, defaults to “./images,./assets”)
    • Example: "./images,./assets,./downloads"
在 GitHub 查看完整 README

安装

npx -y @akirose/image-recognition-mcp
新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "image-recognition": { "command": "npx", "args": ["-y", "@akirose/image-recognition-mcp"], "env": { "OPENAI_API_KEY": "your-actual-openai-api-key-here" } } } }