-
MCP Server Layer (TypeScript)
- Handles MCP protocol communication
- Manages tool interfaces
- Processes requests/responses
-
Python Backend
- Moondream model server
- Image analysis processing
- HTTP API endpoints (port 3475)
- UV Package Manager
- Node.js (v18+)
- Python 3.8+
- Moondream Python package
- MCP SDK
- Node.js v18 or higher
- Python 3.8+
- UV package manager
- Sufficient disk space (~1GB for model and environments)
- UV installation (automatic)
- Python virtual environment (managed by UV)
- Moondream package installation
- Model download (~500MB)
Configuration in ~/Library/Application Support/Claude/claude_desktop_config.json
:
{
"mcpServers": {
"moondream": {
"command": "node",
"args": ["/path/to/moondream-server/build/index.js"]
}
}
}
Configuration in ~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
:
{
"mcpServers": {
"moondream": {
"command": "node",
"args": ["/path/to/moondream-server/build/index.js"]
}
}
}
- Purpose: Image analysis using Moondream model
- Capabilities:
- Image captioning
- Object detection
- Visual question answering
- Input Schema:
{ image_path: string, // Path to image file prompt: string // Analysis command }
-
Main Server (index.ts)
- MCP protocol handling
- Tool registration
- Request routing
-
Python Setup (python-setup.ts)
- UV installation
- Virtual environment management
- Model download and setup
- Moondream server process management
- Name: moondream-0_5b-int4.mf.gz
- Size: ~500MB
- Type: 8-bit quantized
- Source: Hugging Face
- Location: models/ directory
- Base URL: http://127.0.0.1:3475
- Endpoints:
- /caption - Image captioning
- /detect - Object detection
- /query - Visual Q&A
-
Model Download
- Check network connectivity
- Verify Hugging Face accessibility
- Ensure sufficient disk space
-
Server Startup
- Port 3475 conflicts
- Python environment issues
- Model file accessibility
-
UV Setup
- Installation verification
- Path configuration
- Permission issues
-
Model Loading
- First request may be slower
- Subsequent requests benefit from caching
- Memory usage peaks during analysis
-
Concurrent Requests
- Server handles multiple requests
- Resource intensive operations
- Monitor memory usage
-
Model Options
- Support for larger models
- Alternative model architectures
- Custom model integration
-
Performance
- Response time optimization
- Memory usage improvements
- Caching strategies
-
Features
- Batch processing
- Image preprocessing options
- Additional analysis modes
- Add support for larger models
- Implement batch processing
- Optimize memory usage
- Add error recovery mechanisms
- Improve documentation