Image Analysis (GPT-4 Vision) MCP server

Enables image analysis using GPT-4-turbo's vision capabilities for extracting information, generating descriptions, and answering questions about visual content
Back to servers
Provider
champierre
Release date
Mar 25, 2025
Language
TypeScript
Stats
5 stars

This server analyzes images by receiving URLs or local file paths and processing them with the GPT-4o-mini model. It provides detailed descriptions and content analysis of images through a simple interface that can be integrated with Claude Desktop App or similar tools.

Installation Options

Via Smithery (Automated)

The easiest way to install the Image Analysis Server for Claude Desktop is through Smithery:

npx -y @smithery/cli install @champierre/image-mcp-server --client claude

Manual Installation

If you prefer to install manually:

# Clone the repository
git clone https://github.com/champierre/image-mcp-server.git
cd image-mcp-server

# Install dependencies
npm install

# Compile TypeScript
npm run build

Configuration

API Key Setup

The server requires an OpenAI API key to function:

OPENAI_API_KEY=your_openai_api_key

MCP Server Configuration

For Cline

Add these settings to your cline_mcp_settings.json:

{
  "mcpServers": {
    "image-analysis": {
      "command": "node",
      "args": ["/path/to/image-mcp-server/dist/index.js"],
      "env": {
        "OPENAI_API_KEY": "your_openai_api_key"
      }
    }
  }
}

For Claude Desktop App

Add these settings to your claude_desktop_config.json:

{
  "mcpServers": {
    "image-analysis": {
      "command": "node",
      "args": ["/path/to/image-mcp-server/dist/index.js"],
      "env": {
        "OPENAI_API_KEY": "your_openai_api_key"
      }
    }
  }
}

Usage

After configuration, two tools become available:

  • analyze_image: Processes images from URLs
  • analyze_image_from_path: Processes images from local file paths

Example Commands

To analyze an image from a URL:

Please analyze this image URL: https://example.com/image.jpg

To analyze an image from a local file:

Please analyze this image: /path/to/your/image.jpg

Working with Local File Paths

When using the analyze_image_from_path tool, you must provide a valid file path in the environment where the server is running:

  • If running on WSL:

    • Windows paths (C:...) must be converted to WSL paths (/mnt/c/...)
    • WSL paths can be used directly
  • If running on Windows:

    • WSL paths (/home/user/...) must be converted to UNC paths (\wsl$\Distro...)
    • Windows paths can be used directly

The AI assistant or execution environment is responsible for path conversion. The server interprets the received path as provided.

How to add this MCP server to Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "cursor-rules-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "cursor-rules-mcp"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later