Get the FREE Ultimate OpenClaw Setup Guide →

Multi-Source-Media

An MCP Tool Implementation for Multi-Source Image Access & Generation

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio decade-qiu-multi-source-media-mcp-server docker run -i m3s-server:latest \
  --env CONFIG_PATH="configs/config.yaml"

How to use

Multi-Source Media MCP Server (M3S) provides a unified interface for LLMs to access and manipulate media from multiple sources. It supports multi-source image and video retrieval from platforms like Unsplash and Pexels, along with AI-powered generation capabilities such as text-to-image and image-to-image workflows. The server also includes a web crawling tool to asynchronously fetch media content from web pages and an extensible architecture to integrate new media sources or AI backends as your needs evolve. To use M3S, configure its MCP server entry in your config (the default config path is configs/config.yaml) and start the server. The server exposes endpoints that your LLM or downstream tooling can call to fetch media, generate new media, or process existing media across multiple sources.

Key capabilities you can leverage:

  • Multi-Source Access: Retrieve images from Unsplash, Pexels, and other configured sources through a single API surface.
  • AI-Backed Generation: Use integrated tools for text-to-image and image-to-image generation using supported backends.
  • Web Content Crawling: Ingest media by crawling web pages asynchronously to harvest media assets.
  • Extensibility: Add new media sources or AI backends by updating configuration and adding tool integrations.

Usage typically involves configuring the server, starting it, and then issuing requests to the MCP endpoints to fetch, generate, or transform media across your configured sources.

How to install

Prerequisites:

  • Docker (recommended for running the prebuilt image) or Go toolchain if building locally
  • Docker daemon running, or a Go environment if you plan to build from source

Option A: Run with Docker (recommended)

  1. Pull and run the prebuilt image:
docker pull m3s-server:latest
docker run -i -p 8080:8080 -v /path/to/configs:/configs -e CONFIG_PATH=/configs/config.yaml m3s-server:latest
  1. Ensure your config file is available at the path specified by CONFIG_PATH (default: configs/config.yaml).

Option B: Build from source (Go)

  1. Ensure Go is installed (Go 1.20+ recommended).
  2. Clone the repository and navigate to the project root.
  3. Build the server:
go build -o m3s-server ./cmd/server
  1. Run the server (default config path):
./m3s-server
  1. To specify a different config, use:
./m3s-server --config=path/to/your/config.yaml

Notes:

  • If you’re using Docker, ensure the config path is mounted correctly into the container and exposed to the server at startup.
  • The default config file is configs/config.yaml; you can customize it to point to your data sources and tools.

Additional notes

Tips and common issues:

  • Validate your config.yaml for proper endpoints and authentication requirements of each media source.
  • When adding new media sources, ensure you have API keys or access tokens configured in the environment or config file.
  • If the server fails to start, check the logs for missing dependencies or port collisions. Ensure the configured port (default 8080) is not in use.
  • For large media crawls, consider enabling batch processing and rate-limit controls to avoid overloading sources.
  • Environment variables can be used to override config values at startup (e.g., CONFIG_PATH, API_KEYS).

Related MCP Servers

Sponsor this space

Reach thousands of developers