MCP server for image understanding using Alibaba Cloud's Qwen3-VL-Plus model
Project description
Image MCP Server
A Model Context Protocol (MCP) server for image understanding using Alibaba Cloud's Qwen3-VL-Plus model.
🚀 Quick Start
Installation
Option 1: Using uvx (Recommended)
uvx image-mcp-server
Option 2: Using pip
pip install image-mcp-server
Option 3: Using uv
uv pip install image-mcp-server
🔧 MCP Configuration
Claude Desktop Configuration
-
Locate your Claude Desktop config file:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json - Linux:
~/.config/claude/claude_desktop_config.json
- macOS:
-
Add the MCP server configuration:
{
"mcpServers": {
"image-mcp-server": {
"command": "uvx",
"args": ["image-mcp-server@latest"],
"env": {
"IMAGE_MCP_DASHSCOPE_API_KEY": "your-dashscope-api-key-here"
}
}
}
}
Configuration Notes:
- Replace
your-dashscope-api-key-herewith your actual DashScope API key - Using
@latestensures you always get the newest version - The server will automatically download and run when first used by Claude
- Restart Claude Desktop to load the new configuration.
API Key Setup
- Visit Alibaba Cloud DashScope Console
- Sign up or log in to your account
- Navigate to API Keys section
- Create a new API key
- Copy the key for use in your MCP configuration
🎯 Usage Examples
Once configured, you can use the image analysis capabilities directly in Claude:
Basic Image Analysis
Please analyze this image: [upload image]
Detailed Analysis Request
Describe this image in detail, including the main objects, colors, and overall scene. Also provide confidence scores for your observations.
Technical Analysis
What type of objects are visible in this image? Please provide a list with confidence scores.
URL-based Analysis
Please analyze the image at this URL: https://example.com/image.jpg
📋 Features
- Multi-format Support: JPEG, PNG, GIF, WebP
- Dual Input Methods: Direct upload or URL-based analysis
- Confidence Scoring: Provides confidence levels and scores for detected objects
- Structured Output: JSON-formatted analysis results
- Environment Configuration: Secure API key management
- Automatic Updates: Using
@latestensures latest features
🔧 Configuration Options
The server supports various configuration options via environment variables:
| Environment Variable | Default | Description |
|---|---|---|
IMAGE_MCP_DASHSCOPE_API_KEY |
Required | Your DashScope API key |
IMAGE_MCP_DASHSCOPE_BASE_URL |
https://dashscope.aliyuncs.com/compatible-mode/v1 |
API endpoint URL |
IMAGE_MCP_MODEL_NAME |
qwen3-vl-plus |
Model to use for analysis |
IMAGE_MCP_MAX_IMAGE_SIZE_MB |
10 |
Maximum image size in MB |
IMAGE_MCP_REQUEST_TIMEOUT |
30 |
Request timeout in seconds |
IMAGE_MCP_MAX_RETRIES |
3 |
Maximum retry attempts |
IMAGE_MCP_LOG_LEVEL |
INFO |
Logging level (DEBUG, INFO, WARNING, ERROR, CRITICAL) |
IMAGE_MCP_ENABLE_DEBUG |
false |
Enable debug logging |
🛠️ Development
Setup Development Environment
# Clone the repository
git clone https://github.com/your-repo/image-mcp-server.git
cd image-mcp-server
# Install in development mode
uv pip install -e .
# Run tests
pytest
# Run tests with coverage
pytest --cov=image_mcp
# Lint code
ruff check .
# Format code
black .
isort .
Build Package
# Build for distribution
python -m build
# Upload to PyPI (requires credentials)
twine upload dist/*
📚 API Documentation
MCP Tools
The server provides the following MCP tools:
analyze_image
Analyzes an image and returns detailed information about its contents.
Parameters:
image_data(optional): Base64-encoded image dataimage_url(optional): URL to an image fileprompt(optional): Custom prompt for analysis
Example:
{
"image_url": "https://example.com/image.jpg",
"prompt": "Describe what you see in this image"
}
🤝 Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
🆘 Support
- Documentation: Full Documentation
- Issues: GitHub Issues
- Discussions: GitHub Discussions
🔗 Related Links
Happy image analyzing! 🚀
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file image_mcp_server-0.1.4.tar.gz.
File metadata
- Download URL: image_mcp_server-0.1.4.tar.gz
- Upload date:
- Size: 105.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6d3180dfc1e29ed10f4d422aaddc48210bfa4a583db8eafc5d1c8a4e51012b10
|
|
| MD5 |
4151b2ad75bca015630eeb4d49fa79ae
|
|
| BLAKE2b-256 |
ef1bbcef49ecfe84ad1296f47a11b8c8274be42da42544b5e4867b99e3caa20d
|
File details
Details for the file image_mcp_server-0.1.4-py3-none-any.whl.
File metadata
- Download URL: image_mcp_server-0.1.4-py3-none-any.whl
- Upload date:
- Size: 27.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2ef301f166d2804d21d36966adc4233c23fccf0b60638300dbec7c9c8f606645
|
|
| MD5 |
77ee38ecf4a063d9211308e1d26f4611
|
|
| BLAKE2b-256 |
5d1dd18104cc887a2e9b15242eba4831d2acba33d63b743aa6ae3fd8f14da2a4
|