MCP server for image/video understanding & generation (Gemini/OpenAI/Grok)
Project description
imagine-mcp
mcp-name: io.github.n24q02m/imagine-mcp
Production-grade MCP server for image and video understanding + generation across Gemini, OpenAI, and Grok.
Features
- Multimodal understanding -- Describe, classify, or reason over images and videos (Gemini handles mixed image + video in one call)
- Image generation -- Text-to-image and image-to-image (edit / inpaint) across Gemini Imagen, OpenAI gpt-image, Grok Imagine
- Video generation -- Text-to-video and image-to-video (Gemini Veo 3.1, Grok Imagine Video)
- 3 providers x 2 tiers -- Same interface for
gemini/openai/grokatpoor(cheap/fast) orrich(high quality); swap via parameter - Leaderboard-ranked models -- Provider ordering auto-refreshed weekly from Artificial Analysis + LMArena leaderboards
- Zero-config onboarding -- Browser-based credential relay form; no
.envfiles or manual credential plumbing - Degraded mode -- Server starts with zero credentials and surfaces remaining providers as you add keys
- Response cache -- Disk-based caching of
understandresponses with configurable TTL - Smart stdio proxy -- stdio transport spawns a local HTTP daemon and forwards JSON-RPC frames, sharing credentials across invocations
Setup
With AI Agent -- copy and send this to your AI agent:
Please set up imagine-mcp for me. Follow this guide: https://raw.githubusercontent.com/n24q02m/imagine-mcp/main/docs/setup-with-agent.md
Manual setup -- follow docs/setup-manual.md
Tools
| Tool | Actions | Description |
|---|---|---|
understand |
-- | Describe or reason over one or more image/video URLs. media_urls: list[str], prompt: str, provider, tier, max_tokens. |
generate |
-- | Generate an image or video from a text prompt. media_type: image|video, optional reference_image_url, optional job_id (video poll), aspect_ratio, duration_seconds. |
config |
open_relay, relay_status, relay_skip, relay_reset, relay_complete, warmup, status, set, cache_clear |
Credential + runtime config: open relay form, check credential state, set runtime knobs (log level, default provider, TTL), clear response cache. |
help |
-- | Full Markdown documentation for understand, generate, or config topics. |
Model IDs per provider x action x tier are leaderboard-ranked; see docs/models.md (auto-regenerated from src/imagine_mcp/models.py).
Security
- SSRF + LFI prevention -- All
media_urlsandreference_image_urlare validated at the dispatch boundary; onlyhttp://andhttps://schemes reach the providers.file://,ftp://,gopher://, and scheme-less URLs are rejected. - No credentials in errors -- Provider-side errors are sanitized before being returned.
- Degraded start -- Missing credentials do not prevent the server from starting; affected actions surface actionable errors instead of crashing at boot.
- Relay transport -- Credentials submitted through the local relay form are stored encrypted via
mcp-core(config.enc, user-scopedplatformdirs).
Build from Source
git clone https://github.com/n24q02m/imagine-mcp.git
cd imagine-mcp
mise run setup # or: uv sync --group dev
mise run dev # run http local relay daemon
Contributing
See CONTRIBUTING.md for the full development workflow, commit convention, and release process. Issues + Discussions welcome.
License
MIT -- see LICENSE.
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 imagine_mcp-1.0.1.tar.gz.
File metadata
- Download URL: imagine_mcp-1.0.1.tar.gz
- Upload date:
- Size: 103.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
229d661a2118732efae9f11e60c95cedac9c86f19ebf7dcc8d8adf73a66347e2
|
|
| MD5 |
651e6f29067893686253739de2aa4817
|
|
| BLAKE2b-256 |
c597be02996e6053057263d03038dbba5e059943f2f9c9cd575c59dbcb11ddec
|
File details
Details for the file imagine_mcp-1.0.1-py3-none-any.whl.
File metadata
- Download URL: imagine_mcp-1.0.1-py3-none-any.whl
- Upload date:
- Size: 28.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f4c47e7839f3a0d381054c288d4ac455a113b8764b3d39ed90cfd600a5d140e4
|
|
| MD5 |
a88f18ece1dda390040d10ea8ca2506d
|
|
| BLAKE2b-256 |
828cbd21b504d6a4a856b19a2d72ee3c2bb974760805b47b4d7efb4a96f9e879
|