MCP Image Recognition Server
The MCP Image Recognition Server allows you to analyze images using various AI vision models with these capabilities:
Describe images from base64-encoded data, local file paths, or public URLs
Support multiple image formats including JPEG, PNG, GIF, WebP
Choose between AI providers: Anthropic, OpenAI, and Cloudflare Workers AI with configurable primary and fallback options
Optional Tesseract OCR integration for text extraction from images
Customizable prompts to guide the image description process
Flexible deployment options: local, Docker, or via uvx/pip installation
Integration with MCP-compatible clients like Claude Desktop and Cursor
Hosts the MCP server repository, allowing users to clone the codebase for local deployment and configuration
Utilizes OpenAI GPT-4 Vision API for image analysis and detailed descriptions from both base64-encoded images and image files
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., "@MCP Image Recognition Serverdescribe this screenshot of my dashboard"
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.
MCP Image Recognition Server
An MCP server that provides image recognition capabilities using Anthropic and OpenAI vision APIs. Version 0.1.2.
Features
Image description using Anthropic Claude Vision or OpenAI GPT-4 Vision
Support for multiple image formats (JPEG, PNG, GIF, WebP)
Configurable primary and fallback providers
Base64 and file-based image input support
Optional text extraction using Tesseract OCR
Related MCP server: Image Parse MCP
Requirements
Python 3.8 or higher
Tesseract OCR (optional) - Required for text extraction feature
Windows: Download and install from UB-Mannheim/tesseract
Linux:
sudo apt-get install tesseract-ocrmacOS:
brew install tesseract
Installation
Clone the repository:
git clone https://github.com/mario-andreschak/mcp-image-recognition.git
cd mcp-image-recognitionCreate and configure your environment file:
cp .env.example .env
# Edit .env with your API keys and preferencesBuild the project:
build.batUsage
Running the Server
Spawn the server using python:
python -m image_recognition_server.serverStart the server using batch instead:
run.bat serverStart the server in development mode with the MCP Inspector:
run.bat debugAvailable Tools
describe_imageInput: Base64-encoded image data and MIME type
Output: Detailed description of the image
describe_image_from_fileInput: Path to an image file
Output: Detailed description of the image
Environment Configuration
ANTHROPIC_API_KEY: Your Anthropic API key.OPENAI_API_KEY: Your OpenAI API key.VISION_PROVIDER: Primary vision provider (anthropicoropenai).FALLBACK_PROVIDER: Optional fallback provider.LOG_LEVEL: Logging level (DEBUG, INFO, WARNING, ERROR).ENABLE_OCR: Enable Tesseract OCR text extraction (trueorfalse).TESSERACT_CMD: Optional custom path to Tesseract executable.OPENAI_MODEL: OpenAI Model (default:gpt-4o-mini). Can use OpenRouter format for other models (e.g.,anthropic/claude-3.5-sonnet:beta).OPENAI_BASE_URL: Optional custom base URL for the OpenAI API. Set tohttps://openrouter.ai/api/v1for OpenRouter.OPENAI_TIMEOUT: Optional custom timeout (in seconds) for the OpenAI API.
Using OpenRouter
OpenRouter allows you to access various models using the OpenAI API format. To use OpenRouter, follow these steps:
Obtain an OpenAI API key from OpenRouter.
Set
OPENAI_API_KEYin your.envfile to your OpenRouter API key.Set
OPENAI_BASE_URLtohttps://openrouter.ai/api/v1.Set
OPENAI_MODELto the desired model using the OpenRouter format (e.g.,anthropic/claude-3.5-sonnet:beta).Set
VISION_PROVIDERtoopenai.
Default Models
Anthropic:
claude-3.5-sonnet-betaOpenAI:
gpt-4o-miniOpenRouter: Use the
anthropic/claude-3.5-sonnet:betaformat inOPENAI_MODEL.
Development
Running Tests
Run all tests:
run.bat testRun specific test suite:
run.bat test server
run.bat test anthropic
run.bat test openaiDocker Support
Build the Docker image:
docker build -t mcp-image-recognition .Run the container:
docker run -it --env-file .env mcp-image-recognitionLicense
MIT License - see LICENSE file for details.
Release History
0.1.2 (2025-02-20): Improved OCR error handling and added comprehensive test coverage for OCR functionality
0.1.1 (2025-02-19): Added Tesseract OCR support for text extraction from images (optional feature)
0.1.0 (2025-02-19): Initial release with Anthropic and OpenAI vision support
Available Tools
3 toolsdescribe_imageA
Describe an image from base64-encoded data. Use for images directly uploaded to chat.
Best for: Images uploaded to the current conversation where no public URL exists.
Not for: Local files on your computer or images with public URLs.
Args:
image: Base64-encoded image data
prompt: Optional prompt to guide the description
Returns:
str: Detailed description of the image
| Name | Required | Description | Default |
|---|---|---|---|
| image | Yes | ||
| prompt | No | Please describe this image in detail. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden. It effectively communicates the tool's behavior: it describes images, requires base64-encoded data, accepts an optional prompt for guidance, and returns a detailed description. However, it doesn't mention potential limitations like image size constraints, processing time, or error conditions.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is well-structured and front-loaded with the core purpose, followed by usage guidelines and parameter explanations. Every sentence adds value without redundancy, making it efficient and easy to parse.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a tool with 2 parameters, no annotations, and no output schema, the description provides strong coverage of purpose, usage, and parameter semantics. It could be more complete by mentioning return format details or potential errors, but it adequately supports tool selection and invocation given the context.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The description adds meaningful context beyond the schema's 0% coverage. It explains that 'image' expects 'Base64-encoded image data' and 'prompt' is 'Optional prompt to guide the description', clarifying the purpose of each parameter. The schema only provides titles and types without this semantic information.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the specific action ('Describe an image') and resource ('from base64-encoded data'), distinguishing it from sibling tools that handle files or URLs. It explicitly mentions the use case for 'images directly uploaded to chat'.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides explicit guidance on when to use ('Best for: Images uploaded to the current conversation where no public URL exists') and when not to use ('Not for: Local files on your computer or images with public URLs'), with clear alternatives implied through sibling tool names.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
describe_image_from_fileA
Describe an image from a local file path. Requires proper file system access.
Best for: Local files when the server has filesystem access to the path.
Limitations: When using Docker, requires volume mapping (-v flag) to access host files.
Not recommended for: Images uploaded to chat or images with public URLs.
Args:
filepath: Absolute path to the image file
prompt: Optional prompt to guide the description
Returns:
str: Detailed description of the image
| Name | Required | Description | Default |
|---|---|---|---|
| filepath | Yes | ||
| prompt | No | Please describe this image in detail. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively describes key behavioral traits: it requires proper file system access, mentions Docker-specific constraints (volume mapping), and notes the optional prompt parameter. However, it lacks details on error handling, rate limits, or authentication needs, leaving some gaps.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is well-structured and front-loaded with the core purpose, followed by usage guidelines and parameter details. Every sentence adds value, with no redundant information, making it efficient and easy to parse for an AI agent.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's moderate complexity (2 parameters, no output schema, no annotations), the description is largely complete. It covers purpose, usage, parameters, and behavioral constraints. However, it lacks details on the return value format beyond 'Detailed description of the image', and does not mention potential errors or side effects, leaving minor gaps.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must compensate. It adds meaningful semantics beyond the schema by explaining that 'filepath' is an 'Absolute path to the image file' and 'prompt' is an 'Optional prompt to guide the description', which clarifies usage and constraints not evident from the schema alone. It covers both parameters adequately.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the specific action ('Describe an image') and resource ('from a local file path'), distinguishing it from sibling tools like describe_image and describe_image_from_url by specifying the local file source. It provides a verb+resource combination that is precise and differentiated.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explicitly provides usage guidelines with 'Best for:', 'Limitations:', and 'Not recommended for:' sections, clearly indicating when to use this tool (local files with filesystem access) versus alternatives (images uploaded to chat or with public URLs). It offers direct comparison to sibling tools by context.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
describe_image_from_urlA
Describe an image from a public URL. Most reliable method for web images.
Best for: Images with public URLs accessible from the internet.
Advantages: Works regardless of server deployment method (local/Docker).
Not for: Local files or images already uploaded to the current conversation.
Args:
url: Direct URL to the image (must be publicly accessible)
prompt: Optional prompt to guide the description
Returns:
str: Detailed description of the image
| Name | Required | Description | Default |
|---|---|---|---|
| prompt | No | Please describe this image in detail. | |
| url | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively communicates key traits: the tool requires publicly accessible URLs, works reliably for web images, and handles deployment-agnostic access. However, it lacks details on rate limits, error handling, or authentication needs, which would elevate the score further.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is well-structured with clear sections (overview, usage guidelines, arguments, returns) and front-loaded key information. Every sentence adds value, such as distinguishing use cases and explaining parameters, with no redundant or verbose content.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's moderate complexity (2 parameters, no output schema, no annotations), the description is largely complete, covering purpose, usage, parameters, and return type. However, it could be enhanced with more behavioral details like response format or error cases, though the absence of an output schema makes this less critical.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The description adds significant meaning beyond the input schema, which has 0% description coverage. It clarifies that 'url' must be a 'Direct URL to the image (must be publicly accessible)' and 'prompt' is 'Optional prompt to guide the description', providing essential context not present in the schema's bare property definitions.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the specific action ('Describe an image') and resource ('from a public URL'), distinguishing it from sibling tools that handle local files or already-uploaded images. It explicitly contrasts with 'describe_image' and 'describe_image_from_file' by specifying the input source.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides explicit guidance on when to use this tool ('Best for: Images with public URLs accessible from the internet') and when not to use it ('Not for: Local files or images already uploaded to the current conversation'). It also mentions advantages ('Works regardless of server deployment method') and implicitly references alternatives through sibling tool names.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
TDQS
Each tool has a clearly distinct purpose based on the image source: base64-encoded data, local file path, or public URL. The descriptions explicitly state what each tool is 'best for' and 'not for,' eliminating any ambiguity about when to use which tool.
All tool names follow a consistent verb_noun_from_source pattern (describe_image, describe_image_from_file, describe_image_from_url). This predictable naming makes it easy for an agent to understand the relationship between the tools and their specific use cases.
With 3 tools, this server is well-scoped for its purpose of image recognition across different input methods. Each tool earns its place by covering a distinct scenario (uploaded images, local files, web URLs), making the set complete without being bloated.
The tool surface comprehensively covers all common ways to provide an image for description: base64 data, local files, and public URLs. There are no obvious gaps, as these three methods handle most practical use cases an agent would encounter in image recognition tasks.
Maintenance
Related MCP Connectors
OCR, transcription, file extraction, and image generation for AI agents via MCP.
OCR and document understanding: extract text from images, then summarize or translate it.
Video, audio, and image processing for AI agents: convert, transcribe, upscale - 150+ operations.
Use AI models for chat, image, and video generation from Claude Code and other MCP hosts.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables image analysis and understanding using Vision Language Models through OpenAI-compatible APIs. Supports analyzing images from URLs or local files with custom prompts.12MIT
- AlicenseAqualityCmaintenanceEnables image analysis using any OpenAI-compatible vision API, supporting URLs, local files, or base64 input with custom prompts.1MIT
- FlicenseNot gradedqualityCmaintenanceEnables image recognition using vision models via OpenAI-compatible APIs, supporting multiple platforms like OpenAI, DeepSeek, and Ollama.
- AlicenseAqualityBmaintenanceEnables image analysis, OCR, and text-to-image generation through OpenAI-compatible APIs. Supports local paths, URLs, or base64 images with configurable models and backup endpoints.355MIT
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/mario-andreschak/mcp-image-recognition'
If you have feedback or need assistance with the MCP directory API, please join our Discord server