Skip to main content

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.

CI codecov PyPI Docker License: MIT

Python FastMCP MCP semantic-release Renovate

Sister projects from n24q02m (click to expand)
Project Tagline Tag
better-code-review-graph Knowledge graph for token-efficient code reviews -- fixed search, configurabl... MCP
better-email-mcp IMAP/SMTP email server for AI agents -- 6 composite tools with multi-account ... MCP
better-godot-mcp Composite MCP server for Godot Engine -- 17 mega-tools for AI-assisted game d... MCP
better-notion-mcp Markdown-first Notion API server for AI agents -- 10 composite tools replacin... MCP
better-telegram-mcp MCP server for Telegram with dual-mode support: Bot API (httpx) for quick bot... MCP
claude-plugins Full documentation: mcp.n24q02m.com — unified docs for all 8 servers + the mc... Marketplace
imagine-mcp Production-grade MCP server for image and video understanding + generation ac... MCP
jules-task-archiver Chrome Extension for bulk operations on Jules tasks via batchexecute API -- a... Tooling
mcp-core Unified MCP Streamable HTTP 2025-11-25 transport, OAuth 2.1 Authorization Ser... MCP
mnemo-mcp Persistent AI memory with hybrid search and embedded sync. Open, free, unlimi... MCP
qwen3-embed Lightweight Qwen3 text embedding and reranking via ONNX Runtime and GGUF Library
skret Secrets without the server. CLI
web-core Shared web infrastructure package for search, scraping, HTTP security, and st... Library
wet-mcp Open-source MCP Server for web search, content extraction, library docs & mul... MCP

Table of contents

imagine-mcp server

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 / grok at poor (cheap/fast) or rich (high quality); swap via parameter
  • Leaderboard-ranked models -- Provider ordering auto-refreshed weekly from Artificial Analysis + LMArena leaderboards
  • Degraded mode -- Server starts with zero credentials and surfaces remaining providers as you add keys
  • Response cache -- Disk-based caching of understand responses with configurable TTL
  • Dual transport -- pure stdio with provider env vars (default) or HTTP multi-user with paste-token relay form

Status

2026-05-02 -- Architecture stabilization update

Past months saw significant churn around credential handling and the daemon-bridge auto-spawn pattern. This caused multi-process races, browser tab spam, and inconsistent setup UX across plugins. As of v, the architecture is stable: 2 clean modes (stdio + HTTP), no daemon-bridge layer, no auto-spawn from stdio.

Apologies for the instability period. If you encountered issues with prior versions, please update to v+ and follow the current docs/setup-manual.md -- most prior workarounds are no longer needed.

Related plugins from the same author:

All plugins share the same architecture -- install once, learn pattern transfers.

Documentation

Full docs at mcp.n24q02m.com/servers/imagine-mcp/:

  • Setup -- install methods for Claude Code, Codex, Gemini CLI, Cursor, Windsurf, mcp.json
  • Modes overview -- stdio / local-relay / remote-relay / remote-oauth
  • Multi-user setup -- per-JWT-sub credential model

Install with AI agent -- paste this to your AI coding agent:

Install MCP server imagine-mcp following the steps at
https://raw.githubusercontent.com/n24q02m/claude-plugins/main/plugins/imagine-mcp/setup-with-agent.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_urls and reference_image_url are validated at the dispatch boundary; only http:// and https:// 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-scoped platformdirs).

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

Trust Model

This plugin implements TC-Local (machine-bound, single trust principal). See mcp-core/docs/TRUST-MODEL.md for full classification.

Mode Storage Encryption Who can read your data?
stdio (default) ~/.imagine-mcp/config.json AES-GCM, machine-bound key Only your OS user (file perm 0600)
HTTP self-host Same as stdio Same Only you (admin = user)

Contributing

See CONTRIBUTING.md for the full development workflow, commit convention, and release process. Issues + Discussions welcome.

License

MIT -- see LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

imagine_mcp-1.4.0.tar.gz (125.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

imagine_mcp-1.4.0-py3-none-any.whl (39.1 kB view details)

Uploaded Python 3

File details

Details for the file imagine_mcp-1.4.0.tar.gz.

File metadata

  • Download URL: imagine_mcp-1.4.0.tar.gz
  • Upload date:
  • Size: 125.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.12 {"installer":{"name":"uv","version":"0.11.12","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

Hashes for imagine_mcp-1.4.0.tar.gz
Algorithm Hash digest
SHA256 5ee387dc12ab4e260991ec3f0019ecfc98ac26ea16870cdd9d63cde038588d0c
MD5 5056609a13d20a7d96d8ba088c24295e
BLAKE2b-256 8c4e23b9bc552b0d22997b6ddb4d6d2800d3bea0aaf1c4662c634051056eb016

See more details on using hashes here.

File details

Details for the file imagine_mcp-1.4.0-py3-none-any.whl.

File metadata

  • Download URL: imagine_mcp-1.4.0-py3-none-any.whl
  • Upload date:
  • Size: 39.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.12 {"installer":{"name":"uv","version":"0.11.12","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

Hashes for imagine_mcp-1.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a3139c90341b273d8c52eac3739306968398e74ce681d3ec14d999d1b36df8bf
MD5 01ef5ff97edea9561198da6bb5635005
BLAKE2b-256 714aef85bf0db52b35dd1e41f2ac7a3192219e7b76b2cc23ccae6dc806970222

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page