Home / MCP / Image Description MCP Server

Image Description MCP Server

Provides AI-powered image analysis for web URLs and local files using Grok’s vision capabilities, including descriptions, metadata, and OCR.

python
Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
    "mcpServers": {
        "image_description": {
            "command": "python",
            "args": [
                "image-description-mcp_server.py"
            ],
            "env": {
                "GROK_API_KEY": "YOUR_API_KEY"
            }
        }
    }
}

You have an MCP server that analyzes images using Grok’s advanced vision capabilities. It accepts both web-hosted images and local files, returning AI-generated descriptions, extracted metadata, and OCR results in an accessible, secure way for your AI assistants to reason about visual content.

How to use

You interact with this MCP server through an MCP client by issuing tool calls corresponding to the available image analysis actions. Use the following patterns to describe images, whether they come from a public URL or your local filesystem.

Available tools let you do three main things: describe an image from a URL, describe a local image file, and extract text from an image via OCR. You can chain these capabilities in your workflows to build richer visual analysis for complex prompts.

Typical usage patterns include asking for a description of a web image, analyzing a local image you provide, or performing OCR to read text inside a picture. For example, you can request a detailed analysis of a photo hosted online, or provide a path to a local image and receive both the description and any technical metadata that helps you understand the image.

How to install

Prerequisites you need before running the server include a Python environment and access to Grok via an API key. You also need to ensure you can run Python scripts in your environment.

1) Prepare your runtime and API key

- Install Python 3.x on your system.

- Obtain your Grok API key from your Grok account.

2) Set the Grok API key in your environment

export GROK_API_KEY="your-grok-api-key"

Run the server locally

Start the MCP server that runs the image analysis tools using your Python interpreter and the script provided for image processing.

python image-description-mcp_server.py

Test the server locally (optional)

You can verify the MCP protocol interface by running a simple test command that invokes the server with a minimal request.

echo '{"jsonrpc":"2.0","method":"tools/list","id":1}' | python image-description-mcp_server.py

Available tools

describe_image_url

Analyze a web-hosted image URL and return an AI-generated description, visual details, and contextual inferences.

describe_image_file

Analyze a local image file path and return an AI-generated description along with any detected attributes and metadata.

extract_text_from_image

Perform OCR on an image to extract readable text and present it in a structured format.